Example of how to set up standard VIPA

6.10 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 eth0
    [server]# ip link set dev eth0 up
    [server]# ip addr add 10.2.0.2/16 dev eth1
    [server]# ip link set dev eth1 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 eth0
      qethconf: Added 198.51.100.100 to /sys/class/net/eth0/device/vipa/add4.
      qethconf: Use "qethconf vipa list" to check for the result
       [server]# qethconf vipa add 198.51.100.100 eth1
      qethconf: Added 198.51.100.100 to /sys/class/net/eth1/device/vipa/add4.
      qethconf: Use "qethconf vipa list" to check for the result
    • For IPv6, the address is specified in IPv6 format:
      [server]# qethconf vipa add 2002::1235:5678 eth0
      qethconf: Added 2002:0000:0000:0000:0000:0000:1235:5678 to /sys/class/net/eth0/device/vipa/add6.
      qethconf: Use "qethconf vipa list" to check for the result
      [server]# qethconf vipa add 2002::1235:5678 eth1
      qethconf: Added 2002:0000:0000:0000:0000:0000:1235:5678 to /sys/class/net/eth1/device/vipa/add6.
      qethconf: Use "qethconf vipa list" to check for the result
  5. Ensure that the addresses are set:
    [server]# qethconf vipa list
    vipa add 198.51.100.100 eth0
    vipa add 198.51.100.100 eth1
  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