This section explains the interface configuration inside Avi Load Balancer Namespace.
Linux Interface Configuration
After the port-channel has been successfully configured, the Linux network interface configuration file (/etc/network/interfaces
) includes information about bonded and secondary interfaces, as shown in the example below.
When the Avi Load Balancer SE metadata file has avi.bond-ifs. SE: '1,2', the SE makes Linux form a bonding interface (bond0) with interfaces eth1 and eth2 as secondary. The following configuration features are in the interface configuration file /etc/network/interfaces
) in the default namespace.
auto eth1 iface eth1 inet manual bond-master bond0 auto eth2 iface eth2 inet manual bond-master bond0 auto bond0 iface bond0 inet manual bond-mode balance-xor bond-miimon 100 bond-slaves eth1 eth2
Interface Configuration inside Avi Load Balancer Namespace
Inside the namespace (avi_ns1), ip addr gives the following information with the bonded and secondary interfaces using the same MAC address.
avi_bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default link/ether XX:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff inet YY.YY.YY.YY/ZZ scope global avi_bond0 valid_lft forever preferred_lft forever avi_eth2: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master avi_bond0 state UP group default qlen 1000 link/ether XX:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff avi_eth1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master avi_bond0 state UP group default qlen 1000 link/ether XX:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff
Bond Configuration Inside Avi Load Balancer Namespace
Inside the namespace (avi_ns1), /proc/net/bonding/avi_bond0
gives the information about bond configuration.
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011) Bonding Mode: load balancing (xor) Transmit Hash Policy: layer3+4 (1) MII Status: up MII Polling Interval (ms): 100 Up Delay (ms): 0 Down Delay (ms): 0 Slave Interface: avi_eth2 MII Status: up Speed: 10000 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: 02:5a:80:02:11:0c Slave queue ID: 0 Slave Interface: avi_eth1 MII Status: up Speed: 10000 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: 02:4a:80:02:11:0c Slave queue ID: 0
MII status shows the physical link status of the interfaces.
The bond mode can be balance-rr, active-backup, or balance-xor.
Example: avi.bond-mode.SE: 'active-backup' This would set the port-channel mode to active-backup.
Note:balance-xor is the default port-channel mode.
If active-backup is used as the port-channel mode, then the first member vNIC is chosen as the primary link.
Permanent hardware addresses of the secondaries are the original MAC addresses and should be different for each of the secondaries.
Statistics
Statistics of interfaces in the output of show service engine <SE_IP_Address>
can be used to see if traffic is distributed fairly among the secondary interfaces. A balanced distribution results in comparable statistics for all secondary interfaces if they were active together during their lifetime.
CSP pNIC and SRIOV Configuration
The following commands in the CSP shell help identify pNIC and SRIOV configuration errors in CSP:
SRIOV status on pNICs helps ensure that SRIOV is on for pNICs of interest.
avinet-1# show running-config pnic sr-iov pnic enp7s0f0 sr-iov numvfs 32 sr-iov switchmode veb ! pnic enp7s0f1 sr-iov numvfs 32 sr-iov switchmode veb ! avinet-1# show pnic enp7s0f0 passthrough passthrough sriov avinet-1# show pnic enp7s0f0 sriov_intf sriov_intf sriov_pf
View the virtual function usage on a pNIC as shown below:
avinet-1# show pnic enp7s0f0 vfnics VF INUSE SERVICE IDX NAME FLAG OWNER ----------------------------------- 0 enp7s16 in-use none 1 enp7s16f2 in-use none 2 enp7s16f4 in-use none 3 enp7s16f6 in-use none 4 enp7s17 in-use none 5 enp7s17f2 in-use none 6 enp7s17f4 in-use none 7 enp7s17f6 not-used none 8 enp7s18 not-used none 9 enp7s18f2 not-used none 10 enp7s18f4 not-used none 11 enp7s18f6 not-used none 12 enp7s19 not-used none 13 enp7s19f2 not-used none 14 enp7s19f4 not-used none 15 enp7s19f6 not-used none 16 enp7s20 not-used none 17 enp7s20f2 not-used none 18 enp7s20f4 not-used none 19 enp7s20f6 not-used none 20 enp7s21 not-used none 21 enp7s21f2 not-used none 22 enp7s21f4 not-used none 23 enp7s21f6 not-used none 24 enp7s22 not-used none 25 enp7s22f2 not-used none 26 enp7s22f4 not-used none 27 enp7s22f6 not-used none 28 enp7s23 not-used none 29 enp7s23f2 not-used none 30 enp7s23f4 not-used none 31 enp7s23f6 not-used none