What's new

VPNMON VPNMON-R2 v2.0 -Jul 10, 2022- Monitor your VPN connection's Health (Thread locked/closed)

  • 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!

I would guess no. Not always.
If WAN0/WAN1 don't correlate to eth0/eth1, why would that be? Do you think people are manually manipulating which eth# they're linking things to? Can you think of any instances where this is happening? Nothing to do with different router models, right?
 
Luckily, there apparently is an NVRAM value for this! Thank goodness...

Code:
nvram get wan0_ifname
 
Luckily, there apparently is an NVRAM value for this! Thank goodness...

Code:
nvram get wan0_ifname
This script has code to determine if dual-wan is active, which mode, and which ifname.
If WAN0/WAN1 don't correlate to eth0/eth1, why would that be? Do you think people are manually manipulating which eth# they're linking things to?
As an example, the AX58U uses eth4 for wan. You never know…
 
If WAN0/WAN1 don't correlate to eth0/eth1, why would that be? Do you think people are manually manipulating which eth# they're linking things to? Can you think of any instances where this is happening? Nothing to do with different router models, right?
try out

Code:
ip a | grep global

interesting the order things appear..... maybe make note...


also

Code:
ip a | grep global | grep -E '\b.*eth.*\b'
 
This script has code to determine if dual-wan is active, which mode, and which ifname.

As an example, the AX58U uses eth4 for wan. You never know…
I'm thinking, if I query "nvram get wan0_ifname", it should spit back "eth4" for example in the case of an AX58U.

On my AC86U, this line spits back "eth0"... would that logic work?
 
Rhetorical question... WAN0 and WAN1 always correlate to eth0 and eth1 on our routers, right?
At least not for AC86U.

 
I'm thinking, if I query "nvram get wan0_ifname", it should spit back "eth4" for example in the case of an AX58U.

On my AC86U, this line spits back "eth0"... would that logic work?
Code:
ip a | grep global | grep -oE '\beth.*\b'

what does this spit back?

or

Code:
route | grep default | grep -oE '\beth.*\b'
 
I'm thinking, if I query "nvram get wan0_ifname", it should spit back "eth4" for example in the case of an AX58U.

On my AC86U, this line spits back "eth0"... would that logic work?
Unless pppoe is in use. Then you need wan0_pppoe_ifname. I was surprised how complicated it can get.
 
At least not for AC86U.

That's great info... thanks for validating that eth1 == port4
 
Unless pppoe is in use. Then you need wan0_pppoe_ifname. I was surprised how complicated it can get.
OMG... can't things ever be straighforward! LOL
 
What are you gonna do once you know the interface name?
Something like this...

vpnmon-r2-1.5.jpg
 
Surprise, BTW! ;) Letting the cat out of the bag here before 1.5 goes live...
 
Ppp user here

Code:
dmin@RT-AC86U-DBA8:/tmp/home/root# ip a | grep global | grep -oE '\beth.*\b'
admin@RT-AC86U-DBA8:/tmp/home/root# route | grep default | awk '{ print $8 }'
ppp0
admin@RT-AC86U-DBA8:/tmp/home/root#
I will be sure to test for this... thanks for the heads-up!
 

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