OptiConnect and IP Forwarding

IP forwarding and routing allows systems or partitions that are not connected to the same OptiConnect loop to communicate using TCP/IP.

This is accomplished by configuring a unique subnet for each loop, enabling IP forwarding, and routing packets from one subnet to another.

First, use the Change TCP/IP Attributes (CHGTCPA) command to turn on IP forwarding. This will enable forwarding of all packets, not just OptiConnect. Then define routes with the appropriate next hops to allow packets to flow to the desired destinations.

The following example shows how to turn on IP forwarding on System B to allow System A to communicate with System C and System D:

Figure 14. IP forwarding
  1. Define a route to destination 10.0.1.0 with a mask of 255.255.0 and specify 10.0.0.2 as the next hop.
    System A (10.0.0.1):
    ADDTCPIFC INTNETADR('10.0.0.1') LIND(*OPC) SUBNETMASK('255.255.255.0')
    ADDTCPRTE RTEDEST('10.0.1.0') SUBNETMASK('255.255.255.0') NEXTHOP('10.0.0.2')
       
  2. Turn on IP forwarding on System B.
    System B (10.0.0.2 and 10.0.1.2):
    CHGTCPA IPDTGFWD(*YES)
    ADDTCPIFC INTNETADR('10.0.0.2') LIND(*OPC) SUBNETMASK('255.255.255.0')
    ADDTCPIFC INTNETADR('10.0.1.2') LIND(*OPC) SUBNETMASK('255.255.255.0') 
     
  3. On System C and System D, define a route to destination 10.0.0.0 with a mask of 255.255.255.0 and specify 10.0.1.2 as the next hop.
    System C (10.0.1.3):
    ADDTCPIFC INTNETADR('10.0.1.3') LIND(*OPC) SUBNETMASK('255.255.255.0') 
    ADDTCPRTE RTEDEST('10.0.0.0') SUBNETMASK('255.255.255.0') NEXTHOP('10.0.1.2') 
    
    System D (10.0.1.4):
    ADDTCPIFC INTNETADR('10.0.1.4') LIND(*OPC) SUBNETMASK('255.255.255.0') 
    ADDTCPRTE RTEDEST('10.0.0.0') SUBNETMASK('255.255.255.0') NEXTHOP('10.0.1.2')