Use the –r option with the netstat command to display the routing table for a local host. This table displays the status of all routes that are known to a host.
% netstat -rExample 1-6 Displaying Routing Table Output With the netstat Command
The following example shows the output of the netstat –r command.
Routing Table: IPv4 Destination Gateway Flags Ref Use Interface -------------------- -------------------- ----- ----- ------ --------- host15 myhost U 1 31059 net0 10.0.0.14 myhost U 1 0 net0 default distantrouter UG 1 2 net0 localhost localhost UH 42019361 lo0 Routing Table: IPv6 Destination/Mask Gateway Flags Ref Use If --------------------- --------------------------- ----- --- ------ ----- 2002:0a00:3010:2::/64 2002:0a00:3010:2:1b2b:3c4c:5e6e:abcd U 1 0 net0:1 fe80::/10 fe80::1a2b:3c4d:5e6f:12a2 U 1 23 net0 ff00::/8 fe80::1a2b:3c4d:5e6f:12a2 U 1 0 net0 default fe80::1a2b:3c4d:5e6f:12a2 UG 1 0 net0 localhost localhost UH 9 21832 lo0
The following table describes the information that is displayed in the output of the netstat –r command.
|