Scott Hanselman

Xbox 360 won't Auto Login to Live - Fixed due to RSTP and Spanning Tree setting in a NetGear Managed GS724TP Switch

September 13, 2011 Comment on this post [15] Posted in Bugs | Tools
Sponsored By

Victory pose, Halo StyleYou change something months ago, then noticed an unrelated problem weeks later, then it takes a year to figure out that they were related.

"A butterfly flaps its wings in Brazil and my Xbox stops getting a DHCP lease reliably."

A few months back, as my wife recalls, the Xbox in the living room stopped automatically logging into Xbox live. It was irritating in that "First World Problem" kind of way. We use the Xbox for Netflix and Hulu and she uses Zumba and some other Kinect Fitness stuff so it was a daily reminder to me that "Daddy is a lousy IT guy."

I don't remember when it stopped working other than it did. I set static leases in the main router. Then I set static IP addresses in the router. The ONLY thing that would fix it was to get the Xbox to Refresh/Renew the IP Address (even when it was static!) by going into the System menu of My Xbox, then Network Settings, Configure Network, then Additional Settings, then Restore to Factory Defaults. <sarcasm>Let me say that the wife LOVED this.</sarcasm>

Unrelated to this issue, a few weeks back I lost some save games on my now dead PS3 so tonight I decided to go and backup all my Xbox save games onto a new USB stick. I started with the Xbox in my office, but it wouldn't log in. This set off a spark in my head. I've got literally 34 happy devices with IP Addresses in my house (don't ask) from various vendors but the two Xboxen won't login? OK, that can't be me.

All my nicely labeled network cables in a bundle.At this point, of course, I'm unable to login to Xbox live easily so I get irritated and decide that I will shift gears and finally get this thing fixed.

Even though there's no realistic way that I will bust out the IP Networking textbook from college, hook up WireShark and start sniffing traffic, I like to fool myself into believing that I am that good of a technologist (or that I care THAT much) but the thought brings me comfort.

I start following the wires around from the Xbox to the router, as they are all numbered and labeled in the wiring closet.

Aside: Here's a Bit.ly Bundled Link of the complete "Wiring your house for Gigabit Ethernet 5 PART SERIES" when I wired my house a few years back.

However, I get lost as there's just so darn many wires in the wiring closet. It's getting crowded.

My new wiring closet door, open My new wiring closet door, closed

I realize, however, that the wires aren't going directly into main Router that gives out IP addresses. They are actually plugged into a lovely Netgear 24-port Gigabit GS724TP Managed Switch. Because I wired the whole house for Gigabit and wanted basically hard drive speeds on the wire, I needed a switch with the chutzpah to push a lot of bandwidth, and this switch was the one. All the wires in the house go into it - including the Xboxen. But which ones?

I needed to figure out which cables were the two Xbox cables and plug them directly into the router. I know the MAC addresses of both Xboxes so I logged into the switch's admin console. After failing to remember the password (I set this up 4 years ago, you know) and starting to panic, I tried "password" out of frustration. It worked.

It shouldn't have.

Why was my password a default password?

Something had changed. Oh! I flashed the firmware on this GS724TP switch last year with version 5.0.0.15. It must have reset everything to the defaults.

Now that I was logged in, I checked out the list of all the MAC Addresses and their associated ports.

My two Xboxes were plugged into g14 and g22

OK, so the two consoles are plugged into Ports 14 and 22, so I found them and moved the cables to plug directly into my router, rather than the managed switch.A graphical view of my managed switch.

They worked. Suddenly a year of obnoxious just stopped. Why?

What would cause one device (or class of device) to not get an IP address consistently via DHCP?

There's an article on Windows 2000 called DHCP Renewal Failures on Switched Networks that sounds familiar.

A client connected to an Ethernet switch may not receive a renewed DHCP IP address during startup. Releasing and renewing the IP address manually works.

There's apparently a magical thing called STP (Spanning Tree Protocol) that is very useful but also totally confusing to me. I have read this Wikipedia twice and I have no idea what it does. I'm sure it's lovely, really.

The Spanning Tree Protocol (STP) is a network protocol that ensures a loop-free topology for anybridged Ethernet local area network.

Of COURSE it is.

O_O

That is my blank stare, right there, FYI.

Interestingly, if you Google with Bing or DuckDuckGo for "spanning tree DHCP" you'll get results with words like "failure," "blamed," "fixed, "slowed down," and "acting strange." Ya, spanning tree rocks.

There's also a version of Spanning Tree called RSTP or Rapid Spanning Tree Protocol. All of these protocols are meant to make things work better and recover faster after a network failure and prevent routing loops. However, they appear to cause some trouble in certain clients, like my Xbox and possibly my iPhone and IPad as well.

Here's another explanation:

The problem might be related to what type of network device the DHCP client is connected to. If the client is connected to a switch that performs a spanning tree calculation during port initialization, then the port the client is connected to may not be available for 10-15 seconds. This is long enough to prevent the DHCP client from renewing or obtaining IP addressing information, and thus preventing the TCP/IP stack from initializing.

This is not a problem on all switches that perform spanning tree calculations. Some devices will perform the calculations in the background, and thus the port becomes available immediately. Also, this type of functionality is only required on ports that are connected to other switching devices. Therefore you don't really need it enabled on ports that have clients directly connected to them

A buddy of mine says:

[Spanning Tree is] not bad, but it is there to prevent routing loops. If you are sure you won't ever connect that port to another switch and make a routing loop, an alternative to disabling spanning tree is to enable portfast and I bet that would fix it too. The problem is the normal startup procedure for a port running spanning tree is about 20-25 seconds of watching traffic on the port before enabling. Thus, when you turn your Xbox on, it only waits x seconds for a DHCP reply where x is definitely shorter than the time spanning tree takes to enable the port.

Also, deep in this Australian forum was a comment:

Just to clarify that RSTP has a faster up time than STP. I don't think this is going to directly cause the "limited or no connectivity" issue.

However for some devices you need to have the port active right away. On a cisco switch this is called portfast and it skips the process of checking for loops(RSTP, STP). On some devices (xbox 360) this can cause DHCP issues when they're first turned on.

PCs are generally immune to this as they'll poll for a DHCP service several times while your media device might only try once.

And thus, this is how I fixed the issue with my Xboxes not logging into Live on the first try. I'd flashed a network switch without even thinking and it turned Rapid Spanning Tree Protocol on, which Xboxes (and some other network devices) don't like.

My solution, check the router or switch and turn RSTP or "Spanning Tree" off.

As an aside, it turns out that I could have even turned off RSTP at the port level on this Netgear GS725TP switch. Amazing hardware, this switch. Love it. Except for when it reset settings to defaults and irritated me for a year.

Related Links

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service
September 13, 2011 11:45
That's pretty interesting. Since you've struggled a bit understanding the spanning tree, you may enjoy reading the explanative poem the inventor wrote: http://telofy.soup.io/post/152151157/Radia-Perlman-penned-this-poem-while-she
September 13, 2011 13:01
Great post - I'll be sure to keep this in mind if I ever have the same problem! Your link to the Windows 2000 article is 404 on your own blog, this is the link for the knowledge base article: http://support.microsoft.com/kb/168455
September 13, 2011 14:23
Is this a DHCP spec problem where the specification does not require the client to perform multiple retries?

Or is it a problem with the switches for not activating the port in a timely manner?

Or is it an Xbox issue for either failing to detect that it does not have an active Ethernet connection before sending out its DHCPDISCOVER, or not robustly retrying this?
September 13, 2011 15:43
I've found very good answers to some quite obscure questions in this particular Australian forum. Unfortunately it often ranks quite low in Google.
Obi
September 13, 2011 16:57
I have run into this a lot with SIP phones. It is best to not disable STP but the enable "edge port" (cisco's term is port fast, netgear calls it fast link). It still does STP (to detect loops) but starts the STP state machine in forwarding mode. See the Wikipedia entry on STP. Here is a snippet about edge port:


Ports may be configured as edge ports if they are attached to a LAN that has no other bridges attached. These edge ports transition directly to the forwarding state. RSTP still continues to monitor the port for BPDUs in case a bridge is connected. RSTP can also be configured to automatically detect edge ports. As soon as the bridge detects a BPDU coming to an edge port, the port becomes a non-edge port


So the best thing to do on your switch is to enable fast link on all ports that have devices directly connected to the switch. On some switches, this is the default setting.

Another good low-cost PoE smart switch is the hp procurve 2610-24/12-pwr since it can also do vlans and routing, but is only 10/100 (which is all I needed for SIP phones).
September 13, 2011 17:06
I'm kinda curious how your mindset worked for flashing that switch.

Okay, things are working great... lets do an upgrade.

Upgrade.

Okay, upgrade didn't fail, so it must be working great.

</ducks> ;)
September 13, 2011 18:45
Wow, that's somehow hilarious. How complicated modern life had become. You have to be a Cisco engineer kind of guy so that the whole family can watch movies and play on their XBox.

I mean if Scott had trouble fixing it what should the average guy do?

Besides that - another great post I might that could "save my life" when I stumble upon it in a couple of years.
September 13, 2011 18:48
I am not sure if you know this already, when you disable javascript (while CSS is enabled) and as I reduce the screen size significantly , after a certain point the main navigation at top of the site disappears and drop down list DOES NOT appear.And when css is disabled and javascript is enabled I am able to see both the drop down list and the main navigation. Having said that the site, works fine when both javascript and CSS is disabled (for screen readers,I imagine).

I understand these are edge cases,I just thought I'll bring it to your notice.

Ram
September 13, 2011 19:43
What kills me is that there is no way the average person is going to figure this stuff out. No, the average person probably doesn't have a 24-port managed switch, but they might have an 8-port, and it's basically going to just make that person frustrated.

This is the stuff about home networking that just makes me [headdesk /].
September 13, 2011 22:51
Or if you don't need power over Ethernet get the http://netgear.co.uk/business/products/switches/smart-switches/GS724T.aspx model which is half the price ;-)
September 14, 2011 1:14
This just reminds me of how many smart people worked for DEC.
September 14, 2011 1:16
I should have said really smart people.
September 14, 2011 9:12
Love your posts. It's comforting to know experts like you also gets stumped on technology once in a while :)
September 15, 2011 4:06
Peter, the average guy won't or at least shouldn't have a managed switch in their house, so should never see this issue. Best Buy switches aren't typically smart enough to do this kind of thing.
April 07, 2012 19:29
I am a network enginner and have been doing this for about the past 14 years and i'm amazing network problem solver (i'm not trying to toot my own horn here). I have a Cisco 881 router (an actual Cisco, not a Cisco branded Linksys) and have been having this issue for the past two years and everytime I look at it, I get frustrated and dumpo it for the next 6 months. One thing I have noticed though, if you live the xbox on for more than 2 minutes it will eventually connect. Went in to the router and disabled spanning-tree (most cisco's will be "no spanning-tree" and then your netowrk interface i.e. "no spanning-tree vlan1". Disabled it and Viola! Connected just fine and to Chris Hubbard, enabling portfast did not help. Spanning tree must be completely disabled from what i've noticed.

Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.