Administering TCP/IP Networks, IPMP, and IP Tunnels in Oracle® Solaris 11.2

Exit Print View

Updated: July 2014
 
 

Displaying the Status of Known Routes

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 -r
Example 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.

Parameter
Description
Destination
Destination/Mask
Specifies the host that is the destination endpoint of the route. Note that the IPv6 routing table shows the prefix for a 6to4 tunnel endpoint (2002:0a00:3010:2::/64) as the route destination endpoint.
Gateway
Specifies the gateway to use for forwarding packets.
Flags
Indicates the current status of the route. The U flag indicates that the route is up. The G flag indicates that the route is to a gateway.
Use
Shows the number of packets sent.
Interface
Indicates the particular interface on the local host that is the source endpoint of the transmission.