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.

The following table describes the columns in the view. The system name is NS_ROUTE. The schema is QSYS2.

Table 1. NETSTAT_ROUTE_INFO view
Column Name System Column Name Data Type Description
CONNECTION_TYPE CONN_TYPE CHAR(4) The type of connection.
IPV4
The connection is an IPv4 connection.
IPV6
The connection is an IPv6 connection.
ROUTE_DESTINATION ROUTE_DEST VARCHAR(45) The Internet Protocol address of the ultimate destination reached by this route.
For IPv4:
  • The address is in IPv4 address format. When used in combination with the subnet mask and the type of service values, the route destination identifies a route to a network or system. A value of 0.0.0.0 means that the route destination is the default route.
For IPv6:
  • The address is in IPv6 address format. When used in combination with the prefix length, the route destination identifies a route to a network or host.
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:
  • The address is in IPv4 address format.
For IPv6:
  • The address is in IPv6 address format.
Can contain the following special value:
*DIRECT
This is the next hop value of a route that is automatically created.
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.
DOD
This route is used for Point-to-Point (PPP) Dial-on-Demand. Currently, this Dial-on-Demand route is not available. The route will become available when a Dial-on-Demand session is initiated for the interface this route is associated with.
For IPv4:
YES
The router specified by the next hop value for this interface is available for use.
NO
The router specified by the next hop value for this interface is not available for use.
NO GATEWAY
The router specified by the next hop value for this interface is not available for use, the router may be experiencing a problem.
For IPv6:
ACTIVE
This route is currently active and is in the current route search path.
INACTIVE
This route is not in the route search path and is not being used.

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:
IFC
The route is not currently active and the MTU was specified as *IFC.
OTHER
An Internet Protocol (IP) over SNA interface.
For IPv6:
*IP6LINMTU
This route uses the MTU of the line it is bound to.
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:
*IP6LINMTU
The route MTU was specified as *IP6LINMTU, the MTU value of the line to which this route is bound.

Contains null if this is an IPv4 connection.

ROUTE_TYPE ROUTE_TYPE VARCHAR(8)
Nullable
The type of route.
DFTROUTE
A default route.
DIRECT
A route to a network or subnetwork to which this system has a direct physical connection.
HOST
A route to a specific remote host.
NET
An indirect route to a remote network.
SUBNET
An indirect route to a remote subnetwork. This option is only for IPv4 connections.

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:
CFG
The route was added using the configuration commands of the local system.
ICMP
The route was added with the Internet Control Message Protocol (ICMP) redirect mechanism.
OTHER
The route was added with a sockets input/output control (IOCtl) or other mechanism.
RIP
The route was added by the Routing Information Protocol (RIP).
SNMP
The route was added by the Simple Network Management Protocol (SNMP).
For IPv6:
AUTOCONFIG
This route was added because of an interface added by stateless autoconfiguration.
BGP
This route was added by the Border Gateway Protocol (BGP).
CFGIFC
The route was added because of a manually configured interface.
CFGRTE
The route was manually configured.
IDRP
This route was added by the Inter-Domain Routing Protocol (IDRP).
IGRP
This route was added by the Interior Gateway Routing Protocol (IGRP).
OSPF
The route was added by the Open Shortest Path First (OSPF) protocol.
RA_PREFIX_INFO
This route was added because of the presence of a Prefix Information Option on a Router Advertisement packet received by the system.
RA_ROUTE_INFO
This route was added because of the presence of a Route Information Option on a Router Advertisement packet received by the system.
RA_ROUTER_LIFETIME
This route was added because of the presence of a non-zero value in the Router Lifetime field in a Router Advertisement packet received by the system.
REDIRECT
This route was added by the ICMPv6 redirect mechanism.
RIP
The route was added by the Routing Information Protocol (RIP).
ROUTING
This route was determined to be necessary and added by the TCP/IP stack on this system.
SNMP
This route was added by the Simple Network Management Protocol (SNMP).

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.
MAXRLB
A higher level of effort to ensure delivery is important for datagrams with the maximize reliability indication.
MAXTHRPUT
High data rate is important for datagrams with the maximize throughput indication.
MINCOST
Lower cost is important for datagrams with the minimize monetary cost indication.
MINDELAY
Prompt delivery is important for datagrams with the minimize delay indication.
NORMAL
Normal service is used for delivery of datagrams.
OTHER
An Internet Protocol (IP) over SNA interface.

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.
BGP
Border Gateway protocol.
IDRP
InterDomain Routing protocol.
IGRP
InterGateway Routing protocol.
LOCAL
Local configuration.
NDISC
Neighbor discovery.
NETMGMT
Network Management protocol.
OSPF
Open Shortest Path First protocol.
OTHER
None of the listed protocols.
RIP
Routing Information protocol.

