Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 8. Configure and Test LACP Bonding with Open vSwitch DPDK
OVS bonds with LACP might not be supported depending on the version of Red Hat OpenStack Platform (RHOSP) you are using. Check the product documentation to verify that OVS bonds with LACP are supported.
To use Open vSwitch DPDK to configure and test LACP bonding, complete the following tasks:
- Configure the switch ports for LACP.
- Configure Linux kernel bonding for LACP as a baseline.
- Configure OVS DPDK bonding for LACP.
This topic describes switch configuration with a Dell S4048-ON switch. Whereas configuration of RHEL and OVS remains the same, different switch vendors' operating systems will use a different syntax to configure LACP.
8.1. Configuring the Switch Ports for LACP Copier lienLien copié sur presse-papiers!
Reset the switch interfaces to their default settings:
S4048-ON-sw#config t S4048-ON-sw(conf)#default int te1/2 S4048-ON-sw(conf)#default int te1/7
S4048-ON-sw#config t S4048-ON-sw(conf)#default int te1/2 S4048-ON-sw(conf)#default int te1/7
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Configure the port-channel and other port settings:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Configure the VLANs:
S4048-ON-sw#config t S4048-ON-sw(conf)#int range vlan901-909 S4048-ON-sw(conf-if-range-vl-901-909)#tagged Port-channel 1 S4048-ON-sw(conf-if-range-vl-901-909)#end S4048-ON-sw#
S4048-ON-sw#config t S4048-ON-sw(conf)#int range vlan901-909 S4048-ON-sw(conf-if-range-vl-901-909)#tagged Port-channel 1 S4048-ON-sw(conf-if-range-vl-901-909)#end S4048-ON-sw#
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify VLAN tagging:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify the LACP configuration:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
8.2. Configuring Linux Kernel Bonding for LACP as a Baseline Copier lienLien copié sur presse-papiers!
Configure Linux kernel bonding as a baseline, then verify that the host can form an LACP bond with the switch.
Move all interfaces to the kernel space and test with kernel space bonding. In this example, p1p1 maps to bus address
0000:04:00.0
and p1p2 maps to bus address0000:04:00.1
.driverctl unset-override 0000:04:00.0 driverctl unset-override 0000:04:00.1
[root@baremetal ~]# driverctl unset-override 0000:04:00.0 [root@baremetal ~]# driverctl unset-override 0000:04:00.1
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Load the bonding driver, configure a bond interface (
bond10
) and enslave interfacesp1p1
andp1p2
:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify LACP from RHEL:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify LACP from the switch:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Remove the bonding configuration:
ip link del dev bond10
[root@baremetal ~]# ip link del dev bond10 [root@baremetal ~]#
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
For information about changing the bonding mode, see: How to change the bonding mode without rebooting the system?
8.3. Configuring OVS DPDK Bonding for LACP Copier lienLien copié sur presse-papiers!
The next objective is to configure an LACP bond within OVS DPDK.
8.3.1. Prepare Open vSwitch Copier lienLien copié sur presse-papiers!
Ensure that huge pages and other values are configured in RHEL:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Configure OVS for DPDK:
ovs-vsctl list Open_vSwitch | grep other ovs-vsctl --no-wait set Open_vSwitch . other_config:pmd-cpu-mask=0x17c0017c ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-lcore-mask=0x00000001 ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init="true"
[root@baremetal bonding]# ovs-vsctl list Open_vSwitch | grep other other_config : {} [root@baremetal bonding]# ovs-vsctl --no-wait set Open_vSwitch . other_config:pmd-cpu-mask=0x17c0017c [root@baremetal bonding]# ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-lcore-mask=0x00000001 [root@baremetal bonding]# ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init="true"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Switch interfaces into user space:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restart Open vSwitch,
journalctl -u ovs-vswitchd -f &
running in the background:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
8.3.2. Configure LACP Bond Copier lienLien copié sur presse-papiers!
Add the bond:
ovs-vsctl add-br ovsbr0 -- set bridge ovsbr0 datapath_type=netdev ovs-vsctl add-bond ovsbr0 dpdkbond dpdk0 dpdk1 bond_mode=balance-tcp lacp=active -- set
[root@baremetal bonding]# ovs-vsctl add-br ovsbr0 -- set bridge ovsbr0 datapath_type=netdev [root@baremetal bonding]# ovs-vsctl add-bond ovsbr0 dpdkbond dpdk0 dpdk1 bond_mode=balance-tcp lacp=active -- set interface dpdk0 type=dpdk -- set Interface dpdk1 type=dpdk
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify from Open vSwitch:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify from the switch:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
8.3.3. Enabling / Disabling Ports from OVS Copier lienLien copié sur presse-papiers!
You can enable or disable ports with ovs-ofctl mod-port <bridge> <port> [up|down]
Shut down a port:
ovs-ofctl mod-port ovsbr0 dpdk1 down
[root@baremetal bonding]# ovs-ofctl mod-port ovsbr0 dpdk1 down
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify the shutdown:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify on the switch:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Re-enable the port:
ovs-ofctl mod-port ovsbr0 dpdk1 up
[root@baremetal bonding]# ovs-ofctl mod-port ovsbr0 dpdk1 up
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify from RHEL:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify from the switch:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow