I struggled with the output of the TSO NETSTAT ROUTE command.
Below is an example from my system. The IBM documentation is here
IPv6 Destinations DestIP: Default Gw: 2001:db8:1::3 Intf: IFPORTCP6 Refcnt: 0000000000 Flgs: UGS MTU: 1492 DestIP: ::1/128 Gw: :: Intf: LOOPBACK6 Refcnt: 0000000000 Flgs: UH MTU: 65535 DestIP: 2001:db8::/64 Gw: :: Intf: IFPORTCP6 Refcnt: 0000000000 Flgs: US MTU: 5000 DestIP: 2001:db8:1::/64 Gw: :: Intf: IFPORTCP6 Refcnt: 0000000000 Flgs: UD MTU: 9000 DestIP: 2001:db8:1::3/128 Gw: :: Intf: IFPORTCP6 Refcnt: 0000000000 Flgs: UHS MTU: 5000
DestIP: Default this is statically set up with default6
Gw: 2001:db8:1::3 This is (one of) the IP address at the remote end of the connection.
Intf: IFPORTCP6 The z/OS interface name is IFPORTCP6
The flags are
U – The route is up.
G – The route uses a gateway.
H – The route is to a host rather than to a network.
S – The route is a static route not replaceable by a routing daemon or router advertisements (IPv6).
D – The route was created dynamically by ICMP processing or router advertisements (IPv6) (possibly OMPROUTE).
DestIP: 2001:db8::/64 This is for IP addresses 2001:0DB8:0000:0000:something there are 64 bits in the significant part of the address. This applies to 2001:0DB8:0:0:0:0:0:99 and 2001:0DB8:0:0:FFFF:0:0:99 for example
DestIP: 2001:db8:1::3/128 This says all 128 bits are significant in the address. This is the 2001:db8:0:0:0:0:0:3 and no other address.
RefCnt Reference count – the current number of active users for the route. See below.
Where does an entry come from?
- An entry can be statically configured between BEGINRoutes… ENDoutes.
- An entry can be dynamically configured from an adjacent system. For example
- a prefix entry when using radvd – this defines IP address ranges into or through the z/OS host
- a route entry when using radvd, this defines IP address ranges going off the host, to the other end of the connection.
- An entry be generated dynamically from OSPF and RIP. On z/OS these are usually configured with the OMPROUTE address space. See below.
A statically defined entry has an S in the Flgs
A dynamic entry has a D in the Flgs -sometimes – see below.
Why does Gw: sometimes have a value?
Gw: has a value when
- it was specified in the static definitions
- the DestIP entry was created dynamically, for example as a route …{} statement in radvd. This is an output entry, so the Gw: is part of the definition.
Note: a radvd prefix… {} entry is inbound, so the gateway is irrelevant.
I see this as it is only relevant for connections out of z/OS. When traffic comes into the host, you do not care which gateway it came from.
What does refcnt mean for a DestIP?
The documentation it says “Reference count (RefCnt): The current number of active users for the route.”
When I pinged z/OS ten times from 2001:db8::7, the RefCnt for DestIP: 2001:db8::/80 increased by 10.
When I pinged z/OS ten times from another address, the RefCnt values were unchanged.
Issuing a traceroute to the system did not increment any values.
I could find no active connections to this interface, so all in all this field is bit of a mystery.
The Linux documentation says The reference count (i.e. attached processes via this socket), so the z/OS meaning may be a partial historical count of usage rather than the number of active users.
What is the default value?
This was a surprise. I had defined a static route using default6, and this was in the netstat route display output.
When I used
tso netstat route radv
to display the routes added via Router Advertisement it gave me a list including a Default.
IPv6 Destinations DestIP: Default Gw: fe80::dce0:8fff:fe42:127f Intf: IFPORTCP6 MTU: 0 DestIP: 2001:db8::/80 Gw: fe80::dce0:8fff:fe42:127f Intf: IFPORTCP6 MTU: 0 DestIP: 2001:db8:0:0:1::/80 Gw: :: Intf: IFPORTCP6 MTU: 0 DestIP: 2001:db9::/32 Gw: fe80::dce0:8fff:fe42:127f Intf: IFPORTCP6 MTU: 0 DestIP: 2002:db8::/64 Gw: fe80::dce0:8fff:fe42:127f Intf: IFPORTCP6 MTU: 0
If the Router Advertisment data has AdvDefaultLifetime > 0 for the interface then a “Default” is generated, else no default is generated.
The wireshark trace has
Internet Control Message Protocol v6 Type: Router Advertisement (134) ... Cur hop limit: 64 Flags: 0xc0, Managed address configuration, ... Router lifetime (s): 0
The MTU value is what was passed in via the RA data. Change this value in the radvd configuration, and the z/OS value changes.
When I removed my statically defined default6, this default became active with
DestIP: Default Gw: fe80::dce0:8fff:fe42:127f Intf: IFPORTCP6 Refcnt: 0000000000 Flgs: UGD MTU: 9000
Note: It seems you can have only one active Default, even with IPCONIG6 MULIPATH option. I do not know which default becomes active if you have more than one dynamically defined
The detail option
If you use TSO NETSTAT ROUTE DETAIL you get additional information.
Metric: 00000001 MVS Specific Configured Parameters: MaxReTransmitTime: 120.000 MinReTransmitTime: 0.500 RoundTripGain: 0.125 VarianceGain: 0.250 VarianceMultiplier: 2.000 DelayAcks: Yes d
These numbers look like defaults, and I got them even when not traffic had flowed over the connection.
OMPROUTE
OMPROUTE can
- Provides some “dynamic” information about default IP6 routes
- It listens to messages from other routers, and can update the routing tables
Sometimes
Without OMPROUTE, routes that were dynamically created, for example using radvd on Linx, which broadcast z/OS address ranges to z/OS, and advertised “come to me for these address ranges”.
These could be seen as Dynamic, for example the D in UD below.
DestIP: 2001:db8:1::/64
Gw: ::
Intf: IFPORTCP6 Refcnt: 0000000000
Flgs: UD MTU: 9000
If you start OMPROUTE, the “Dynamic address” now come out as “C”
DestIP: 2001:db8:1::/64 Gw: :: Intf: IFPORTCP6 Refcnt: 0000000000 Flgs: UC MTU: 9000