Netstat Gate/-g report

Displays the IPv4 routing information that this stack uses when it determines what addresses it can communicate with and over which links and first hops the communication takes place. The routes in the stack routing table can be static routes (those defined in the TCP/IP profile), routes learned from routing daemons, and routes learned by other ICMP information, such as redirects. If there is not a route that covers the destination IP address and if there is no DEFAULT route defined, then this stack cannot communicate with that destination. Multiple routes to the same destination, referred to as multipath routes, are also displayed. If multipath is not enabled on the IPCONFIG statement, then the first active route to the destination is always used.

TSO syntax

Read syntax diagramSkip visual syntax diagram
>>-NETSTAT Gate----| Modifier |--| Target |--| Output |--| (Filter |---><

Modifier

Read syntax diagramSkip visual syntax diagram
>>-DETAIL------------------------------------------------------><

DETAIL
Displays the general IPv4 routing information, the metric or cost of use for the route, and the MVS™ specific configured parameters for each route.

Target

Provide the report for a specific TCP/IP address space by using TCp tcpname. See The Netstat command target for more information about the TCp parameter.

Output

The default output option displays the output on the user's terminal. For other options, see The TSO NETSTAT command syntax or Netstat command output.

Filter

Read syntax diagramSkip visual syntax diagram
           .-----------------------.   
           V                       |   
>>-IPAddr----+-ipaddr------------+-+---------------------------><
             '-ipaddr/subnetmask-'     

z/OS UNIX syntax

Read syntax diagramSkip visual syntax diagram
>>-netstat -g----| Modifier |--| Target |--| Output |--| Filter |---><

Modifier

Read syntax diagramSkip visual syntax diagram
>>-DETAIL------------------------------------------------------><

DETAIL
Displays the general IPv4 routing information, plus the metric or cost of use for the route, and the MVS specific configured parameters for each route.

Target

Provide the report for a specific TCP/IP address space by using -p tcpname. See The Netstat command target for more information about the TCp parameter.

Output

The default output option displays the output to z/OS UNIX shell stdout. For other options, see The z/OS UNIX netstat command syntax or Netstat command output.

Filter

Read syntax diagramSkip visual syntax diagram
        .-----------------------.   
        V                       |   
>>- -I----+-ipaddr------------+-+------------------------------><
          '-ipaddr/subnetmask-'     

Filter description

IPAddr/-I ipaddripaddr/subnetmask
Filter the report output using the specified IP address ipaddr or ipaddr/subnetmask. You can enter up to six filter values. Each specified IPv4 ipaddr value can be up to 15 characters in length.
ipaddr
Filter the output of the Gate/-g report using the specified IP address ipaddr. The default subnet mask is 255.255.255.255.
ipaddr/subnetmask
Filter the output of the Gate/-g report using the specified IP address and subnet mask ipaddr/subnetmask.

The IPAddr/-I filter value can be a complete string or a partial string using wildcard characters. A wildcard character can be an asterisk (*), which matches a null string or any character or character string, at the same position. A wildcard character can be a question mark (?), which matches any single character at the same position. For example, a string "searchee" matches with "*ar?he*", but the string "searhee" does not match with "*ar?he*". If you want to use the wildcard character on the IPAddr/-I filter, you must specify the value in the ipaddr format. The wildcard character is not accepted for the ipaddr/subnetmask format of IPAddr/-I values.

When you use z/OS UNIX netstat/onetstat command in a z/OS UNIX shell environment, take care if you use a z/OS UNIX MVS special character in a character string. It might cause an unpredictable result. To be safe, if you want to use a z/OS UNIX MVS special character in a character string, surround the character string with single (') or double (") quotation marks. For example, to use an asterisk (*) in the IP address, 10.*.0.0 for the -I filter, issue the command as: netstat -g -I '10.*.0.0' or netstat -g -I "10.*.0.0".

Note:
  1. The filter value ipaddr is the destination IP address; it is not the destination network address.
  2. When filtering Gate/-g responses on a specified IP address, the DEFAULT and DEFAULTNET routes are not displayed.

Command syntax examples

From TSO environment

NETSTAT GATE
   Display the routing information the default stack will use when it determines what 
   addresses it can communicate with and over which links/interfaces and first hops the 
   communication will take place.
NETSTAT GATE TCP TCPCS6
   Display the routing information the TCPCS6 stack will use when it determines what 
   addresses it can communicate with and over which links/interfaces and first hops the 
   communication will take place. 
NETSTAT GATE TCP TCPCS8 (IPADDR 9.43.1.1 9.43.2.2
   Display the routing information in the TCPCS8 stack whose destination address match
   the specified filter IP address values.

From UNIX shell environment

   netstat -g
   netstat -g -p tcpcs6 
   netstat -g -p tcpcs8 -I 9.43.1.1 9.43.2.2

Report examples

The following examples are generated by using TSO NETSTAT command. Using the z/OS UNIX netstat command displays the data in the same format as the TSO NETSTAT command.

NETSTAT GATE
MVS TCP/IP NETSTAT CS V2R1       TCPIP Name: TCPCS           14:50:17       
Known gateways:                                                              
NetAddress      FirstHop        Link     Pkt Sz Subnet Mask     Subnet Value 
----------      --------        ----     ------ -----------     ------------ 
Default         9.67.113.1      TR1      576    <none>
9.67.1.9        <direct>        OSA00LIN 0      HOST
9.0.0.0         <direct>        TR1      576    0.255.255.128   0.67.113.0
9.67.113.43     <direct>        TR1      17914  HOST
127.0.0.1       <direct         LOOPBACK 65535  HOST
198.11.25.104   198.11.22.109   LMCH2IT2 26624  HOST
201.2.10.31     <direct>        VIPLC902 65535  HOST
NETSTAT GATE DETAIL
MVS TCP/IP NETSTAT CS V2R1       TCPIP Name: TCPCS           14:50:17       
Known gateways:                                                              
NetAddress      FirstHop        Link     Pkt Sz Subnet Mask     Subnet Value 
----------      --------        ----     ------ -----------     ------------ 
Default         9.67.113.1      TR1      576    <none>
  Metric:  00000000  Flags: UHS                            
  MVS Specific Configured parameters:                      
    MaxReTransmitTime:  120.000   MinReTransmitTime: 0.500 
    RoundTripGain:      0.125     VarianceGain:      0.250 
    VarianceMultiplier: 2.000                              
.....

Report field descriptions

NetAddress
The address of the network. This is the network portion of the destination address of the route. If the route is for a Class A address, then this field contains only the first portion of the address because the class A net mask is 255.0.0.0. If the route is for a Class B address, then this field contains the first half of the address because the class B net mask is 255.255.0.0. If the route is for a Class C route, then this field contains the first 3 parts of the address because the class C net mask is 255.255.255.0.
FirstHop
The first hop address used to send packets to the destination. If <direct>, then the destination is directly reachable without needing to go through a gateway.
Link
The link or interface name for the route.

Restriction: Only the first eight characters of the link or interface name are displayed by this command. Issue the NETSTAT ROUTE command to display more than eight characters of the link or interface name.

Pkt Sz
This value is the largest packet size that can be sent using this route. If the packet is larger than this size, the packet will have to be fragmented if fragmentation is permitted. If fragmentation is not permitted, the packet would be dropped and an ICMP error would be returned to the originator of the packet.
Subnet Mask
The subnet mask of the network. This is the subnet-only mask for the route. It does not include the class net mask. For example, if the route was for 9.67.114.0 with a net mask of 255.255.255.0 the subnet mask would be 0.255.255.0 because you would not include the class A net mask. Valid values for this field include:
Dotted Decimal Value
This is the subnet-only portion of the net mask. If you take the route's net mask and remove the class mask from it, you are left with the subnet-only portion of the displayed net mask. If you combine the class mask with this field you get the complete net mask for this route entry.
<none>
If this field contains <none>, then this is a network route and the net mask is the class mask for the route destination.
REDIRECT_HOST
This means that this route is for a HOST entry and was learned by an ICMP redirect. The subnet mask would be 255.255.255.255.
HOST
This means that this route is for a HOST entry. The subnet mask would be 255.255.255.255.
Subnet Value
The subnet value of the network. This is the subnet portion of the route's destination address. It does not contain the network portion that was displayed in the Address of the network. Valid values for this field include:
Dotted Decimal Value
This is the subnet/host portion of the route's destination address. If you combine this field with the value in Address of the network, you get the complete route destination address.
blank
If this field is blank, then this is a network route and the subnet/host portion of the route destination address is zero.
Metric
This value displays the metric of the route. For static routes, all direct routes will have a metric of 0 and indirect routes will have a metric of 1. If the routes were learned from a routing daemon, then the metric displayed would be the metric set by the routing daemon. Once the routes are in the stack routing table, the metric field is not used. The routing daemons use metrics to compare routes and inform the stack only of the route or routes that have the best metric.
Flags
Identifies the state of the route and can have the following values:
U
The route is up.
H
The route is to a host rather than to a network.
G
The route uses a gateway.

The following flags are mutually exclusive:

C
The route was created by a connection (not using a definition or a routing protocol). Routes to subnets or point-to-point destinations using interfaces over which OMPROUTE is active but has not yet established a routing protocol are considered connection routes.
D
The route was created dynamically by ICMP processing.
O
The route was created by OSPF (includes OSPF external routes).
R
The route was created by RIP.
S
The route is a static route not replaceable by a routing daemon.
Z
The route is a static route replaceable by dynamic routes learned by OMPROUTE.
Maximum retransmit time
The TCP retransmission interval for this route. If this parameter was not specified on the GATEWAY statement, the default value of 120 seconds is displayed. This parameter does not affect initial connection retransmission.
Minimum retransmit time
The minimum retransmit interval for this route. If this parameter was not specified on the GATEWAY statement, the default value of 0.5 (500 milliseconds) seconds is displayed.
Round trip gain
This value is the percentage of the latest round trip time (RTT) to be applied to the smoothed RTT average. The higher this value, the more influence the latest packet RTT has on the average. If this parameter was not specified on the GATEWAY statement, the default value of 0.125 is displayed. This parameter does not affect initial connection retransmission.
Variance gain
This value is the percentage of the latest RTT variance from the RTT average to be applied to the RTT variance average. The higher this value, the more influence the latest packet's RTT has on the variance average. If this parameter was not specified on the GATEWAY statement, the default value of 0.25 is displayed. This parameter does not affect initial connection retransmission.
Variance multiplier
This value is multiplied against the RTT variance in calculating the retransmission interval. The higher this value, the more effect variation in RTT has on calculating the retransmission interval. If this parameter was not specified on the GATEWAY statement, the default value of 2 is displayed. This parameter does not affect initial connection retransmission.