Here I’ve come again for you, with a new post. In this post we’ll learn about the bridging and bonding of IPv6 in Linux (CentOS/Red Hat).
IPv6 bridge and bonding in Linux (CentOS/Red Hat)
First we need to verify bridge interface:
[root@desktopX ~]# ifconfig
br0: IP, MASK, GW, DNS
enp2s0/ens33: MAC
Now we’ll configure Bridge Interface:
[root@serverX ~]# systemctl start NetworkManager.service[root@serverX ~]# systemctl enable NetworkManager.servie [root@serverX ~]# ping 172.25.11.254 ; We’ll provide our system IP
[root@serverX ~]# rpm -qa | grep bridge-utils
[root@serverX ~]# yum install bridge-utils [root@serverX ~]# cd /etc/sysconfig/network-scripts
[root@serverX network-scripts]# ls
ifcfg-eth0
ifcfg-eth1 [root@serverX network-scripts]# cp ifcfg-eth0 ifcfg-br0
[root@serverX network-scripts]# ls
ifcfg-eth0
ifcfg-eth1
ifcfg-br0 [root@serverX network-scripts]# vim ifcfg-eth0 ;Â Â See Physical INT
DEVICE=eth0
HWADDR=aa:bb:cc:dd:ee:ff
TYPE=Ethernet
ONBOOT=yes
BRIDGE=br0 [root@serverX network-scripts]# vim ifcfg-br0 ; Bridge Int
Here well put these lines which includes IP address, subnet mask, default gateway etc.
DEVICE=br0
TYPE=Bridge
IPADDR=172.25.11.200+X
NETMASK=255.255.255.0
GATEWAY=172.25.11.1
DNS1=8.8.8.8
BOOTPROTO=none
ONBOOT=yes
DELAY=0
[root@serverX network-scripts]# cd
[root@serverX ~]# ifconfig
We’ll test our configuration by using ping command
[root@desktopX ~]# ping -I br0 172.25.11.254
Now lets come to the point IPv6 configuration.
IPv6 Addressing:
IPv6 works with 128 bits
IPv4 works with 32 bits
IPv6 has 8 parts (in IP address)
IPv4 has 4 parts
IPv6 uses (:) between different parts
IPv4 uses (.) between different parts
IP v 6 generally uses hexadecimal number
IPv4 generally uses decimal number
Generally IP v 6 has no class
But IPv4 has 5 class
Example :
IPv6 => fe80::220c:29ff:fe2e:37f1
IPv4 => 192.168.2.1
So we’ve learn something about IP v 6 and IPv4. Now come to the next point, which is types of IPv4 and IPv6:
Types of IPv4
=> Private IP (10.0.0.0/8, 172.16.0.0 – 172.31.255.255, 192.168.0.0-192.168.255.255)
=> Public IP (except private block)
Types of IPv6:
=> :: – all IP (similar as 0.0.0.0)
=> ::1 – loopback (Similar as 127.0.0.1)
=> fe80 – Link local address (similar as 169.254….)
=> ff00 – Multicast (Similar as 224.0.0.0)
=> fd00 – Unique local address (same as IPv4 Private)
=> 2000 – Global unicast address (same as public IP)
Now we’ll configure IPv6 to the Ethernet interface. Can follow the steps.
[root@serverX ~]# ip addr [root@serverX ~]# ifconfig eth1 | grep inet6 [root@serverX ~]# systemctl restart NetworkManager[root@serverX ~]# systemctl enable NetworkManager [root@serverX ~]# nmcli connection show [root@serverX ~]# nmcli con del ‘eth1’ [root@serverX ~]# systemctl restart NetworkManager [root@serverX ~]# nmcli connection show
NAMEÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â UUIDÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â TYPEÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â DEVICE
Wired connection 1       5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03     802-3-ethernet                         eth1
[root@serverX ~]# nmcli connection modify “Wired connection 1” ipv6.addresses fddb:db08:abcd::1234:X/64 ipv6.method manual [root@serverX ~]# ifconfig eth1 | grep inet6 [root@serverX ~]# nmcli connection up “Wired connection 1” [root@serverX ~]# ifconfig eth1 | grep inet6 [root@serverX ~]# ping6 fddb:db08:abcd::1234:254
Now we’ll test our works with SSH, So lets start:
[root@serverX ~]# ssh fddb:db08:abcd::1234:254 ; ssh <system IPv6>
Modify IPv6 with the default gateway.
[root@serverX ~]# nmcli connection modify “Wired connection 1” ipv6.addresses‘fddb:fe2a:ab1e::c0a8:X/64 fddb:fe2a:ab1e::c0a8:fe’
Now we’ll do NIC (Network Interface Card) bonding.Â
Before going to there, we need to follow some load balancing algorithms. Lets have a small look about them.
=> RoundRobin
=> Bonding (Teaming)
=> LACP (etherchannel)
=> Broadcast
=> Failover (active backup) – HSRP
=> Load Balacing
=> High Availability (HA)
Now lets start the process…
[root@serverX ~]# systemctl restart NetworkManager.service
[root@serverX ~]# systemctl enable NetworkManager.servie
Note: nmcli con del ‘eth1’ or ‘System eth0’
[root@serverX ~]# systemctl restart NetworkManager.service [root@serverX ~]# nmcli connection showNAMEÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â UUIDÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â TYPEÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â DEVICE
Wired connection 1              21899a89-65e3-478a-8385-69ce38a67fa0        802-3-ethernet          eth0
Wired connection 2             5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03           802-3-ethernet          eth1
config ‘{“runner”: {“name”: “activebackup”}}’ [root@serverX ~]# ip addr
[root@serverX ~]# nmcli connection show
NAMEÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â UUIDÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â TYPEÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â DEVICE
Wired connection 1                21899a89-65e3-478a-8385-69ce38a67fa0             802-3-ethernet        eth0
Wired connection 2               5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03                802-3-ethernet        eth1
team0                                       3a549377-21cb-40f4-9b57-22020aec388b              team                           team0
[root@serverX ~]# ip addr [root@serverX ~]# nmcli con add type team-slave con-name team0-port1 ifname eth0 master team0 [root@serverX ~]# nmcli con add type team-slave con-name team0-port2 ifname eth1 master team0 [root@serverX ~]# systemctl restart network
[root@serverX ~]# ip addr [root@serverX ~]# teamdctl team0 state [root@serverX ~]# ping -I team0 192.168.11.254 [root@serverX ~]# ip link set eth0 down
[root@serverX ~]# teamdctl team0 state view [root@serverX ~]# teamdctl team0 state
Now lets verify the connection.
[root@serverX ~]# cd /etc/sysconfig/network-scripts/
[root@serverX network-scripts]# cat ifcfg-team0
Here are some screenshots for you:
Hope that you have all enjoyed this session. Waiting for your valuable comment.
Leave a Reply