Link Aggregation

Getting Started with Napatech Link-Virtualization™ Software

Platform
Napatech SmartNIC
Content Type
Getting Started Guide
Capture Software Version
Link-Virtualization™ Software 4.4

Create redundancy by defining a LAG port, and simulate a link failure to test the solution.

About this task

We provide support for active/backup and active/active LAG.

For active/backup, if the primary active link fails, an automatic backup link takes over. If the original link is restored, the primary port is automatically reinstated.

For active/active, both links are active, resulting in double throughput in addition to redundancy.

Procedure

  1. Choose one of the following substeps to setup your preferred LAG configuration:
    1. To setup active/backup, define a LAG port, specifying a primary port (port 0) and a backup port (port 1):
      ovs-vsctl set Open_vSwitch . other_config:dpdk-extra="-n4 \
      --vdev=eth_ntbond0,mode=1,primary=0,backup=1
    2. To setup active/active:
      ovs-vsctl set Open_vSwitch . other_config:dpdk-extra="-n4 \
      --vdev=eth_ntbond0,mode=4
      Note: active/active does not define a primary port. Both available ports, port 0 and port 1, are bonded together into one active/active LAG port. Since only 2 ports are available, no implicit specification of participating ports in the bond is required.
  2. Add the OVS bridge:
    ovs-vsctl add-br br0 -- set bridge br0 datapath_type=netdev
  3. Create a virtual port:
    ovs-vsctl add-port br0 dpdkvp0 -- set int dpdkvp0 type=dpdk \ 
      options:"dpdk-devargs=0000:XX:XX.5,representor=[5]"

    where:

    XX:XX is the PCI bus ID, found with the command lspci | grep Napatech.

  4. Create a LAG port:
    ovs-vsctl add-port br0 ntbond0 \
    -- set interface ntbond0 type=dpdk \
        options:dpdk-devargs=class=eth,mac=xx:xx:xx:xx:xx

    where mac=xx:xx:xx:xx:xx:xx is the MAC address of the primary physical port.

    Use:
    ntlog | grep mac
    on the physical port to discover the MAC address.
  5. Repeat these steps for host2.
  6. Simulate a link failure:
    1. Create and start up the VMs.
      See Building and Starting a Virtual Machine for more information.
    2. Disable the primary port (port 0), by removing the link cable:
    3. Enable port 1:
      Use the following command to test that the VMs are still able to pass traffic:
      ping 192.168.1.<x>
      where the final digit (1 or 2) identifies the host IP address. This is an example of the command and resulting output:
      [root@fedora29-img-vm-1 ~]# ping 192.168.1.1
      PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
      64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.771 ms
      64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.278 ms
      64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=0.256 ms