The reference architecture includes bonded network interfaces, which use multiple physical network interfaces for better redundancy and throughput. Running multiple services across multiple machines and implementing appropriate HA methods ensure a high degree of tolerance to failure within our environment, but if it’s the physical network that fails and not the service, outages will occur if traffic cannot flow to and from that service. Adding in NIC bonding (also known as teaming or link aggregation) can help alleviate these issues by ensuring traffic flows through diverse routes and switches as appropriate.
NIC bonding requires co-ordination between system administrators and the network administrators, who are responsible for the switches. There are various methods available for NIC bonding. The method presented here is the active-passive mode, which describes that traffic will normally flow through a single switch, leaving the other teamed NIC to take no traffic until it is required.
Setting up NIC bonding in Ubuntu 12.04 requires an extra package installation to allow bonding.
sudo apt-get update sudo apt-get -y install ifenslave
[ Related Article: What is Openstack ]
auto eth1 iface eth1 inet manual bond-master bond0 bond-primary eth1 eth2 auto eth2 iface eth2 inet manual bond-master bond0 bond-primary eth1 eth2 auto bond0 iface bond0 inet static address 172.16.0.111 netmask 255.255.0.0 network 172.16.0.0 broadcast 172.16.255.255 bond-slaves none bond-mode 1 bond-miimon 100
[ Related Article: Openstack Interview Questions for Beginners ]
alias bond0 bonding options bonding mode=1 miimon=100
sudo service networking restart
Bonding network interfaces in Ubuntu to cater to switch failure is relatively straightforward, providing co-ordination with how the switches are set up and configured. With different paths to different switches configured, and each network interface going to separate switches, a high level of fault tolerance to network-level events such as a switch failure can be achieved.
To do this, we simply configure our bonding in the traditional /etc/network/interfaces file under Ubuntu, but we specify which NICs are teamed with which bonded interface. Each bonded interface configured has at least one unique pair of interfaces assigned to it, and then we configure that bonded interface, bond0, with the usual IP address, netmask, and so on. We tag a few options specifically to notify Ubuntu that this is a bonded interface of a particular model.
To ensure the bonding module that gets loaded as part of the kernel has the right mode assigned to it, we configure the module in /etc/modprobe.d/bonding.conf. When the bonding module loads along with the network interface, we end up with a server that is able to withstand isolated switch failures.
Ravindra Savaram is a Content Lead at Mindmajix.com. His passion lies in writing articles on the most popular IT platforms including Machine learning, DevOps, Data Science, Artificial Intelligence, RPA, Deep Learning, and so on. You can stay up to date on all these technologies by following him on LinkedIn and Twitter.