Networking on z/OS
Previous topic | Next topic | Contents | Glossary | Contact z/OS | PDF


Network routing

Networking on z/OS

See the latest information on:

The purpose of this example is to continue the discussion of how layer 3 functions in an IP network.

Figure 1 introduces several new terms, but it also provides you with a graphical representation of some of the topics discussed earlier. This drawing is not intended to be representative of good network design.

Figure 1. Routed networkRouted network

Figure 1 contains two LAN segments. The upper LAN segment, in yellow, represents a simple network comprised of several workstations. The yellow area represents the scope of an ARP broadcast; the three workstations and one of the NICs on the router are all considered to be on a single LAN segment.

The green shading on the lower half of the drawing represents a separate LAN segment. This LAN has been extended using a network switch (or a bridge) to allow separate LAN segments to function as one large, contiguous segment. In order for the router to be part of the LAN segment, it will be using a second NIC.

So how does computer W (at the top of the drawing) send an IP packet to the z/OS host on a different LAN segment at the lower corner of the drawing? The answer is that it must use an IP route to get there.

IP routes

The IP route is the direction sign of internets, and hence of the Internet itself. An IP route consists of simply a mapping of a destination IP address or network to a next hop and interface. The routes are collected into a routing table. Each time an IP packet needs to be sent from a host, the routing table is consulted for information about where next to send the packet. To illustrate this, Figure 3 has been updated to contain a few IP addresses, resulting in Figure 2.

Figure 2. Routed network with IP addressesRouted network with IP addresses

Starting with a simple example, host W's routing table in Figure 2 would look similar to what's shown in Figure 3.

Figure 3. Sample workstation routing table
 Destination         Gateway         Interface
 -----------         -------         --------
 10.1.1.0/24         Direct          10.1.1.4
 Default             10.1.1.1        10.1.1.4

In Figure 3, the first line tells us that to reach hosts on the 10.1.1.0 network (masking with 24 bits), there is no need to use a router because the hosts for that network are directly attached to the same network as this host.

The second line says that to reach any other host, send the packet to the router at 10.1.1.1. This is referred to as a default route, and the assumption here is that once the packet reaches 10.1.1.1, that host will know which hop is next. (Remember, the IP layer is not reliable; it does not ensure delivery of a packet.)

Network masks: How did we arrive at 10.1.1.0/24 denoting a network? The 24 refers to the number of bits in the network ID portion, which corresponds to the first three octets. However, to illustrate network masking properly, a more subtle example should be used.

How about a network ID such as 201.2.10.192, with a 26-bit mask value? An octet of 255 is easy to figure out: 255 is all binary 1's, so the logical AND retains all network or subnetwork bits (we can call this the network ID, and ignore the arbitrary term "subnetwork"). But what about that last octet, where we are using a mask of 192?

First, we should confirm what our network ID really is:

Mask: 255.255.255.192 11111111.11111111.11111111.11000000

Address: 201.002.010.192 11001001.00000010.00001010.11000000

Network ID: 201.002.010.192 11001001.00000010.00001010.11000000

Now we've confirmed that the network ID in our last octet is 11000000. This means our first IP address (the beginning of our range) is 11000001, or 193 in the last octet. Our last host address (the end of our range) is 11111110, or 254 in the last octet. We cannot have a host address of all 1's, since this is reserved for broadcast, so 11111111 or 255 is excluded. The eligible IP address range is from 201.2.10.193 to 201.2.10.254.

Returning to Figure 2, note some of the changes. The yellow and green areas are no longer labelled as ARP broadcast areas. Instead, they are referred to as IP networks. The yellow area has been given a network ID of 10.1.1.0 and the green area 10.1.2.0. Both networks have a mask value of 24 bits, or 255.255.255.0. Workstation W has an IP address of 10.1.1.4, which is within the yellow area's network ID. The z/OS host is within network ID 10.1.2.0 with IP address 10.1.2.5.

But how can we simply change an ARP broadcast area (that is, a LAN segment) into an IP network? The answer is in how the transition from layer 3 (IP layer) addressing to layer 2 (MAC in the link layer) addressing is performed.

Remember the 10.1.1.0/24 route from workstation W's routing table? This was referred to as a direct route. It is a route that informs the IP layer that IP addresses for this network ID are to be found directly attached to the LAN segment. It is here that a transition occurs; when the routing table indicates a packet should be sent to the directly-attached network, this is an indication that an ARP broadcast should be sent out to determine the MAC address of the destination host.

The result is that a given network ID must not span more than one ARP area. Once a host is reached that has a route indicating the destination is directly attached, an ARP broadcast will been sent out to request the MAC address of the destination host.

ARP responses are cached locally so that an ARP request does not need to flow every time a packet is sent to a destination host.





Copyright IBM Corporation 1990, 2010