There are three different options for the ROUTE inquiry
-
Inquire on all routes (no attributes specified)
-
Inquire on filtered routes (filter attributes are present)
-
Inquire only on the default routes
If you do not enter ROUTE inquiry attributes, all known routes are returned. This includes indirect, direct, and default routes.
Inquiring on All Routes
Inquire on all routes in the current routing table by issuing the following inquiry at your system console:
NW TCPIP ROUTE
The results of the inquiry reports all known routes in the routing table.
Inquiring on Filtered Routes
The NW TCPIP ROUTE inquiry with the [IPADDRESS] <IP address> interrogate option specified performs either a host-specific or network-only inquiry, based on which IP address is specified. The results of the inquiry reports all routes in the routing table associated with the destination or network ID specified in the inquiry.
The NW TCPIP ROUTE [IPADDRESS] <ipv4 address> MASK <ipv4 address> inquiry locates networks and subnets, in addition to specific hosts. The MASK is applied to the IP address specified to provide selection criteria for the target set of routes to be returned.
The NW TCPIP ROUTE [IPADDRESS] <ipv6 address> / <network-prefix length> inquiry locates networks and subnets in addition to specific hosts. The <network-prefix length> filter is applied to the IP address specified to provide selection criteria for the target set of routes to be returned.
The NW TCPIP ROUTE DEFAULT inquiry returns only the default routes.
The variables are described as follows.
Variable |
Description |
---|---|
<ipv4 address> |
(IPv4 only) The classful host-specific destination IP address of a remote host or network. Made up of a 32-bit (4‑byte) number that includes a network number and a local address. |
<ipv6 address> |
(IPv6 only) A 128-bit (16-byte) number that includes a network prefix and an interface identifier. The interface identifier must be unique within the link. The nodes of an IPv6 address are separated by colons (:). |
<network-prefix length> |
(Optional) The length of the classless network prefix that when applied to the IP address yields the filter criteria used for matching routes to display. |
Inquiring on Default Routes
By using the DEFAULT option of the route inquiry in the following command, only the default routes are returned:
NW TCPIP ROUTE DEFAULT
IPv4 Examples
Display all routes to destination 192.39.50.2.
NW TCPIP ROUTE 192.39.50.2
or
NW TCPIP ROUTE IPADDRESS 192.39.50.2
Display all routes to network 192.39.50.0.
NW TCPIP ROUTE 192.39.50.0 MASK 255.255.255.0
or
NW TCPIP ROUTE 192.39.50.0 /24
Display all routes to supernet 192.39.0.0 /16.
NW TCPIP ROUTE 192.39.50.0 MASK 255.255.0.0
or
NW TCPIP ROUTE 192.39.50.0 /16
Display all default routes.
NW TCPIP ROUTE DEFAULT
IPv6 Examples
Display all routes to network 090F:0:0:0:0:0:0:0.
NW TCPIP ROUTE 090F:0:0:0:0:0:0:0/64
or
NW TCPIP ROUTE 090F::/64
Display all default routes.
NW TCPIP ROUTE DEFAULT