linux route 命令
route命令輸出的路由表字段含義如下:
Destination 目標
The destination network or destination host. 目標網路或目標主機。
Gateway 閘道器
The gateway address or '*' if none set. 閘道器地址,如果沒有就顯示星號。
Genmask 網路掩碼
The netmask for the destination net; '255.255.255.255' for a
host destination and '0.0.0.0' for the default route.
Flags:總共有多個旗標,代表的意義如下:
o U (route is up):該路由是啟動的;
o H (target is a host):目標是一部主機 (IP) 而非網域;
o G (use gateway):需要透過外部的主機 (gateway) 來轉遞封包;
o R (reinstate route for dynamic routing):使用動態路由時,恢復路由資訊的旗標;
o D (dynamically installed by daemon or redirect):已經由服務或轉 port 功能設定為動態路由
o M (modified from routing daemon or redirect):路由已經被修改了;
o ! (reject route):這個路由將不會被接受(用來抵擋不安全的網域!)
o A (installed by addrconf)
o C (cache entry)
Metric 距離、跳數。暫無用。
The 'distance' to the target (usually counted in hops). It is
not used by recent kernels, but may be needed by routing dae-
mons.
Ref 不用管,恆為0。
Number of references to this route. (Not used in the Linux ker-nel.)
Use 該路由被使用的次數,可以粗略估計通向指定網路地址的網路流量。
Count of lookups for the route. Depending on the use of -F and
-C this will be either route cache misses (-F) or hits (-C).
Iface 介面,即eth0,eth0等網路介面名
Interface to which packets for this route will be sent.