What's new
  • 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!

Identifying the in use WAN connection from script

rtadams89

New Around Here
I have a wan-start script I use to alert me when my router has failed over to its backup WAN connection. Right now, that script just looks at the current wan IP (nvram get wan0_ipaddr) and does some logic to determine if the IP belongs to my primary link's IP or the backup link's IP... sort of hacky. Is there a nvram variable or other way to identify which WAN link is currently is use?
 
Is there a nvram variable or other way to identify which WAN link is currently is use?

Check the following...
Code:
wan0_primary=1

wan1_primary=0
 

Similar 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!
Back
Top