Example of how to set up standard VIPA

Red Hat Enterprise Linux 8.6 LPAR mode z/VM guest

This example shows you how to configure VIPA under static routing, and how to switch adapters when an adapter outage occurs.

About this task

Figure 1 shows the network adapter configuration that is used in the example.
Figure 1. Example of using Virtual IP Address (VIPA)
This graphic is described in the text that follows.

Procedure

  1. Define the real interfaces.
    [server]# ip addr add 10.1.0.2/16 dev encf500
    [server]# ip link set dev encf500 up
    [server]# ip addr add 10.2.0.2/16 dev ence400
    [server]# ip link set dev ence400 up
  2. If the dummy component was not compiled into the kernel, ensure that the dummy module was loaded.
    If necessary, load it by issuing:
    [server]# modprobe dummy
  3. Create a dummy interface with a virtual IP address 198.51.100.100 and a netmask 255.255.255.0:
     [server]# ip addr add 198.51.100.100/24 dev dummy0
     [server]# ip link set dev dummy0 up
  4. Enable the network devices for this VIPA so that it accepts packets for this IP address.
    • IPv4 example:
       [server]# qethconf vipa add 198.51.100.100 encf500
      qethconf: Added 198.51.100.100 to /sys/class/net/encf500/device/vipa/add4.
      qethconf: For verification please use "qethconf ipa list"
       [server]# qethconf vipa add 198.51.100.100 ence400
      qethconf: Added 198.51.100.100 to /sys/class/net/ence400/device/vipa/add4.
      qethconf: For verification please use "qethconf ipa list"
    • For IPv6, the address is specified in IPv6 format:
      [server]# qethconf vipa add 2002::1235:5678 encf500
      qethconf: Added 2002:0000:0000:0000:0000:0000:1235:5678 to 
                /sys/class/net/encf500/device/vipa/add6.
      qethconf: For verification please use "qethconf ipa list"
      [server]# qethconf vipa add 2002::1235:5678 ence400
      qethconf: Added 2002:0000:0000:0000:0000:0000:1235:5678 to 
                /sys/class/net/ence400/device/vipa/add6.
      qethconf: For verification please use "qethconf ipa list"
  5. Ensure that the addresses are set:
    [server]# qethconf vipa list
    vipa add 198.51.100.100 encf500
    vipa add 198.51.100.100 ence400
  6. Ensure that your service (such as the Apache web server) listens to the virtual IP address.
  7. Set up a route to the virtual IP address (static routing) so that VIPA can be reached through the gateway with address 10.1.0.2.
     [router]# ip route add 198.51.100.100 via 10.1.0.2

What to do next

Now assume that an adapter outage occurs. You must then:
  1. Delete the previously created route.
     [router]# ip route del 198.51.100.100
  2. Create the alternative route to the virtual IP address.
    [router]# ip route add 198.51.100.100 via 10.2.0.2