DEVICE=bond0
IPADDR=192.168.1.11
NETWORK=192.168.1.0
NETMASK=255.255.255.0
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
DEVICE=eth0
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
DEVICE=eth1
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
alias bond0 bonding
options bond0 mode=balance-alb miimon=100
bond0 Link encap:Ethernet HWaddr 00:0C:29:82:0F:46
inet addr:192.168.1.11 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe82:f46/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:2313 errors:0 dropped:0 overruns:0 frame:0
TX packets:2372 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1591448 (1.5 MiB) TX bytes:806958 (788.0 KiB)
eth0 Link encap:Ethernet HWaddr 00:0C:29:82:0F:46
inet6 addr: fe80::20c:29ff:fe82:f46/64 Scope:Link
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:2187 errors:0 dropped:0 overruns:0 frame:0
TX packets:1826 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1564864 (1.4 MiB) TX bytes:583939 (570.2 KiB)
Interrupt:185 Base address:0×1400
eth1 Link encap:Ethernet HWaddr 00:0C:29:82:0F:46
inet6 addr: fe80::20c:29ff:fe82:f46/64 Scope:Link
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:126 errors:0 dropped:0 overruns:0 frame:0
TX packets:546 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:26584 (25.9 KiB) TX bytes:223019 (217.7 KiB)
Interrupt:169 Base address:0×1480
As you can see, we now have one ip for both NICs in the form of bond0. If u want to test this method and ensure it will work when a NIC fails or is disconnected, simply use this command to shutdown one NIC - simulating a NIC failure.
Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.
Comments (2)
Author
Commented:lol this not my site and i never ever went to that cant prove that though!!
do whatever you think appropriate......... enough said!
Commented:
Do I just add it to the bond0 config file as GATEWAY=xxx.xxx.xxx.xxx?