LACP/Link Aggregation/Bonding/Network Teaming: Cisco-Juniper-Mikrotik-Linux

LACP Configuration 

Today the discussion will be regarding the link aggregation configuration on different vendors' devices. The link aggregation is called differently for different vendors such as -LACP or link aggregation control protocol for Cisco, Link Aggregation for Juniper and Bonding for Mikrotik. 

Network teaming is method for linking NICs together logically to allow for failover or higher throughput. 

However different devices' link aggregation's configuration are also not same. So here some of the devices' configuration have been given below.





LACP/Ether Channel Configuration on Cisco Router

Router-2-SCL#configure terminal
Router-2-SCL(config)#int gigabitEthernet 0/0
Router-2-SCL(config-if)#channel-group 1
Router-2-SCL(config-if)#no shutdown

Router-2-SCL(config-if)#int gigabitEthernet 2/0
Router-2-SCL(config-if)#channel-group 1
Router-2-SCL(config-if)#no shutdown

Router-2-SCL#copy running-configure to startup-configure

Router-2-SCL#conf t
Router-2-SCL(config)#interface Po1
Router-2-SCL(config-if)#ip address 10.111.111.1 255.255.255.0
Router-2-SCL(config-if)#no shutdown
Router-2-SCL(config-if)#exit

Router-2-SCL(config)#interface Po1.201
Router-2-SCL(config-subif)#encapsulation dot1Q 201
Router-2-SCL(config-subif)#ip address 172.16.201.1 255.255.255.252
Router-2-SCL(config-subif)#no shutdown

Router-2-SCL(config-subif)#interface Po1.202
Router-2-SCL(config-subif)#description SCL-ggc
Router-2-SCL(config-subif)#encapsulation dot1Q 202
Router-2-SCL(config-subif)#ip address 172.16.202.1 255.255.255.252
Router-2-SCL(config-subif)#no shutdown

Router-2-SCL(config-subif)#end
Router-2-SCL#wr

Router-2-SCL#ping 8.8.8.8 source 172.16.201.1





Configuring LACP/Ether Channel on Cisco Switch

In Cisco switch the configuration can be configured any of the followings.


switch(config)#vlan 201-204
switch(config-vlan)#exit

switch(config)#vlan 1000
switch(config-vlan)#name Managenment-Vlan
switch(config-vlan)#exit

switch(config)#int vlan 1000
switch(config-if)#description ***Link To Mikrotik Router***
switch(config-if)#ip address 10.111.111.2 255.255.255.252
switch(config-if)#no shutdown
switch(config-if)#exit

switch(config)#ip default-gateway 10.111.111.1

switch(config)#interface range ethernet 0/0-1
switch(config-if-range)#shutdown

switch(config-if-range)#channel-protocol lacp
switch(config-if-range)#channel-group 1 mode active
switch(config-if-range)#no shutdown
switch(config-if-range)#exit

switch(config)#int Po1
switch(config-if)#switchport trunk encapsulation dot1q
switch(config-if)#switchport mode trunk
switch(config-if)#switchport trunk allowed vlan all
switch(config-if)#switchport trunk native vlan 1000
switch(config-if)#no shutdown
switch(config-if)#exit


or


switch#vlan database
switch(vlan)#vlan 201 name SCL-int
switch(vlan)#vlan 203 name SCL-fna
switch(vlan)#apply
switch(vlan)#exit

switch#conf t
switch(config)#interface range fastEthernet 1/0 - 1
switch(config-if-range)#channel-group 1 mode on
switch(config-if-range)#switchport mode trunk
switch(config-if-range)#no shutdown
switch(config-if-range)#switchport trunk allowed vlan 1,1001-1005,201-204
switch(config-if-range)#exit

switch(config)#interface port-channel 1
switch(config-if)#switchport mode trunk
switch(config-if)#switchport trunk allowed vlan 1,1001-1005,201-204
switch(config-if)#no shutdown
switch(config-if)#exit


switch(config)#interface range fastEthernet 1/10 - 11
switch(config-if-range)#channel-group 2 mode on
switch(config-if-range)#switchport mode trunk
switch(config-if-range)#switchport trunk allowed vlan 1,1001-1005,201-204
switch(config-if-range)#no shutdown

switch(config)#interface port-channel 2
switch(config-if)#switchport mode trunk
switch(config-if)#switchport trunk allowed vlan 1,1001-1005,201-204
switch(config-if)#no shutdown
switch(config-if)#exit
switch(config)#end

switch# wr
switch# sh vlan-switch
switch# sh ip int br
switch# sh int port-channel 1 summary
switch# sh int port-channel 1 status
switch# sh etherchannel summary





Link Aggregation Configuration on Juniper Router

