TCP/IP Routing

You can also route traffic to your logical partitions through your iSeries™ server with various routing techniques.

This solution is not difficult to configure on your iSeries but depending on the topology of your network, it may not be practical to implement. Consider the following pre-V5R3 figure:


Illustrated example of TCP/IP Routing.

The existing TCP/IP interface (10.1.1.2) connects to the LAN. The LAN is connected to remote networks with a router. The Linux TCP/IP interface is addressed as 10.1.10.2 and the virtual Ethernet TCP/IP interface as 10.1.10.1. In i5/OS®, if you turn on IP Datagram Forwarding, the iSeries will route the IP packets to and from the logical partition. When you define your Linux TCP/IP connection, the router address must be 10.1.10.1.

The difficulty of this type of routing is getting the IP packets to the iSeries. In this scenario, you could define a route on the router so that it passes packets destined to the 10.1.10.0 network to the 10.1.1.2 interface. That works great for remote network clients. It would also work for the local LAN clients (clients connected to the same LAN as the iSeries) if they recognize that same router as their next hop. If they do not, then each client must have a route that directs 10.1.10.0 traffic to the iSeries 10.1.1.2 interface; therein starts the impracticability of this method. If you have hundreds of LAN clients, then you have to define hundreds of routes.

To configure a setup similar to this, use the following instructions:
  1. During the configuration of your logical partition, make sure you selected to create virtual Ethernet. See Configure a logical partitionfor more information.
  2. Create an Ethernet line description for virtual Ethernet. Note the port of the hardware resource, because you will need it when you set up TCP/IP in your logical partition. In the case of the above example, assume the hardware resource is CMN05 with a port of 0 and although arbitrary, the line description name is VETH0. CRTLINETH LIND(VETH0) RSRCNAME(CMN05) LINESPEED(1G) DUPLEX(*FULL)
  3. Add a TCP/IP Interface for your virtual line description. Following the example, you could use: ADDTCPIFC INTNETADR('10.1.10.1') LIND('VETH0') SUBNETMASK ('255.255.255.0')

    Start your new TCP/IP interface using the command STRTCPIFC INTNETADR (yourIPaddress) or STRTCPIFC INTNETADR('10.1.10.1') for the example.

  4. On your logical partition, set up networking using the instructions or tools provided by your Linux distribution. Be sure to use the correct IP address, subnet mask, port, and gateway IP address.

    During the TCP/IP setup in Linux, you will need to know your net or network device. If you are running a 32-bit kernel version of 2.4.9 or less, the network device is VETH plus the port number from when you configured an Ethernet line description. If you are running a 64-bit kernel or a 32-bit kernel greater than or equal to 2.4.10, the network device is ETH plus the port number. See Create an Ethernet line description for virtual Ethernet for more information. In the example:

    • the interface IP address is 10.1.10.2
    • the subnet mask is 255.255.255.0
    • the gateway IP address is 10.1.10.1
    • the network device is VETH0 or ETH0 depending on the kernel version.
  5. Turn on IP datagram forwarding. This allows the i5/OS TCP/IP interfaces to pass IP packets between each other. CHGTCPA IPDTGFWD(*YES)