标签:route
route显示并设置linux内核路由表,主要是静态路由
del删除指定的路由,和添加时一样要写全

route -n 打印路由表,-n不进行反向解析,可加快指令执行速度

字段说明
| 字段 | 描述 |
| Destination | 目标网络或目标主机。 |
| Gateway | 网关地址,如果没有就显示 *。 |
| Genmask | 目标地址的掩码。'255.255.255.255' 是用于目标为主机的,'0.0.0.0' 是用于默认路由的。 |
| Flags | 标识。 |
| Metric | 距离目标的跳数。 |
| Ref | 路由条目引用数(Linux 内核中不会使用)。 |
| Use | 路由条目被查找的次数。 |
| Iface | 网络接口名。 |
| MSS | 基于此路由之上的 TCP 连接的默认的最大报文长度。 |
| Window | 基于此路由之上的 TCP 连接的默认的窗口大小。 |
| irtt | 基于此路由之上的 TCP 连接的初始往返时间。 |
其中,Flag 的取值含义如下表所示:
| Flag | Description |
| U | route is up |
| H | target is a host |
| G | use gateway |
| R | reinstate route for dynamic routing |
| D | dynamically installed by daemon or redirect |
| M | modified from routing daemon or redirect |
| A | installed by addrconf |
| C | cache entry |
| ! | reject route |
标签:route
原文地址:http://blog.51cto.com/2685141/2092080