SomeWhereOverTheRainBow
Part of the Furniture
I will be sure to test for this... thanks for the heads-up!
Code:
ip a | grep global | awk '{ print $7 }' | head -n 1
should also supply the same results.
I will be sure to test for this... thanks for the heads-up!
ip a | grep global | awk '{ print $7 }' | head -n 1
you did it without the head -n 1 ?This gives me:
eth0
br0
wl0.1
wl1.1
ip a | grep global | awk '{ print $7 }' | head -n 1
Yeah... you changed it as I tried it. LOLyou did it without the head -n 1 ?
only if @chongnt could verify it works the same lol.Yeah... you changed it as I tried it. LOL
at either rate, the route command is definitely more efficient.
tryCode:ip a | grep global | awk '{ print $7 }' | head -n 1
admin@RT-AC86U-DBA8:/tmp/home/root# ip a | grep global | awk '{ print $7 }' | head -n 1
br0
admin@RT-AC86U-DBA8:/tmp/home/root#
What does this look like on your end?Code:admin@RT-AC86U-DBA8:/tmp/home/root# ip a | grep global | awk '{ print $7 }' | head -n 1 br0 admin@RT-AC86U-DBA8:/tmp/home/root#
ip a | grep global | awk '{ print $7 }'
Here you goWhat does this look like on your end?
Code:ip a | grep global | awk '{ print $7 }'
admin@RT-AC86U-DBA8:/tmp/home/root# ip a | grep global | awk '{ print $7 }'
br0
wl1.2
vlan500
scope
Hum so where's the ppp0 interface!?Here you go
Code:admin@RT-AC86U-DBA8:/tmp/home/root# ip a | grep global | awk '{ print $7 }' br0 wl1.2 vlan500 scope
tryHere you go
Code:admin@RT-AC86U-DBA8:/tmp/home/root# ip a | grep global | awk '{ print $7 }' br0 wl1.2 vlan500 scope
ip a | grep inet | grep -vwE '\b(((10|127)(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3})|(((172\.(1[6-9]|2[0-9]|3[0-1]))|(192\.168))(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){2}))\b' | grep global | awk '{ print $7 }' | head -n 1
route | grep default | awk '{ print $8 }'
ip r | grep default | awk '{ print $5}'
I second this. I am curious as well.@chongnt ... before we go chasing down this rabbit hole... could you please give me your results for:
Code:nvram get wan0_ifname nvram get wan1_ifname nvram get wan0_pppoe_ifname nvram get wan1_pppoe_ifname
ppp0 is from thisHum so where's the ppp0 interface!?
route | grep default | awk '{ print $8 }
admin@RT-AC86U-DBA8:/tmp/home/root# route | grep default | awk '{ print $8 }'
ppp0
admin@RT-AC86U-DBA8:/tmp/home/root#
admin@RT-AC86U-DBA8:/tmp/home/root#
admin@RT-AC86U-DBA8:/tmp/home/root#
admin@RT-AC86U-DBA8:/tmp/home/root# nvram get wan0_ifname
vlan500
admin@RT-AC86U-DBA8:/tmp/home/root# nvram get wan1_ifname
admin@RT-AC86U-DBA8:/tmp/home/root# nvram get wan0_pppoe_ifname
ppp0
admin@RT-AC86U-DBA8:/tmp/home/root# nvram get wan1_pppoe_ifname
admin@RT-AC86U-DBA8:/tmp/home/root# ip a | grep inet | grep -vwE '\b(((10|127)(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3})|(((172\.(1[6-9]|2[0-9]|3[0-1]))|(192\.168))(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){2}))\b' | grep global | awk '{ print $7 }' | head -n 1
vlan500
admin@RT-AC86U-DBA8:/tmp/home/root# ip r | grep default | awk '{ print $5}'
ppp0
admin@RT-AC86U-DBA8:/tmp/home/root#
admin@RT-AC86U-DBA8:/tmp/home/root# nvram get wan_ifname
eth0
admin@RT-AC86U-DBA8:/tmp/home/root# nvram get wan_pppoe_ifname
admin@RT-AC86U-DBA8:/tmp/home/root#
See that is where you experience a rock and a hard place. See how asus reports the nvram variables as well.. this is interesting and highlights some of the foreshadowing brought about by @dave14305 .ppp0 is from this
Code:route | grep default | awk '{ print $8 }
Code:admin@RT-AC86U-DBA8:/tmp/home/root# route | grep default | awk '{ print $8 }' ppp0 admin@RT-AC86U-DBA8:/tmp/home/root# admin@RT-AC86U-DBA8:/tmp/home/root# admin@RT-AC86U-DBA8:/tmp/home/root# admin@RT-AC86U-DBA8:/tmp/home/root# nvram get wan0_ifname vlan500 admin@RT-AC86U-DBA8:/tmp/home/root# nvram get wan1_ifname admin@RT-AC86U-DBA8:/tmp/home/root# nvram get wan0_pppoe_ifname ppp0 admin@RT-AC86U-DBA8:/tmp/home/root# nvram get wan1_pppoe_ifname admin@RT-AC86U-DBA8:/tmp/home/root# ip a | grep inet | grep -vwE '\b(((10|127)(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3})|(((172\.(1[6-9]|2[0-9]|3[0-1]))|(192\.168))(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){2}))\b' | grep global | awk '{ print $7 }' | head -n 1 vlan500 admin@RT-AC86U-DBA8:/tmp/home/root# ip r | grep default | awk '{ print $5}' ppp0 admin@RT-AC86U-DBA8:/tmp/home/root#
for my ISP, internet is via vlan500. My isp use different vlan for video and voip.
what does this showppp0 is from this
Code:route | grep default | awk '{ print $8 }
Code:admin@RT-AC86U-DBA8:/tmp/home/root# route | grep default | awk '{ print $8 }' ppp0 admin@RT-AC86U-DBA8:/tmp/home/root# admin@RT-AC86U-DBA8:/tmp/home/root# admin@RT-AC86U-DBA8:/tmp/home/root# admin@RT-AC86U-DBA8:/tmp/home/root# nvram get wan0_ifname vlan500 admin@RT-AC86U-DBA8:/tmp/home/root# nvram get wan1_ifname admin@RT-AC86U-DBA8:/tmp/home/root# nvram get wan0_pppoe_ifname ppp0 admin@RT-AC86U-DBA8:/tmp/home/root# nvram get wan1_pppoe_ifname admin@RT-AC86U-DBA8:/tmp/home/root# ip a | grep inet | grep -vwE '\b(((10|127)(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3})|(((172\.(1[6-9]|2[0-9]|3[0-1]))|(192\.168))(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){2}))\b' | grep global | awk '{ print $7 }' | head -n 1 vlan500 admin@RT-AC86U-DBA8:/tmp/home/root# ip r | grep default | awk '{ print $5}' ppp0 admin@RT-AC86U-DBA8:/tmp/home/root# admin@RT-AC86U-DBA8:/tmp/home/root# nvram get wan_ifname eth0 admin@RT-AC86U-DBA8:/tmp/home/root# nvram get wan_pppoe_ifname admin@RT-AC86U-DBA8:/tmp/home/root#
for my ISP, internet is via vlan500. My isp use different vlan for video and voip.
ip r | grep default | grep -oE "\b($(nvram get wan_ifname)|$(nvram get wan0_ifname)|$(nvram get wan1_ifname)|$(nvram get wan_pppoe_ifname)|$(nvram get wan0_pppoe_ifname)|$(nvram get wan1_pppoe_ifname))\b" | sort -u
what does this show
Code:ip r | grep -oE "\b($(nvram get wan_ifname)|$(nvram get wan0_ifname)|$(nvram get wan1_ifname)|$(nvram get wan_pppoe_ifname)|$(nvram get wan0_pppoe_ifname)|$(nvram get wan1_pppoe_ifname))\b" | sort -u
admin@RT-AC86U-DBA8:/tmp/home/root# ip r | grep -oE "\b($(nvram get wan0_ifname)|$(nvram get wan0_ifname)|$(nvram get wan1_ifname)|$(nvram get wan_pppoe_ifname)|$(nvram get wan0_pppoe_ifname)|$(nvram get wan1_pppoe_ifname))\b" | sort -u
ppp0
vlan500
admin@RT-AC86U-DBA8:/tmp/home/root#
So in your case, if I am able to match WAN0 to your vlan500, that should work...ppp0 is from this
Code:route | grep default | awk '{ print $8 }
Code:admin@RT-AC86U-DBA8:/tmp/home/root# route | grep default | awk '{ print $8 }' ppp0 admin@RT-AC86U-DBA8:/tmp/home/root# admin@RT-AC86U-DBA8:/tmp/home/root# admin@RT-AC86U-DBA8:/tmp/home/root# admin@RT-AC86U-DBA8:/tmp/home/root# nvram get wan0_ifname vlan500 admin@RT-AC86U-DBA8:/tmp/home/root# nvram get wan1_ifname admin@RT-AC86U-DBA8:/tmp/home/root# nvram get wan0_pppoe_ifname ppp0 admin@RT-AC86U-DBA8:/tmp/home/root# nvram get wan1_pppoe_ifname admin@RT-AC86U-DBA8:/tmp/home/root# ip a | grep inet | grep -vwE '\b(((10|127)(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3})|(((172\.(1[6-9]|2[0-9]|3[0-1]))|(192\.168))(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){2}))\b' | grep global | awk '{ print $7 }' | head -n 1 vlan500 admin@RT-AC86U-DBA8:/tmp/home/root# ip r | grep default | awk '{ print $5}' ppp0 admin@RT-AC86U-DBA8:/tmp/home/root# admin@RT-AC86U-DBA8:/tmp/home/root# nvram get wan_ifname eth0 admin@RT-AC86U-DBA8:/tmp/home/root# nvram get wan_pppoe_ifname admin@RT-AC86U-DBA8:/tmp/home/root#
for my ISP, internet is via vlan500. My isp use different vlan for video and voip.
Thread starter | Title | Forum | Replies | Date |
---|---|---|---|---|
(Not specifically) VPNMON-R3 1.11 failure domino effect | Asuswrt-Merlin AddOns | 20 |
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!