set interfaces ge-0/0/6 ether-options 802.3ad ae0
set interfaces ge-0/0/7 ether-options 802.3ad ae0
set interfaces ae0 vlan-tagging 
set interfaces ae0 aggregated-ether-options lacp active periodic fast
set interfaces ae0 unit 0 family ethernet-switching interface-mode trunk
set vlan vlan1000 vlan-id 1000
set interfaces ae0 unit 0 family ethernet-switching vlan members vlan1000


show interfaces
show lacp interfaces ae0
user@host> show lacp statistics interfaces ae0
user@host# clear lacp statistics interfaces ae0





Bonding on Mikrotik Router

/interface   bonding   add  slaves=ether1,ether2  mode=802.3ad   lacp-rate=30secs   link-monitoring=mii    transmit-hash-policy=layer-2-and-3





Network teaming on Linux


Create the team interface

nmcli con add type team con - name CNAME ifname INAME [config JSON]

where CNAME will be the name used to refer to the connection, INAME will be the interface name, and JSON specifies the runner to be used. JSON has the following syntax:

'{"runner": {"name": "METHOD"}}'

where METHOD is one of the following: broadcast, roundrobin, activebackup, loadbalance, or lacp.



Determine the IPv4/IPv6 attributes of the team interface

[root@demo -)# nmcli  con  mod   team0   ipv4.addresses   1.2.3.4/24
[root@demo -)# nmcli  con  mod   team0   ipv4.method   manual



Assign the port interfaces

nmcli  con  add  type  team-slave  con-name CNAME  ifname  INAME  master  TEAM

where CNAME will be the name used to refer to the port, INAME is the name of an existing interface, and TEAM specifies the connection name of the network team interface.

The connection name can be explicitly specified, or it will be team-slave-IFACE by default.

[root@demo -]# nmcli con add type team-slave ifname eth1 master team0
[root@demo -]# nmcli con add type team-slave ifname eth2 master team0 con-name team0-eth2



Bring the team and port interfaces up/down

nmcli dev dis INAME
nmcli con up CNAME

INAME is the device name of the team or port interface to be managed. CNAME is the connection name of that interface. where CNAME is the connection name of the team or port interface to be managed.

The output of this command includes the status of the port interfaces.

[root@demo -]# teamdctl team0 state
[root@demo -]# teamdctl team0 config dump



Example:

[student@serverx-]$ sudo  -i
[root@serverX-]# ip link

[root@serverx-]#nmcli con add type team con-name team0 ifname team0 config '{"runner": {"name": "activebackup"}}'

[root@serverx-]#nmcli con mod team0 ipv4.addresses  '192.168.0.100/24'
[root@serverx-]#nmcli con mod team0 ipv4.method manual

[root@serverx-]#nmcli con add type team-slave con-name team0-port1  ifname eno1 master team0
[root@serverx-]#nmcli con add type team-slave con-name team0-port2  ifname eno2 master team0

[root@serverx-]# teamdctl team0 state
[student@serverx-]$ping  -I  team0 192.168.0.254

[root@serverX-]#nmcli dev dis eno1                            <If want to down any interface of the team>
[root@serverX-]#nmcli con up team0-port1                  <If want to up any interface of the team>



Setting and adjusting team configuration

NetworkManager creates configuration files for network teaming in the /etc/sysconfig/network-scripts the same way it does for other interfaces.

[student@serverx-]$ sudo  -i

[root@serverx-]#teamdctl  team0 state
[root@serverX-]#cat   /etc/sysconfig/network-scripts/ifcfg-team0
[root@serverX-]#cat   /etc/sysconfig/network-scripts/ifcfg-team0-port1
[root@serverX-]#cat   /etc/sysconfig/network-scripts/ifcfg-team0-port2

[root@serverx-]#nmcli  dev  dis  team0                            <Bring the team0 interface down to edit>

[root@serverX-]#vim  /etc/sysconfig/network-scripts/ifcfg-team0 
                                                                                               <Edit & adjust to use roundrobin>

[root@serverx-]#grep runner /etc/sysconfig/network-scripts/ifcfg-team0

[root@serverx-]#nmcli con load  /etc/sysconfig/network-scripts/ifcfg-team0
[root@serverX-]#nmcli con up team0

[root@serverx-]#ping  -I  team0   192.168.0.254

[root@serverX-]#nmcli con up team0-port1
[root@serverX-]#nmcli con up team0-port2

[root@serverX-]#teamdctl team0 config dump

[root@serverx-]#teamnl  team0  options                                     <to display the tunable options>
[root@demo -]#teamnl   team0  ports                                           <to display the team ports>
[root@demo -]#teamnl   team0  getoption  activeport                  <to display currently active ports>
[root@demo -]#teamnl   team0  setoption   activeport   3           <Set the option for the active port>

[root@serverX-]#nmcli con mod team0 team.config '{"runner": {"name": "activebackup"}}' 
                                                                                <to modify the team interface>









*****

0 Comments