Solaris netstat 查看路由表

本文说明了使用 netstat 命令时路由表中显示的标志的含义。

示例输出:

# netstat -rn
Routing Table:
Destination           Gateway           Flags  Ref   Use   Interface
-------------------- -------------------- -----  ----- ----- --------
127.0.0.1            127.0.0.1             UH       021220517  lo0
192.9.200.0          207.82.202.188        UG       0     93
192.9.200.0          207.82.202.65         UG       0      0
205.163.59.0         207.82.202.188        UG       0  24729
207.82.203.0         207.82.202.188        UG       0  29053
205.163.209.0        207.82.202.188        UG       0     27
207.82.202.128       207.82.202.129        U        2   9377  le1
207.82.202.64        207.82.202.66         U        2    496  qe0
192.112.65.0         192.112.65.10         U        3   1601  le0
224.0.0.0            192.112.65.10         U        3      0  le0
default              207.82.202.65         UG       0 152449
The Flags indicate:
U - Up (The route is up)
G - Gateway (The route is via a remote Router/Gateway)
H - Host (The destination of the route is a specific host)

仅带有 U 标志的条目是到网络的路由,通过该主机的物理本地网关,(也显示在所有多播路由上)。

我们可能还会看到 D 标志。
此标志指示路由是否由 ICMP 重定向动态创建,(此标志仅出现在主机路由中)。

在 Solaris 10 中,如果我们将 -a 选项与 netstat 一起使用,我们可能会看到以下添加标志:

A - Address Resolution
B - Broadcast Address
L - Local address for the host

在 Solaris 11 中,如果指定了 -a 选项,则会出现带有以下标志的路由条目:

b    Broadcast addresses.
C    Clones interface host route entries for on-link  destinations.
L    Local addresses for the host.
日期:2020-09-17 00:15:25 来源:oir作者:oir