NETSTAT_ROUTE_INFO view
The NETSTAT_ROUTE_INFO view returns information about IPv4 and IPv6 routes.
The values returned for the columns in the view are closely related to the values returned by List Network Routes API. Refer to the API for more detailed information.
Authorization: None required.
The following table describes the columns in the view. The system name is NS_ROUTE. The schema is QSYS2.
Column Name | System Column Name | Data Type | Description |
---|---|---|---|
CONNECTION_TYPE | CONN_TYPE | CHAR(4) | The type of connection.
|
ROUTE_DESTINATION | ROUTE_DEST | VARCHAR(45) | The Internet Protocol address of
the ultimate destination reached by this route. For IPv4:
For IPv6:
|
SUBNET_MASK | SUBNET_MSK | VARCHAR(15) Nullable
|
The actual value of the subnet
mask for the route destination in dotted-decimal notation. A value
of 0.0.0.0 means no value is defined. Contains null if this is an IPv6 connection. |
NEXT_HOP | NEXT_HOP | VARCHAR(45) | The internet address of the first
system on the path from your system to the route destination. For
IPv4:
For IPv6:
Can contain the following special value:
|
PREFIX_LENGTH | PRE_LEN | INTEGER Nullable
|
The prefix length defines how many
bits of the route destination IPv6 address are in the prefix. It specifies
how many of the left-most bits of the address make up the prefix.
The prefix length is used to generate network and host addresses. Contains null if this is an IPv4 connection. |
ROUTE_STATUS | ROUTE_STS | VARCHAR(10) Nullable
|
The current state of the route.
For IPv4:
For IPv6:
Contains null if the state is unknown. |
ROUTE_MAXIMUM_
TRANSMISSION_UNIT |
ROUTE_MTU | VARCHAR(10) | The maximum transmission unit (MTU)
value for this route in bytes. Can be either a number or one of the
following special values: For IPv4:
For IPv6:
|
CONFIGURED_ROUTE_
MAXIMUM_ TRANSMISSION_UNIT |
CFG_RT_MTU | VARCHAR(10) Nullable
|
A number representing the configured
maximum transmission unit (MTU) value for this route, in bytes. Can
be either a number or the following special value:
Contains null if this is an IPv4 connection. |
ROUTE_TYPE | ROUTE_TYPE | VARCHAR(8) Nullable
|
The type of route.
Contains null if the type of route is unknown. |
ROUTE_SOURCE | ROUTE_SRC | VARCHAR(18) Nullable
|
Specifies how this route was added
to the routing table. For IPv4:
For IPv6:
Contains null if the route source is not known. |
SERVICE_TYPE | SRVC_TYPE | VARCHAR(9) Nullable
|
The type of service that defines
how the internet hosts and routers should make trade-offs between
throughput, delay, reliability, and cost.
Contains null if this is an IPv6 connection. |
ROUTE_PROTOCOL | ROUTE_PTCL | VARCHAR(7) Nullable
|
Specifies the protocol that was
used to generate this route.
Contains null if this is an IPv4 connection. |
ROUTE_PREFERENCE | ROUTE_PREF | VARCHAR(6) Nullable
|
The preference of this route during
route selection.
Contains null if this is an IPv4 connection. |
LOCAL_BINDING_TYPE | LOCALTYPE | VARCHAR(7) Nullable
|
The type of line to which this
route is bound.
Contains null if this is an IPv6 connection. |
LOCAL_BINDING_INTERFACE | LOCALIFC | VARCHAR(15) Nullable
|
The IP interface to bind to this
route. Contains null if this is an IPv6 connection. |
LOCAL_BINDING_INTERFACE_
STATUS |
LOCALSTS | VARCHAR(12) Nullable
|
The current status of the logical
interface.
Contains null if this is an IPv6 connection. |
LOCAL_BINDING_NETWORK_
ADDRESS |
LOCALADDR | VARCHAR(15) Nullable
|
The Internet address, in dotted
decimal notation, of the IP network or subnetwork that the interface
is attached to. Contains null if this is an IPv6 connection. |
LOCAL_BINDING_SUBNET_MASK | LOCALMASK | VARCHAR(15) Nullable
|
The subnet mask for the network,
subnet, and host address fields for the local binding network address,
in dotted decimal notation, that defines the subnetwork for an interface. Contains null if this is an IPv6 connection. |
LOCAL_BINDING_LINE_
DESCRIPTION |
LOCALLINE | VARCHAR(10) | The name of the communications
line description or virtual line (L2TP) that identifies the network
associated with an interface. Can contain the following special values:
|
LOCAL_BINDING_LINE_STATUS | LOCALLSTS | VARCHAR(8) Nullable
|
The current operational status
of the communications line to which this route is bound.
Contains null if this is an IPv4 connection. |
LOCAL_BINDING_LINE_TYPE | LOCALLTYPE | VARCHAR(6) | The type of line used by the interface. Only
supported line types are listed here; obsolete values could be returned for inactive
configurations.
Can also contain one of the following special values:
|
LOCAL_BINDING_VIRTUAL_
LAN_ID |
LOCALLAN | VARCHAR(4) | The virtual LAN to which this route
is bound. Can also contain the following special value:
|
ROUTE_PRECEDENCE | ROUTE_PRCD | INTEGER Nullable
|
Priority of route. Values are 1
to 10, with the lowest priority being 1. Contains null if this is an IPv6 connection. |
ROUTE_TEXT | LABEL | VARGRAPHIC(50) CCSID(1200) Nullable
|
Text description associated with
the route. Contains null if there is no description. |
DUPLICATE | DUPLICATE | VARCHAR(6) Nullable
|
Indicates whether this route is
a duplicate of another route in the routing table or not, and also
whether there are any routes which are duplicates of this route.
Contains null if this is an IPv4 connection. |
EXPIRATION | EXPIRATION | TIMESTAMP(0) Nullable
|
The timestamp when this route will
expire or did expire. If the timestamp is in the future, the route
has not expired yet. If the timestamp is in the past, then this route
has expired and is still being returned for a short period of time
to indicate that the route ceased to function because its lifetime
expired. Contains null if this is an IPv4 connection or if the route will never expire. |
PPP_CONFIGURATION_PROFILE | PPPCFGPRF | VARCHAR(10) Nullable
|
The name of the Point-to-Point
Protocol (PPP) configuration profile associated with this route. Contains null if this is an IPv4 connection or if Point-to-Point Protocol is not being used with this route. |
PPP_AUTHENTICATION_USER_ID | PPPAUTUSR | VARCHAR(24) Nullable
|
The Point-to-Point Protocol authentication
user id associated with this route. Contains null if this is an IPv4 connection or if Point-to-Point Protocol is not being used with this route. |
PPP_INTERNET_ADDRESS | PPPINTADD | VARCHAR(45) Nullable
|
The internet address, in IPv6 address
format, to which this Point-to-Point route is bound. Contains null if this is an IPv4 connection or if Point-to-Point Protocol is not being used with this route. |
PPP_DIAL_ON_DEMAND_
PROFILE |
PPPDODPRF | VARCHAR(10) Nullable
|
The name of the Dial-on-demand
Remote Peer Enabled Point-to-Point profile associated with this route. Contains null if this is an IPv4 connection or if Point-to-Point Protocol is not being used with this route. |
LAST_CHANGE_TIMESTAMP | LASTCHG | TIMESTAMP(0) Nullable
|
The timestamp of the most recent
change to this route in the dynamic tables used by the protocol stack. Contains null if the interface has never been changed. |
Example
Return information about all routes which are available for use.
SELECT * FROM QSYS2.NETSTAT_ROUTE_INFO
WHERE ROUTE_STATUS = 'YES' OR ROUTE_STATUS = 'ACTIVE'