Xbox 360 won't Auto Login to Live - Fixed due to RSTP and Spanning Tree setting in a NetGear Managed GS724TP Switch
You 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.
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.
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 22.214.171.124. 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.
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.
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.
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.
- Wiring the new house for a Home Network
- Wiring the new house for a Home Network - Part 2 - Design Q&A
- Wiring the new house for a Home Network - Part 3 - ISP Hookup
- Wiring the house for a Home Network - Part 4 - Thank You Cat 6 Gigabit Ethernet
- Wiring the house for a Home Network - Part 5 - Gigabit Throughput and Vista