Contains null if this is an IPv4 connection.

ROUTE_PREFERENCE ROUTE_PREF VARCHAR(6)
Nullable
The preference of this route during route selection.
LOW
This route has a low preference.
MEDIUM
This route has a medium preference.
HIGH
This route has a high preference.

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.
  • DYNAMIC
  • STATIC

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.
ACTIVE
The interface has been started and is running.
DOD
This interface is being used for Point-to-Point (PPP) Dial-on-Demand.
DUPLICATE
Another host on the LAN responded to a packet destined for this logical interface.
ENDING
The operating system is processing the request to end this interface.
FAILED
The line description associated with this interface has entered the failed state.
FAILED (TCP)
An error was detected in the IBM TCP/IP Licensed Internal Code.
INACTIVE
The interface has not been started.
RCYCNL
A hardware failure has occurred and the line description associated with this interface is in the recovery canceled (RCYCNL) state.
RCYPND
An error with the physical line associated with this interface was detected by the system. The line description associated with this interface is in the recovery pending (RCYPND) state.
STARTING
The operating system is processing the request to start this 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:
*LOOPBACK
This is a loopback interface. Processing associated with the loopback interface does not extend to a physical line.
*OPC
This interface is attached to the optical bus (OptiConnect).
*VIRTUALIP
The virtual interface is a circuitless interface.
LOCAL_BINDING_LINE_STATUS LOCALLSTS VARCHAR(8)
Nullable
The current operational status of the communications line to which this route is bound.
ACTIVE
The line is operational.
FAILED
The desired state of the line is Active, but it is currently in the Inactive state.
INACTIVE
The line is not operational.

Contains null if this is an IPv4 connection.

LOCAL_BINDING_LINE_TYPE LOCALLTYPE VARCHAR(6) The type of line used by the interface.
ASYNC
Asynchronous communications protocol.
DDI
Distributed Data Interface protocol.
ELAN
Ethernet local area network protocol.
FR
Frame relay network protocol.
L2TP
Layer Two Tunneling protocol.
PPP
Point-to-Point protocol.
PPPOE
Point-to-Point over Ethernet protocol.
TDLC
Twinaxial Datalink Control. Used for TCP/IP over Twinax.
TRLAN
Token-ring local area network protocol.
VETH
Virtual Ethernet protocol.
WLS
Wireless local area network protocol.
X25
X.25 protocol.

Can also contain one of the following special values:

ERROR
A system error other than those for NOTFND was received while trying to determine the link type for an interface.
NONE
Line is not defined. This value is used for the following interfaces: *LOOPBACK, *VIRTUALIP, *OPC. There is no line type value for this interface.
NOTFND
Not found. The line description object for this interface cannot be found.
OTHER
An Internet Protocol (IP) over SNA interface.
LOCAL_BINDING_VIRTUAL_
LAN_ID
LOCALLAN VARCHAR(4) The virtual LAN to which this route is bound. Can also contain the following special value:
NONE
No virtual LAN identifier is associated with the binding line.
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.
NO
This route is not a duplicate of another route but it does have duplicates.
UNIQUE
This route is not a duplicate of another route and it does not have any duplicates.
YES
This route is a duplicate of another 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'