如何检视网络路由?

SmartOS检视网路路由指令#

透过netstat指令检视路由表:

 # netstat -rn
Routing Table: IPv4
 
 Destination Gateway Flags Ref Use Interface
 -------------------- -------------------- ----- ----- ---------- ---------
 default 211.78.255.254 UG 3 193          
 127.0.0.1 127.0.0.1 UH 3 8 lo0      
 211.78.255.0 211.78.255.31 U 3 0 net0      

 Routing Table: IPv6
 
 Destination/Mask Gateway Flags Ref Use If  
 --------------------------- ----------------------- ---- ----- --- ------- -----
 ::1 ::1 UH 2 0 lo0  
 
 

检视到某个网站的路由:

  # traceroute google.com 

traceroute: Warning: google.com has multiple addresses; using 74.125.128.139
traceroute to google.com (74.125.128.139), 30 hops max, 40 byte packets
1 202.181.214.124 (202.181.214.124) 0.169 ms 0.166 ms 0.193 ms
2 202.181.211.9 (202.181.211.9) 0.503 ms 0.421 ms 0.479 ms
3 google3-10G.hkix.net (202.40.161.10) 3.476 ms 3.366 ms 3.361 ms
4 209.85.248.62 (209.85.248.62) 2.713 ms 2.833 ms 209.85.248.60 (209.85.248.60) 3.322 ms
5 216.239.43.17 (216.239.43.17) 5.791 ms 209.85.253.69 (209.85.253.69) 4.970 ms 7.049 ms
6 * * *
7 hg-in-f139.1e100.net (74.125.128.139) 3.392 ms 2.914 ms 3.213 ms

  • No labels