{"id":77,"date":"2011-02-10T14:06:54","date_gmt":"2011-02-10T14:06:54","guid":{"rendered":"http:\/\/192.168.50.22\/index.php\/2011\/02\/10\/bond\/"},"modified":"2026-03-17T21:11:29","modified_gmt":"2026-03-18T01:11:29","slug":"bond","status":"publish","type":"post","link":"https:\/\/smegnl.medina.oh.us\/?p=77","title":{"rendered":"Bond NICs in Linux"},"content":{"rendered":"<h3>Step #1: Create a bond0 configuration file<\/h3>\n<p><span style=\"font-size: small;\">Red Hat Linux stores network configuration in \/etc\/sysconfig\/network-scripts\/ directory. First, you need to create bond0 config file and add following lines to it:<\/span><\/p>\n<p><code>DEVICE=bond0<br \/>\nIPADDR=192.168.1.20<br \/>\nNETWORK=192.168.1.0<br \/>\nNETMASK=255.255.255.0<br \/>\nUSERCTL=no<br \/>\nBOOTPROTO=none<br \/>\nONBOOT=yes<\/code><\/p>\n<h3>Step #2: Modify eth0 and eth1 config files:<\/h3>\n<p><span style=\"font-size: small;\">Open configuration file<code>(\/etc\/sysconfig\/network-scripts\/ifcfg-eth0) <\/code>make sure file read as follows for eth0 interface<\/span><code> <\/code><\/p>\n<p><code>DEVICE=eth0<br \/>\nUSERCTL=no<br \/>\nONBOOT=yes<br \/>\nMASTER=bond0<br \/>\nSLAVE=yes<br \/>\nBOOTPROTO=none<\/code><\/p>\n<p><span style=\"font-size: small;\">Open eth1 configuration file (<code>\/etc\/sysconfig\/network-scripts\/ifcfg-eth1<\/code>) make sure file read as follows for eth1 interface<\/span><\/p>\n<p><code>DEVICE=eth1<br \/>\nUSERCTL=no<br \/>\nONBOOT=yes<br \/>\nMASTER=bond0<br \/>\nSLAVE=yes<br \/>\nBOOTPROTO=none<\/code><\/p>\n<h3>Step # 3: Load bond driver\/module<\/h3>\n<p><span style=\"font-size: small;\">NOTE&gt;&gt;&gt;For FC less then 11<\/span><\/p>\n<p><span style=\"font-size: small;\">Make sure bonding module is loaded when the channel-bonding interface (bond0) is brought up. You need to modify kernel modules configuration file<code> \/etc\/modprobe.conf<\/code><\/span><\/p>\n<p><span style=\"font-size: small;\">Append following two lines:<\/span><\/p>\n<p><code>alias bond0 bonding<br \/>\noptions bond0 mode=balance-alb miimon=100<\/code><\/p>\n<p><span style=\"font-size: small;\">Save file and exit to shell prompt<\/span><\/p>\n<h3>Step # 4: Test configuration<\/h3>\n<p><span style=\"font-size: small;\">First, load the bonding module:<\/span><\/p>\n<p><code> modprobe bonding<\/code><\/p>\n<p><span style=\"font-size: small;\">Restart networking service in order to bring up bond0 interface:<\/span><\/p>\n<p><code> service network restart<\/code><\/p>\n<p><span style=\"font-size: small;\">Verify everything is working:<\/span><\/p>\n<p><code>less \/proc\/net\/bonding\/bond0<\/code><\/p>\n<p><span style=\"font-size: small;\">You should see the following:<\/span><\/p>\n<pre>Bonding Mode: load balancing (round-robin)\nMII Status: up\nMII Polling Interval (ms): 0\nUp Delay (ms): 0\nDown Delay (ms): 0\n\nSlave Interface: eth0\nMII Status: up\nLink Failure Count: 0\nPermanent HW addr: 00:0c:29:c6:be:59\n\nSlave Interface: eth1\nMII Status: up\nLink Failure Count: 0\nPermanent HW addr: 00:0c:29:c6:be:63<\/pre>\n<p><span style=\"font-size: small;\">List all interfaces:<\/span><\/p>\n<p><code>ifconfig<\/code><\/p>\n<p><span style=\"font-size: small;\">You are looking for bond0, Eth0 and Eth1:<\/span><\/p>\n<pre>bond0     Link encap:Ethernet  HWaddr 00:0C:29:C6:BE:59\n inet addr:192.168.1.20  Bcast:192.168.1.255  Mask:255.255.255.0\n inet6 addr: fe80::200:ff:fe00:0\/64 Scope:Link\n UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1\n RX packets:2804 errors:0 dropped:0 overruns:0 frame:0\n TX packets:1879 errors:0 dropped:0 overruns:0 carrier:0\n collisions:0 txqueuelen:0\n RX bytes:250825 (244.9 KiB)  TX bytes:244683 (238.9 KiB)\n\neth0      Link encap:Ethernet  HWaddr 00:0C:29:C6:BE:59\n inet addr:192.168.1.20  Bcast:192.168.1.255  Mask:255.255.255.0\n inet6 addr: fe80::20c:29ff:fec6:be59\/64 Scope:Link\n UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1\n RX packets:2809 errors:0 dropped:0 overruns:0 frame:0\n TX packets:1390 errors:0 dropped:0 overruns:0 carrier:0\n collisions:0 txqueuelen:1000\n RX bytes:251161 (245.2 KiB)  TX bytes:180289 (176.0 KiB)\n Interrupt:11 Base address:0x1400\n\neth1      Link encap:Ethernet  HWaddr 00:0C:29:C6:BE:59\n inet addr:192.168.1.20  Bcast:192.168.1.255  Mask:255.255.255.0\n inet6 addr: fe80::20c:29ff:fec6:be59\/64 Scope:Link\n UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1\n RX packets:4 errors:0 dropped:0 overruns:0 frame:0\n TX packets:502 errors:0 dropped:0 overruns:0 carrier:0\n collisions:0 txqueuelen:1000\n RX bytes:258 (258.0 b)  TX bytes:66516 (64.9 KiB)\n Interrupt:10 Base address:0x1480<\/pre>\n<h3>Step # 5: Some issues I had<\/h3>\n<p><span style=\"font-size: small;\">The first issue was that I had no outgoing internet access once my NICs were bonded. I could get to the server just fine, but it couldnt get out.<\/span><\/p>\n<p><span style=\"font-size: small;\">I did a route command and got this:<\/span><\/p>\n<pre>Kernel IP routing table\nDestination Gateway Genmask Flags Metric Ref Use Ifacelink-local * 255.255.0.0 U 1004 0 0 \nbond010.95.0.0 * 255.255.0.0 U 0 0 0 \nbond010.95.0.0 * 255.255.0.0 U 1 0 0 \neth010.95.0.0 * 255.255.0.0 U 1 0 0 \neth1default 10.95.1.1 0.0.0.0 UG 0 0 0 eth1<\/pre>\n<p><span style=\"font-size: small;\">The problem was that my default gatway was bound to eth1 and not bond0. Open the config files for eth0 and eth1 and remove any GATEWAY settings. Open the bond0 config file and add GATEWAY=192.168.1.1 and save the file.<\/span><\/p>\n<p><span style=\"font-size: small;\">Restart networking service in order to bring up bond0 interface:<\/span><\/p>\n<p><code> service network restart<\/code><\/p>\n<p><span style=\"font-size: small;\">The second issue was DNS. Once I moved the gateway I had internet access, but I could not resolve names. Again the issue was that DNS was in eth1 and not in bond0. Open the bond0 config file and add DNS1=192.168.1.1 and save the file<\/span><\/p>\n<p><span style=\"font-size: small;\">Restart networking service in order to bring up bond0 interface:<\/span><\/p>\n<p><code> service network restart<\/code><\/p>\n<p><span style=\"font-size: small;\"><br \/>\n<\/span><\/p>\n<p><span style=\"font-size: small;\">That&#8217;s it. You now have bonded NICs<\/span><\/p>\n<p><span style=\"font-size: small;\">Credit goes to the every knowledgeable&nbsp;<a href=\"http:\/\/hamelic.medina.oh.us\">hamelic<\/a> for his help.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Step #1: Create a bond0 configuration file Red Hat Linux stores network configuration in \/etc\/sysconfig\/network-scripts\/ directory. First, you need to create bond0 config file and add following lines to it: DEVICE=bond0 IPADDR=192.168.1.20 NETWORK=192.168.1.0 NETMASK=255.255.255.0 USERCTL=no BOOTPROTO=none ONBOOT=yes Step #2: Modify eth0 and eth1 config files: Open configuration file(\/etc\/sysconfig\/network-scripts\/ifcfg-eth0) make sure file read as follows for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3014,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-77","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-figured-it-out"],"_links":{"self":[{"href":"https:\/\/smegnl.medina.oh.us\/index.php?rest_route=\/wp\/v2\/posts\/77","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/smegnl.medina.oh.us\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/smegnl.medina.oh.us\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/smegnl.medina.oh.us\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/smegnl.medina.oh.us\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=77"}],"version-history":[{"count":0,"href":"https:\/\/smegnl.medina.oh.us\/index.php?rest_route=\/wp\/v2\/posts\/77\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/smegnl.medina.oh.us\/index.php?rest_route=\/wp\/v2\/media\/3014"}],"wp:attachment":[{"href":"https:\/\/smegnl.medina.oh.us\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=77"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/smegnl.medina.oh.us\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=77"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/smegnl.medina.oh.us\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=77"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}