interface_teaming

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
interface_teaming [2021/04/08 22:04] – [Create Team File] walkeradmininterface_teaming [2023/03/09 22:35] (current) – external edit 127.0.0.1
Line 110: Line 110:
 TEAM_CONFIG='{"runner": {"name": "activebackup"}, "link_watch": {"name": "ethtool"}}' TEAM_CONFIG='{"runner": {"name": "activebackup"}, "link_watch": {"name": "ethtool"}}'
 </file> </file>
 +\\ 
 +Save this file to complete the team file creation.
 +\\ 
 +\\ 
 +
 +----
 +====Edit Interface Files====
 +\\ 
 +Now you can either create new interface files, or edit the existing ones. In this example I already have ifcfg-eth0 and ifcfg-eth1, so I will edit these. The reason is that they contain the correct MAC Address for the interface, and I wish to preserve this.
 +\\ 
 +\\ 
 +Edit the eth0 (or whatever your first interface file is):
 +\\ 
 +<file>
 +vi /etc/sysconfig/network-scripts/ifcfg-eth0
 +
 +NAME="eth0"
 +DEVICE="eth0"
 +ONBOOT=yes
 +# HWADDR key is mandatory to use custom interface name: do not delete it
 +HWADDR=0c:c4:7a:d9:0b:0c
 +NM_CONTROLLED=yes
 +TEAM_MASTER=mngt
 +TEAM_PORT_CONFIG='{"prio": 100}'
 +</file>
 +\\ 
 +\\ 
 +Now edit your second interface file:
 +\\ 
 +<file>
 +vi /etc/sysconfig/network-scripts/ifcfg-eth0
 +
 +NAME="eth1"
 +DEVICE="eth1"
 +ONBOOT=yes
 +# HWADDR key is mandatory to use custom interface name: do not delete it
 +HWADDR=0c:c4:7a:d9:0b:0d
 +NM_CONTROLLED=yes
 +TEAM_MASTER=mngt
 +TEAM_PORT_CONFIG='{"prio": 100}'
 +</file>
 +\\ 
 +Now reboot the server.
 +\\ 
 +\\ 
 +
 +----
 +====Testing====
 +\\ 
 +Firstly we need to know if all the interfaces came up correctly, to test this use the following:
 +\\ 
 +    ip link show |grep "state UP"
 +\\ 
 +\\ 
 +In the case of the test server this shows the following output:
 +\\ 
 +<file>
 +2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master mngt state UP mode DEFAULT group default qlen 1000
 +3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master mngt state UP mode DEFAULT group default qlen 1000
 +4: mngt: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
 +</file>
 +\\ 
 +We can see that the team interface (logical) is present and that the two physical interfaces eth0 and eth1 are present.
 +\\ 
 +\\ 
 +To see the status of the interfaces we can use the follwoing command:
 +\\ 
 +\\ 
 +    teamdctl mngt state (where mngt is the name of the team)
 +\\ 
 +\\ 
 +This shows the following output:
 +\\ 
 +<file>
 +setup:
 +  runner: activebackup
 +ports:
 +  eth0
 +    link watches:
 +      link summary: up
 +      instance[link_watch_0]:
 +        name: ethtool
 +        link: up
 +        down count: 0
 +  eth1
 +    link watches:
 +      link summary: up
 +      instance[link_watch_0]:
 +        name: ethtool
 +        link: up
 +        down count: 0
 +runner:
 +  active port: eth0
 +</file>
 +\\ 
 +It can be see that the two interfaces (eth0 and eth1) have a link: up. At the bottom the runner is listed as having eth0 as the active port.
 +\\ 
 +\\ 
 +To test the team simply ping an IP or Name, and unplug the interfaces one at a time, as long as one interface is connected your pings will continue.
 +\\ 
 +\\ 
 +Note: some switches take some time to detect that an interface has been plugged in, this might cause an outage in your pings, the switch may need to be reconfigured to mitigate this.
 +\\ 
 +\\ 
 +Lastly check the IP Addressing is as expected. Use the following command:
 +\\ 
 +\\ 
 +    ip -br -c a
 +\\ 
 +This will give a similar output to below:
 +\\ 
 +<file>
 +lo               UNKNOWN        127.0.0.1/8 ::1/128
 +eth0             UP
 +eth1             UP
 +mngt             UP             192.168.1.150/24 fe80::ec4:7aff:fed9:b0c/64
 +</file>
 +\\ 
 +Above we can see that the team mngt has the IP details, and that eth0 and eth1 are simply listed as being UP.
 +\\ 
 \\  \\ 
  
interface_teaming.1617915849.txt.gz · Last modified: 2023/03/09 22:35 (external edit)