Xbox vs Managed Switch

Wed, Oct 13, 2010

A few months ago I decided to do what a lot of geeks do. No…not go to Comic-Con. I decided to wire up my house with ethernet. The main goal here was really to get GigE between my office on the 2nd floor and the basement where my file server is located. I figured as long as I’m pulling cables I might as well take the plunge and wire up the whole house and to do it right. Complete with a patch panel and wall plate mounted ethernet ports. After planning out the ports I wanted in the house it was apparent that the typical consumer 8 port Gigabit switch wasn’t going to have enough ports. After looking at my options I ended up getting a Dell PowerConnect 5324 off eBay for $80. Which is the same cost of a consumer 8 port Gigabit switch so it was win all around. After getting all the wires pulled and terminated everything appeared to be working great. All the computers were connected at GigE speeds. And if that was the end of this story there wouldn’t be a blog post or a chance to learn. So there were a few unexpected issues.

Some of the embedded type devices were no longer connecting to the network properly. Most importantly my Xbox 360. It wouldn’t connect to Xbox Live. However if you went into the network settings and told it to test the connection the problem would resolve itself and it would start working. I scoured the Internet looking for people with similar problems to see if there were any known issues of using the Xbox 360 with a Dell PowerConnect or managed switches. But that search came up empty.

Initially I didn’t spend a whole lot of time trying to figure out what was going on because I had a work around. Although it did involve a jumping through a few hoops. I only needed to do it if I needed to get my Xbox online. But I did try a few quick things. First it was apparent that the Xbox was not getting a DHCP lease as it was assigning itself an IP address using Automatic Private IP Addressing (APIPA) . This was really a symptom and not the problem but I set the Xbox to a static IP address to see if that would resolve the problem. But no dice. My second thought was that there was some issue with the Xbox port auto negotiation taking too long to bring the link up. So I disabled auto negotiation and hard coded the port speed and duplex, etc. But no change. I didn’t know it at the time but I was on the right track with the idea that the port was taking to long but I stopped my debugging there just used my work around.

So fast forward a couple of months and today the light bulb went off. I wasn’t even thinking about this particular problem. I’m kicking myself b/c this should have been obvious. But one of the features that managed switches support is called Spanning Tree Protocol (STP) . It’s a protocol that layer2 devices use to detect and prevent typology loops on a network which can cause broadcast storms. STP works by bringing up any new links in a blocking state and only putting it into a forwarding state once it knows that it’s safe to do so. This check adds a delay to the link being fully functional. It just so happens that this delay can interfere with the normal operation of some devices. Including my Xbox 360.

Luckily with a managed switch this is a quick fix. As manage switches have both global and per port settings for STP. And to be honest I really don’t need STP on my home network so I could disable it globally but I’d rather not do that. However it’s safe to disable STP on ports that connect to edge devices. But many managed switches, including the Dell PowerConnect, offer a safer option as well. Beyond just enabling and disabling STP on a per port basis most managed switches also support something called “fastlink” or “portfast”, depending on the manufacture of the switch. This works by putting the port into forwarding mode first and only putting it into blocking mode if the STP check fails. It’s the networks equivalent of shooting first and asking questions later. Using this it’s possible that a temporary network loop can exist. So it should only be used on ports that connect to edge devices where a loop is very unlikely to exist. After enabling fastlink on the port connected to my Xbox 360 the problem went away. I should also note that disabling STP on the port also worked.

Okay now to go play some Halo Reach.

comments powered by Disqus