Closed rains31 closed 9 years ago
route add will not work when there are multiple default routes, we should choose the one who has the minimum metric. % ip route show 0/0 default via 10.11.0.254 dev lan0 metric 203 default via 10.11.0.254 dev wlan0 metric 302
@everyone
Please try if this command shows the default route on your machine or router.
ip route show 0/0 | sort -k 7 | head -n 1 | sed -e 's/.* via \([^ ]*\).*/\1/'
passed
Merged, thanks!
route add will not work when there are multiple default routes, we should choose the one who has the minimum metric. % ip route show 0/0 default via 10.11.0.254 dev lan0 metric 203 default via 10.11.0.254 dev wlan0 metric 302