Example: virtual switch with HiperSockets devices and VNIC characteristics

Configure HiperSockets™ based virtual switches with VNIC characteristics.

About this task

This example creates virtual switch, vs_hs0. Because HiperSockets do not use adapter hardware that might constitute a single point of failure, a single uplink interface is sufficient.
Figure 1. Virtual switch with HiperSockets

Virtual switch with HiperSockets typically use a single uplink interface

Figure 1 shows the virtual switch with just one port which connects to the HiperSockets interface. When virtual server connect to the switch, libvirt automatically creates the required switch ports.

In the example, the KVM host in LPAR A uses the HiperSockets connection to communicate with LPAR B, which connects to an external network. An availability setup for the connection from LPAR B to the external network is outside the scope of the KVM host configuration.

Procedure

  1. Verify that the VNIC characteristics of the HiperSockets devices include flooding and learning.
    # lszdev 0.0.5b11 --info
    ...
    ATTRIBUTE                ACTIVE    PERSISTENT
    ...
    vnicc/bridge_invisible   "0"        -
    vnicc/flooding           "0"        -
    vnicc/learning           "0"        -
    vnicc/learning_timeout   "0"        -
    vnicc/mcast_flooding     "0"        -
    vnicc/rx_bcast           "1"        -
    vnicc/takeover_learning  "0"        -
    vnicc/takeover_setvmac   "0"        -
    Configure the device, if necessary.
    # chzdev 0.0.5b11 vnicc/flooding=1 vnicc/learning=1 vnicc/learning_timeout=600 \
    vnicc/mcast_flooding=1 vnicc/takeover_learning=1 vnicc/takeover_setvmac=1
    # lszdev 0.0.5b11 --info
    ...
    ATTRIBUTE                ACTIVE    PERSISTENT
    ...
    vnicc/bridge_invisible   "0"        "0"
    vnicc/flooding           "1"        "1"
    vnicc/learning           "1"        "1"
    vnicc/learning_timeout   "600"      "600"
    vnicc/mcast_flooding     "1"        "1"
    vnicc/rx_bcast           "1"        "1"
    vnicc/takeover_learning  "1"        "1"
    vnicc/takeover_setvmac   "1"        "1"
  2. Create the virtual switch.
    # ovs-vsctl add-br vs_hs0
    # ovs-vsctl show
    ...
        Bridge "vs_hs0"
            Port "vs_hs0"
                Interface "vs_hs0"
                    type: internal
        ovs_version: ...
  3. Create an uplink port.
    # ovs-vsctl add-port vs_hs0 enc5b11
    # ovs-vsctl show
    ...
       Bridge "vs_hs0"
            Port "enc5b11"
                Interface "enc5b11"
            Port "vs_hs0"
                Interface "vs_hs0"
                    type: internal
    ...