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.

猜你喜欢

转载自blog.csdn.net/hutiewei2008/article/details/84650525