NIC Teaming in Linux

How to Perform Network cards Teaming In Linux .

In Network Teaming we create a group of Our lancards for provide Fault-Tolerance and load Balancing feature .

There is 4 types of runners we can use in Teaming .

1.Active Backup (one cards act at a time nd another used as backup if one fail then another will active automatically)

2.Load balancing  (All LanCards work simultaneously for manage the all traffic on server)

3.Round Robin (traffic managed by sequence one then next-2 then next-3 in round )

4.Broadcast (All traffic sent to all ports )

My Scenario :-

I have created a VM then add two extra LAN card which will be used as Team now lancard is added in machine but not connected with any network .

My OS : Rhel-7.2

#nmcli device show (for check the Ethernet Connections)

Now Create a Empty Connection Group .

#nmcli con add type team con-name myteam0 ifname myteam0 autoconnect yes config ‘{“runner”:{“name”:“activebackup”}}’ (create a empty team group with runner active-backup)

#nmcli con show

Now add the adaptors in this group as this group (myteam0)act as master so adaptors we will add act as salve and we will give name to every adaptor .

#nmcli con add type team-slave con-name slave1 ifname enp0s8 master myteam0

#nmcli con add type team-slave con-name slave2 ifname enp0s9 master myteam0

Note : assign the IP to our Master (myteam0) as this ip is visible for all network communication act as frontend adaptor .

#nmcli con modify myteam0 ipv4.method manual ipv4.address 192.168.1.25/24

#nmcli con up myteam0 (for up the master connection myteam0)

#nmcli con show

#teamdctl myteam0 state ( for check the adaptors with master connection )

Note: Single adaptor active at a time in Activebackup runner mode .

For testing disconnect a adaptor then another will active automatically as enp0s8 is active now so disconnect this ,then enp0s9 should active automatically .

#nmcli device disconnect enp0s8 (for disconnect any adaptor)

Now if we want to change our runner then do following .

#nmcli con down myteam0 (Deactive the connection while changing the runner)

#nmcli con modify myteam0 team.config ‘{“runner”:{“name”:”loadbalance”}}’ (for change the runner )

#nmcli con up myteam0 (activate the connection after change)

#teamdctl myteam0 state (for check the connection details and the runner )

That’s All in Teaming If face any Challenge feel free to Comment and Write Mail to Supprtguuy@gmail.com

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *