What's new

Switch WAN type from SSH

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

CntrlAltDel

Occasional Visitor
Hi there,

I seem to be struggling trying to get WAN type changes applied through SSH. So far for example I've tried:
Bash:
nvram set wan_proto=pppoe
nvram set pppoe_username='x'
nvram set pppoe_passwd='x'
nvram commit
service restart_wan

But no dice. WAN configs dont change whatsoever in the web gui and if I check with the below I find that DHCP is still set.
Bash:
nvram show | grep wan_proto

I would like to be able to switch to PPPoE and also to DHCP.
 
Given the number of wan variables available in nvram, I can't say I'm surprised. You're making assumptions that it's just a matter of nvram variables, when such changes might trigger other processes. It might even require a reboot.

Regardless, in a case like this, I always dump nvram both before and after the change and diff the results, just to be sure what actually changed.

Code:
DIR='/jffs'
nvram show | sort >/dev/null > $DIR/nvram.before
# make changes via GUI
nvram show | sort >/dev/null > $DIR/nvram.after
diff $DIR/nvram.before $DIR/nvram.after

I used /jffs rather than /tmp in case it requires a reboot after making changes.
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

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