WAN0 State Meanings? Router in disconnected state but internet worked...

Viktor Jaep

Very Senior Member
This morning I found my router (AC86U) in a state where the web UI indicated it was disconnected from the internet.... however the internet was working perfectly fine. Running 386.7_2. So immediately I ran:

Code:
nvram get wan0_state_t

... and the result I got was "3". ???

Now I know:
Code:
0 = Stopped/Disconnected
1 = Connecting
2 = Connected

But what does "3" mean? I've even seen a mention of "4" at times in the forums as well, but I have not found any formal explanations what these codes beyond 2 mean?

In your opinion, would it be safe to assign "2" back to the wan0_state_t in NVRAM if it sees that it's 3 (or 4), and cross your fingers? Or is it just better to reboot at that point? I found a related thread, but it does not seem to apply to the issue I was having: https://www.snbforums.com/threads/status-shows-disconnected-yet-fully-functional.77787/

Thank you in advance for your expert advice! :)
 

Viktor Jaep

Very Senior Member
0 = INITIALIZING
1 = CONNECTING
2 = CONNECTED
3 = DISCONNECTED
4 = STOPPED
5 = DISABLED
6 = STOPPING
Thanks for sharing that @ColinTaylor! This is really nice to have (saving this!). So I take it there's probably a bug... since the internet was working just fine, but still sitting in some "disconnected" state. What's your take on forcing it back to "2" in cases like this? Or is it more advisable to just reboot? I'm thinking about how to programmatically attack this.
 

ColinTaylor

Part of the Furniture
I've not encountered this myself so it's not something I've ever looked into. A cursory look at the code suggests the DISCONNECTED state could be caused by many situations. I would be tempted to just restart the WAN interface and forget about it unless it happens again.
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top