alias bond0 bondingFor each configured channel bonding interface, there must be a corresponding entry in your new
/etc/modprobe.d/bonding.conf file.
Step 2: Creating Channle Bonding Interface
To create a channel bonding interface, create a file in the /etc/sysconfig/network-scripts/ directory called ifcfg-bond0. The following is a sample channel bonding configuration file.Note : IP Address may differ in your environment.
# vi /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0 IPADDR=192.168.1.8 NETMASK=255.255.255.0 ONBOOT=yes BOOTPROTO=none USERCTL=no
Step 3: Configuring Channel Bonding Interface
After the channel bonding interface is created, the network interfaces to be bound together must be configured by adding the MASTER and SLAVE directives to their configuration files. The configuration files for each of the channel-bonded interfaces can be nearly identical. For example, if two Ethernet interfaces are being channel bonded, both eth0 and eth1 may look like the following example. Edit physical interface card details as under.For eth0
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 USERCTL=no ONBOOT=yes MASTER=bond0 SLAVE=yes BOOTPROTO=none
For eth1
# vi /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1 USERCTL=no ONBOOT=yes MASTER=bond0 SLAVE=yes BOOTPROTO=noneThe above directives are self explanatory for many system admin, however, let me explain to newbie.
- DEVICE: Indicates what is the device name
- USERCTL: Indicates that can user control this device(here its no)
- ONBOOT: Indicates that at the boot time do this device should be up?
- MASTER: Is this device has master? Then what it is(here its bond0)
- SLAVE: Is this device acting as slave?
- BOOTPROTO: What about getting IP Address from DHCP? It’s set to none which indicate it’s a static IP)
Step 4: Restarting Network Service
Restart the network service and see the output of ifconfig.# service network restart
[root@tecmint network-scripts]# ifconfig bond0 Link encap:Ethernet HWaddr 00:0C:21:60:30:C4 inet addr:192.168.1.8 Bcast:172.16.1.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fe69:31c4/64 Scope:Link UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1 RX packets:19676 errors:0 dropped:0 overruns:0 frame:0 TX packets:342 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1623240 (1.5 MiB) TX bytes:42250 (41.2 KiB) eth0 Link encap:Ethernet HWaddr 00:0C:21:60:30:C4 UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1 RX packets:10057 errors:0 dropped:0 overruns:0 frame:0 TX packets:171 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:832257 (812.7 KiB) TX bytes:22751 (22.2 KiB) Interrupt:19 Base address:0x2000 eth1 Link encap:Ethernet HWaddr 00:0C:21:60:30:C4 UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1 RX packets:9620 errors:0 dropped:0 overruns:0 frame:0 TX packets:173 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:791043 (772.5 KiB) TX bytes:20207 (19.7 KiB) Interrupt:19 Base address:0x2080 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:2 errors:0 dropped:0 overruns:0 frame:0 TX packets:2 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:104 (104.0 b) TX bytes:104 (104.0 b)