Results 1 to 3 of 3
Hey, I need some help. I have been googling for three days, and I though posting to a forum would be more helpful than throwing my box out the window.
...
- 02-17-2011 #1Just Joined!
- Join Date
- Feb 2011
- Posts
- 2
Problems with bonding and dhcp
Hey, I need some help. I have been googling for three days, and I though posting to a forum would be more helpful than throwing my box out the window.
Here's what I want to do:
gonesouthcomputing.com/images/temp/networkproblems.jpg
__________________________________eth1---isp1
private network---eth0 <--nat--> bond0 <
~~~~~~~~~~~~~~~~~~~~~~~~~~~eth2---isp2
I was able to bond eth1 and eth2 together as bond0, but I am having problems with setting up two gateways on bond0. I can set one (eg ISP1) and all the traffic always routes through that ISP. Thus defeating the purpose of bonding.
eth1 and eth2 pull an ip just fine and were able to ping the internet before bonding.
Originally, I set the bond0 ip to the same subnet at my internal network, but I read that in order to set up nat you need to have the adapters on two seperate subnets.
Every time I fix one issue with this scenario something else breaks. I have tried dozens of different configurations. I am relatively sure that it is just a routing table issue, but I was wondering if anyone could point me in the right direction.
here is my ifconfig:
here is netstat -nr (I have changed this many times to add gateways to bond0, but can only seem to add one gateway route for one isp)Code:bond0 Link encap:Ethernet HWaddr 00:14:D1:1D:00:00 inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::214:d1ff:fe1d:650b/64 Scope:Link UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1 RX packets:15459 errors:0 dropped:0 overruns:0 frame:0 TX packets:23 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1235724 (1.1 MiB) TX bytes:1596 (1.5 KiB) eth0 Link encap:Ethernet HWaddr 00:25:64:AC:00:00 inet addr:10.10.17.252 Bcast:10.10.17.255 Mask:255.255.255.0 inet6 addr: fe80::225:64ff:feac:39c/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:722 errors:0 dropped:0 overruns:0 frame:0 TX packets:605 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:77279 (75.4 KiB) TX bytes:122473 (119.6 KiB) Interrupt:169 Memory:dfbf0000-dfc00000 eth1 Link encap:Ethernet HWaddr 00:14:D1:1D:00:00 UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1 RX packets:15429 errors:0 dropped:0 overruns:0 frame:0 TX packets:12 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1233924 (1.1 MiB) TX bytes:896 (896.0 b) Interrupt:169 Base address:0xe00 eth2 Link encap:Ethernet HWaddr 00:14:D1:1D:00:00 UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1 RX packets:30 errors:0 dropped:0 overruns:0 frame:0 TX packets:11 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1800 (1.7 KiB) TX bytes:700 (700.0 b) Interrupt:217 Base address:0x2f00 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:1708 errors:0 dropped:0 overruns:0 frame:0 TX packets:1708 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:396134 (386.8 KiB) TX bytes:396134 (386.8 KiB)
here is my dhcpd.conf fileCode:Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 bond0 10.10.17.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0 0.0.0.0 10.10.17.254 0.0.0.0 UG 0 0 0 eth0
here is ifcfg-eth0Code:# DHCP Server Configuration file. # see /usr/share/doc/dhcp*/dhcpd.conf.sample # ddns-update-style interim; subnet 10.10.17.0 netmask 255.255.255.0 { option routers 10.10.17.252; option subnet-mask 255.255.255.0; option time-offset -17000; range 10.10.17.0 10.10.17.255; }
here is ifcfg-eth1Code:# Broadcom Corporation NetLink BCM5784M Gigabit Ethernet PCIe DEVICE=eth0 BOOTPROTO=dhcp DHCPCLASS= HWADDR=00:25:64:AC:03:EF ONBOOT=yes DHCP_HOSTNAME=myhostname.local
here is ifcfg-eth2Code:# Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ DEVICE=eth1 BOOTPROTO=none ONBOOT=yes USERCTL=no MASTER=bond0 SLAVE=yes
here is ifcfg-bond0Code:# Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ DEVICE=eth2 BOOTPROTO=none ONBOOT=yes USERCTL=no MASTER=bond0 SLAVE=yes
I appreciate any help you can offer. Thanks!Code:DEVICE=bond0 IPADDR=192.168.1.1 NETMASK= NETWORK= BROADCAST= GATEWAY= ONBOOT=yes BOOTPROTO=none USERCTL=no
- 02-18-2011 #2There seems to be a misunderstanding.Thus defeating the purpose of bonding.
Bonding will help you to failover a NIC, in case one breaks.
Bonding may also increase the available bandwidth.
But you cannot use it to upstream to two different ISPs.
See a bonded NIC as just one.
You might want to look into the advanced routing howto as a starting point.
Linux Advanced Routing & Traffic Control HOWTOYou must always face the curtain with a bow.
- 02-18-2011 #3Just Joined!
- Join Date
- Feb 2011
- Posts
- 2
Well, that would explain why I was having so much trouble getting this accomplishedBut you cannot use it to upstream to two different ISPs.
See a bonded NIC as just one.
Thank you for your quick reply. I will post back when I find a solution using your link.


Reply With Quote