Rate This Document
Findability
Accuracy
Completeness
Readability

Protocol Offload

VLAN Offloading

  1. Configure VFs.

    For details, see Configuring Kernel-Mode SR-IOV.

  2. Configure the network.
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    systemctl start openvswitch
    ovs-vsctl add-br br-ovs
    ovs-vsctl add-port br-ovs enp1s0f0_0
    ovs-vsctl add-port br-ovs enp1s0f0_1
    ovs-vsctl add-port br-ovs enp1s0f0_2
    ovs-vsctl add-port br-ovs enp1s0f0_3
    ovs-vsctl add-port br-ovs enp1s0f0
    ip link set dev enp1s0f0 up
    ip link set dev enp1s0f0_0 up
    ip link set dev enp1s0f0_1 up
    ip link set dev enp1s0f0_2 up
    ip link set dev enp1s0f0_3 up
    ovs-vsctl set Port enp1s0f0_0 tag=100
    
  3. Start a VM and log in to it.
    1
    2
    virsh start vm1
    virsh console vm1
    
  4. Verify the network connectivity.
    Run the following command on VM 1 of host 1:
    1
    ping <Host2 vm1_IP>
    

  5. Verify flow table offloading and VLAN tagging.

    Use VM 1 of host 1 and VM 1 of host 2 to send packets and check whether the flow table is offloaded.

    • Run the following command on VM 1 of host 2:
      1
      iperf3 -s
      
    • Run the following command on VM 1 of host 1:
      1
      iperf3 -c <Host2vm1_ip> -t 0
      
    • Run the following command on any of the physical machines:
      1
      ovs-appctl dpctl/dump-flows type=offloaded
      

  6. Verify the CT configuration.
    1. Configure the CT flow table on the physical machine.
      1
      2
      3
      4
      5
      ovs-ofctl del-flows br-ovs
      ovs-ofctl add-flow br-ovs "arp, actions=normal"
      ovs-ofctl add-flow br-ovs "table=0, ip,ct_state=-trk, actions=ct(table=1)"
      ovs-ofctl add-flow br-ovs "table=1, ip,ct_state=+trk+new, actions=ct(commit),normal"
      ovs-ofctl add-flow br-ovs "table=1, ip,ct_state=+trk+est, actions=normal"
      
    2. Verify the flow table offloading.
      1
      ovs-ofctl dump-flows br-ovs
      

      1
      ovs-appctl dpctl/dump-flows
      

      1
      ovs-appctl dpctl/dump-flows type=offloaded
      

      • After the preceding commands are executed, the command output is displayed only once. You can run watch -n 1 -d 'commands' to view the command output again. Replace commands with preceding commands.
      • CT flow table offloading requires complete TC module support by the host OS kernel whose version must be 5.7 or later. The kernel version of CentOS 7.6 is 4.14 and does not fully support this module.

VXLAN Offloading

  1. Configure VFs.

    For details, see Configuring Kernel-Mode SR-IOV.

  2. Configure the network.
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    systemctl start openvswitch
    ovs-vsctl add-br br-ovs
    ovs-vsctl add-port br-ovs enp1s0f0_0
    ovs-vsctl add-port br-ovs enp1s0f0_1
    ovs-vsctl add-port br-ovs enp1s0f0_2
    ovs-vsctl add-port br-ovs enp1s0f0_3
    ip link set dev enp1s0f0 up
    ip link set dev enp1s0f0_0 up
    ip link set dev enp1s0f0_1 up
    ip link set dev enp1s0f0_2 up
    ip link set dev enp1s0f0_3 up
    ovs-vsctl add-port br-ovs vxlan0 -- set Interface vxlan0 type=vxlan options:local_ip=192.168.1.12 options:remote_ip=192.168.1.11 options:key=98
    ifconfig enp1s0f0 192.168.1.12/24 up
    

    When configuring the VXLAN port on the peer server, change local_ip and remote_ip to each other.

  3. Start a VM and log in to it.
    1
    2
    virsh start vm1
    virsh console vm1
    
  4. Set the maximum transmission unit (MTU) of the two VMs to a value not greater than 1450.
    1
    ifconfig <dev> mtu 1450
    
  5. Send packets on the VMs.
    • Run the following command on VM 1 of host 2:
      1
      iperf3 -s
      
    • Run the following command on VM 1 of host 1:
      1
      iperf3 -c <Host2vm1_ip> -t 0
      
  6. Verify the flow table offloading on the physical machine.
    1
    ovs-appctl dpctl/dump-flows
    

  7. Verify the CT configuration.
    1. Configure the CT flow table on the physical machine.
      1
      2
      3
      4
      5
      ovs-ofctl del-flows br-ovs
      ovs-ofctl add-flow br-ovs "arp, actions=normal"
      ovs-ofctl add-flow br-ovs "table=0, ip,ct_state=-trk, actions=ct(table=1)"
      ovs-ofctl add-flow br-ovs "table=1, ip,ct_state=+trk+new, actions=ct(commit),normal"
      ovs-ofctl add-flow br-ovs "table=1, ip,ct_state=+trk+est, actions=normal"
      

    2. Verify the flow table offloading.
      1
      ovs-appctl dpctl/dump-flows type=offloaded
      

      CT flow table offloading requires complete TC module support by the host OS kernel whose version must be 5.7 or later. The kernel version of CentOS 7.6 is 4.14 and does not fully support this module.

