Saturday, April 6, 2013

Ethernet channel bonding


Guys, Recently I used two lan cards (eth0 and eth1) attached on a system to bond as a single lan card for fault tolerance.
So I followed below steps

Step 1) Change kernel parameter to bound two lan cards as a single virtual card bond0

echo -e "alias bond0 bonding\noptions bond0 mode=1 primary=eth1 use-carrier=0" >>/etc/modprobe.conf
sysctl -p

step2) change settings for eth0,eth1 and bond0

echo -e "DEVICE=eth0\nMASTER=bond0\nSLAVE=yes"> /etc/sysconfig/network-scripts/ifcfg-eth0

echo -e "DEVICE=eth1\nMASTER=bond0\nSLAVE=yes"> /etc/sysconfig/network-scripts/ifcfg-eth0
echo -e "DEVICE=bond0\nIPADDR=192.168.0.4\nNETMASK=255.255.255.0\nONBOOT=yes">/etc/sysconfig/network-scripts/ifcfg-bond0

Step 3) Restart the network

/etc/init.d/network restart

Note :-
1)     You could check status of your virtual card (bond0) by executing below command
cat /proc/net/bonding/bond0
2)      Depending on your use/requirements  we could use several parameters (like mode,milmon,use-carrier) in modeprobe.conf.
I hope this could be easily googled by youJ

No comments:

Post a Comment

Renew k8s certificates

Check If certificate expires: amikum@~:03:06:54(⎈ |local-cluster:default):sudo kubeadm certs check-expiration CERTIFICATE                EXP...