You can try with:
route -n get default
It is not the same as GNU/Linux's route -n
(or even ip route show
) but is useful for checking the default route information.
Also, you can check the route that packages will take to a particular host. E.g.
route -n get www.yahoo.com
The output would be similar to:
route to: 98.137.149.56
destination: default
mask: 128.0.0.0
gateway: 5.5.0.1
interface: tun0
flags: <UP,GATEWAY,DONE,STATIC,PRCLONING>
recvpipe sendpipe ssthresh rtt,msec rttvar hopcount mtu expire
0 0 0 0 0 0 1500 0
IMHO netstat -nr
is what you need. Even MacOSX's Network utility app(*) uses the output of netstat to show routing information.
I hope this helps :)
(*) You can start Network utility with open /Applications/Utilities/Network Utility.app
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…