Geneve Offloading

  1. Configure VFs.

    For details, see Configuring Kernel-Mode SR-IOV.

  2. Configure the network.
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    systemctl start openvswitch
    ovs-vsctl add-br br-ovs
    ovs-vsctl add-port br-ovs enp1s0f0_0
    ovs-vsctl add-port br-ovs enp1s0f0_1
    ovs-vsctl add-port br-ovs enp1s0f0_2
    ovs-vsctl add-port br-ovs enp1s0f0_3
    ip link set dev enp1s0f0 up
    ip link set dev enp1s0f0_0 up
    ip link set dev enp1s0f0_1 up
    ip link set dev enp1s0f0_2 up
    ip link set dev enp1s0f0_3 up
    ovs-vsctl add-port br-ovs tun0 -- set Interface tun0 type=geneve options:local_ip=192.168.1.12 options:remote_ip=192.168.1.11
    ifconfig enp1s0f0 192.168.1.12/24 up
    

    When configuring the VXLAN port on the peer server, change local_ip and remote_ip to each other.

  3. Start a VM and log in to it.
    1
    2
    virsh start vm1
    virsh console vm1
    
  4. Set the MTU of the two VMs to a value not greater than 1450.
    1
    ifconfig <dev> mtu 1450
    
  5. Send packets on the VMs.
    • Run the following command on VM 1 of host 2:
      1
      iperf3 -s
      
    • Run the following command on VM 1 of host 1:
      1
      iperf3 -c <Host2vm1_ip> -t 0
      
  6. Verify the flow table offloading on the physical machine.
    1
    ovs-appctl dpctl/dump-flows
    

    Geneve protocol offloading requires that the kernel version be 5.3 or later.

  7. Verify the CT configuration.
    1. Configure the CT flow table on the physical machine.
      1
      2
      3
      4
      5
      ovs-ofctl del-flows br-ovs
      ovs-ofctl add-flow br-ovs "arp, actions=normal"
      ovs-ofctl add-flow br-ovs "table=0, ip,ct_state=-trk, actions=ct(table=1)"
      ovs-ofctl add-flow br-ovs "table=1, ip,ct_state=+trk+new, actions=ct(commit),normal"
      ovs-ofctl add-flow br-ovs "table=1, ip,ct_state=+trk+est, actions=normal"
      

    2. Verify the flow table offloading.
      1
      ovs-appctl dpctl/dump-flows type=offloaded
      

      CT flow table offloading requires complete TC module support by the host OS kernel whose version must be 5.7 or later. The kernel version of CentOS 7.6 is 4.14 and does not fully support this module. After flow table offloading on the hardware, the network connection becomes unidirectional.

IPv6 Offloading

  1. Configure VFs.

    For details, see Configuring Kernel-Mode SR-IOV.

  2. Configure the network.
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    systemctl start openvswitch
    ovs-vsctl add-br br-ovs
    ovs-vsctl add-port br-ovs enp1s0f0_0
    ovs-vsctl add-port br-ovs enp1s0f0_1
    ovs-vsctl add-port br-ovs enp1s0f0_2
    ovs-vsctl add-port br-ovs enp1s0f0_3
    ovs-vsctl add-port br-ovs enp1s0f0
    ip link set dev enp1s0f0 up
    ip link set dev enp1s0f0_0 up
    ip link set dev enp1s0f0_1 up
    ip link set dev enp1s0f0_2 up
    ip link set dev enp1s0f0_3 up
    
  3. Start a VM and log in to it.
    1
    2
    virsh start vm1
    virsh console vm1
    
  4. Add IPv6 addresses to the VMs.
    • Run the following command on VM 1 of host 1:
      1
      ifconfig enp1s0 add 3000:1::11/64
      
    • Run the following command on VM 1 of host 2:
      1
      ifconfig enp1s0 add 3000:1::12/64
      
  5. Send packets on the VMs.
    • Run the following command on VM 1 of host 2 (receiver):
      1
      iperf3 -6 -s
      
    • Run the following command on VM 1 of host 1 (sender):
      1
      iperf3 -6 -c 3000:1::12 -u -l 512 -t 999
      
  6. Check the flow table offloading on the physical machine.
    1
    ovs-appctl dpctl/dump-flows type=offloaded