Redundant Configuration for NIC (bonding)2013/07/23 |
Set Redundant Configuration for NIC (bonding).
This example based on the environment that the computer has 2 NIC and Interface name is eth0 and eth1. Please replace those values for your environment. |
|
[1] | Configure bonding |
[root@dlp ~]#
vi /etc/sysconfig/network-scripts/ifcfg-eth0 # change like follows DEVICE=eth0 TYPE=Ethernet ONBOOT=yes BOOTPROTO=none IPV6INIT=no USERCTL=no MASTER=bond0 SLAVE=yes
[root@dlp ~]#
vi /etc/sysconfig/network-scripts/ifcfg-eth1 # change like follows DEVICE=eth1 TYPE=Ethernet ONBOOT=yes BOOTPROTO=none IPV6INIT=no USERCTL=no MASTER=bond0 SLAVE=yes
[root@dlp ~]#
vi /etc/sysconfig/network-scripts/ifcfg-bond0 # Create new like follows (replace the IPADDR/GATEWAY/DNS1 to your values) DEVICE=bond0 TYPE=Ethernet ONBOOT=yes BOOTPROTO=none IPV6INIT=no USERCTL=no IPADDR=10.0.0.100 GATEWAY=10.0.0.1 DNS1=10.0.0.10 BONDING_OPTS="mode=1 primary=eth0 miimon=500" /etc/rc.d/init.d/network restart Shutting down interface bond0: [ OK ] Shutting down loopback interface: [ OK ] Bringing up loopback interface: [ OK ] Bringing up interface bond0: [ OK ][root@dlp ~]# bond0 Link encap:Ethernet HWaddr 00:24:1D:13:7A:26 inet addr:10.0.0.100 Bcast:10.255.255.255 Mask:255.0.0.0 inet6 addr: fe80::224:1dff:fe13:7a26/64 Scope:Link UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1 RX packets:4588926 errors:0 dropped:1425 overruns:0 frame:0 TX packets:2067375 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:6939378147 (6.4 GiB) TX bytes:141018635 (134.4 MiB) eth0 Link encap:Ethernet HWaddr 00:24:1D:13:7A:26 UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1 RX packets:322066 errors:0 dropped:0 overruns:0 frame:0 TX packets:285472 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:485688628 (463.1 MiB) TX bytes:20867225 (19.9 MiB) eth1 Link encap:Ethernet HWaddr 00:1D:73:78:94:1E UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1 RX packets:4266861 errors:0 dropped:1425 overruns:0 frame:0 TX packets:1781904 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:6453689579 (6.0 GiB) TX bytes:120151644 (114.5 MiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:12 errors:0 dropped:0 overruns:0 frame:0 TX packets:12 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:720 (720.0 b) TX bytes:720 (720.0 b) |
[2] |
The Configuration is completed.
Please make sure it works normally to unplug a cable.
|
||||||||||||||||||||||||
The example above shows to set the Mode "1" but there are some other Mode like follows.
|
Sponsored Link |
|