Hello, I am connected to 2 different ISPs using a single NIC and different IPs. // routing table liviudm:~ # route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 85.x.x.0 85.x.x.1 255.255.255.0 UG 0 0 0 eth0 86.x.x.0 * 255.255.254.0 U 0 0 0 eth0 link-local * 255.255.0.0 U 0 0 0 eth0 10.0.0.0 * 255.224.0.0 U 0 0 0 eth0 loopback * 255.0.0.0 U 0 0 0 lo default 86.x.x.1 0.0.0.0 UG 0 0 0 eth0 // ifconfig output liviudm:~ # ifconfig eth0 Link encap:Ethernet HWaddr 00:40:F4:42:CE:E4 inet addr:86.x.x.45 Bcast:86.x.x.255 Mask:255.255.254.0 inet6 addr: fe80::240:f4ff:fe42:cee4/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:3497828 errors:177 dropped:0 overruns:0 frame:0 TX packets:1887956 errors:0 dropped:0 overruns:8 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1132482541 (1080.0 Mb) TX bytes:567938046 (541.6 Mb) Interrupt:11 Base address:0x2000 eth0:anet Link encap:Ethernet HWaddr 00:40:F4:42:CE:E4 inet addr:85.x.x.45 Bcast:85.x.x.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:11 Base address:0x2000 eth0:lan Link encap:Ethernet HWaddr 00:40:F4:42:CE:E4 inet addr:10.1.5.224 Bcast:10.31.255.255 Mask:255.224.0.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:11 Base address:0x2000 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:507 errors:0 dropped:0 overruns:0 frame:0 TX packets:507 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:34687 (33.8 Kb) TX bytes:34687 (33.8 Kb) // end of config Is there any possibility to use both connections as a single line? Like eth0-speed + eth0:anet-speed = usable speed. If not is there any way to use one connection for bittorrent downloads (I'm using Azureus) and the other one for browsing (Firefox)? Best wishes, -- Damian Mihai Liviu Phone: +40741226993 Yahoo: liviudm_cisco URL: http://liviudm.blogspot.com
Dazzle wrote:
Hello,
I am connected to 2 different ISPs using a single NIC and different IPs.
Is there any possibility to use both connections as a single line? Like eth0-speed + eth0:anet-speed = usable speed. If not is there any way to use one connection for bittorrent downloads (I'm using Azureus) and the other one for browsing (Firefox)?
I'm not sure how you manage to have two networks on a single NIC (85.x.x.x and 86.x.x.x) - are you positive this really works?? But iptables will do some of the work for you. As for actually sharing the bandwidth, you need to look at bonding two interfaces. /Per Jessen, Zürich
Hello,
On 10/12/05, Per Jessen
I'm not sure how you manage to have two networks on a single NIC (85.x.x.x and 86.x.x.x) - are you positive this really works?? But iptables will do some of the work for you. As for actually sharing the bandwidth, you need to look at bonding two interfaces.
Believe me, it works :-) The lines are provided by another mini-ISP who is using the second provider as a backup line but it's accessible all the time so you can choose on witch connection you'll get out. Thanks for the hint. I'll read some documentation about bonding and I hope it will work. Best wishes, -- Damian Mihai Liviu Phone: +40741226993 Yahoo: liviudm_cisco URL: http://liviudm.blogspot.com
Dazzle wrote:
Hello,
On 10/12/05, Per Jessen
wrote: I'm not sure how you manage to have two networks on a single NIC (85.x.x.x and 86.x.x.x) - are you positive this really works?? But iptables will do some of the work for you. As for actually sharing the bandwidth, you need to look at bonding two interfaces.
Believe me, it works :-) The lines are provided by another mini-ISP who is using the second provider as a backup line but it's accessible all the time so you can choose on witch connection you'll get out. Thanks for the hint. I'll read some documentation about bonding and I hope it will work.
It also works for me, and it also worked like this during "Eurobasket 2005", where I had set it up this way, through a single ethernet and two independent 2Mb/s internet connections. -- Siniša Bandin Novi Sad Serbia&Montenegro Europe planet Earth phone: +381 63 582 161
Dazzle wrote:
Hello,
I am connected to 2 different ISPs using a single NIC and different IPs.
// routing table liviudm:~ # route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 85.x.x.0 85.x.x.1 255.255.255.0 UG 0 0 0 eth0 86.x.x.0 * 255.255.254.0 U 0 0 0 eth0 link-local * 255.255.0.0 U 0 0 0 eth0 10.0.0.0 * 255.224.0.0 U 0 0 0 eth0 loopback * 255.0.0.0 U 0 0 0 lo default 86.x.x.1 0.0.0.0 UG 0 0 0 eth0
// ifconfig output liviudm:~ # ifconfig eth0 Link encap:Ethernet HWaddr 00:40:F4:42:CE:E4 inet addr:86.x.x.45 Bcast:86.x.x.255 Mask:255.255.254.0 inet6 addr: fe80::240:f4ff:fe42:cee4/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:3497828 errors:177 dropped:0 overruns:0 frame:0 TX packets:1887956 errors:0 dropped:0 overruns:8 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1132482541 (1080.0 Mb) TX bytes:567938046 (541.6 Mb) Interrupt:11 Base address:0x2000
eth0:anet Link encap:Ethernet HWaddr 00:40:F4:42:CE:E4 inet addr:85.x.x.45 Bcast:85.x.x.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:11 Base address:0x2000
eth0:lan Link encap:Ethernet HWaddr 00:40:F4:42:CE:E4 inet addr:10.1.5.224 Bcast:10.31.255.255 Mask:255.224.0.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:11 Base address:0x2000
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:507 errors:0 dropped:0 overruns:0 frame:0 TX packets:507 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:34687 (33.8 Kb) TX bytes:34687 (33.8 Kb)
// end of config
Is there any possibility to use both connections as a single line? Like eth0-speed + eth0:anet-speed = usable speed. If not is there any way to use one connection for bittorrent downloads (I'm using Azureus) and the other one for browsing (Firefox)?
I am using similar setup @home. All you have to do is add somewhere following command: # ip route add default scope global \ nexthop via 85.x.x.45 dev eth0 weight 2 \ nexthop via 10.1.5.224 dev eth0 weight 1 In this example I am asuming that first line is twice as fast as second, so we want 2/3 of connections to go through it, and remaining 1/3 through second one. Please adjust according to your bandwidths. Now, this is not really "using both connections as a single line" but is "using both connections at the same time". This works GREAT with azureus, because it makes/receives many connections which are not very fast each, but aggregated you get full speed of both lines (well at least if there is enough seeders/peers). Problem with this setup is that if your bandwidths are very different, it will happen from time to time that you will start a large download, and that connection will, in some random order, go through you slower line. In that case, it sometimes helps to flush your routing table like this: # ip route delete default # ip route flush cache and then rerun previous "ip route add..." command. You could also create a script to do all of that automaticaly... -- Siniša Bandin Novi Sad Serbia&Montenegro Europe planet Earth phone: +381 63 582 161
Hello,
On 10/12/05, Sinisa Bandin
I am using similar setup @home. All you have to do is add somewhere following command:
# ip route add default scope global \ nexthop via 85.x.x.45 dev eth0 weight 2 \ nexthop via 10.1.5.224 dev eth0 weight 1
The second routable IP is 86.x.x.45, I think I should use that, not 10.1.5.224, am I right?
Problem with this setup is that if your bandwidths are very different, it will happen from time to time that you will start a large download, and that connection will, in some random order, go through you slower line. In that case, it sometimes helps to flush your routing table like this:
Both connections are 256kbps... Can you give me the output of your /sbin/route please? Best wishes, -- Damian Mihai Liviu Phone: +40741226993 Yahoo: liviudm_cisco URL: http://liviudm.blogspot.com
Dazzle wrote:
Hello,
On 10/12/05, Sinisa Bandin
wrote: I am using similar setup @home. All you have to do is add somewhere following command:
# ip route add default scope global \ nexthop via 85.x.x.45 dev eth0 weight 2 \ nexthop via 10.1.5.224 dev eth0 weight 1
The second routable IP is 86.x.x.45, I think I should use that, not 10.1.5.224, am I right?
Problem with this setup is that if your bandwidths are very different, it will happen from time to time that you will start a large download, and that connection will, in some random order, go through you slower line. In that case, it sometimes helps to flush your routing table like this:
Both connections are 256kbps... Can you give me the output of your /sbin/route please?
Sorry, I've made a mistake... hurring is neveg a good thing: # ip route add default scope global \ nexthop via 85.x.x.45 dev eth0 weight 2 \ nexthop via 10.1.5.224 dev eth0 weight 1 should be: # ip route add default scope global \ nexthop via 85.x.x.1 dev eth0 weight 2 \ nexthop via 10.1.5.x dev eth0 weight 1 where 85.x.x.1 and 10.1.5.x are your gateways to ISP. Do not try this with /sbin/route, it cannont understand more than one default route. "ip" is the command to use: read "man ip". This is my output of "ip route" command: 80.x.y.7 dev ppp0 proto kernel scope link src 80.x.y.70 172.a.b.0/24 dev eth0 proto kernel scope link src 172.a.b.247 127.0.0.0/8 dev lo scope link default nexthop via 80.x.y.7 dev ppp0 weight 4 nexthop via 172.a.b.1 dev eth0 weight 1 where 80.x.y.70 / 172.a.b.247 are my interfaces addresses, and 80.x.y.7 / 172.a.b.1 are default gateways ... I am using PPPOE for a 512 kb/s connection, but since my ISP also provides me with a DHCP assigned address on eth0, which is limited to 128 kb/s, I'm using this link too, so I get 512+128 kb/s :) (actualy, last night it went up to 1.5 Mb/s ;) ) Best regards, -- Siniša Bandin Novi Sad Serbia&Montenegro Europe planet Earth phone: +381 63 582 161
Dazzle escribió:
Hello,
I am connected to 2 different ISPs using a single NIC and different IPs.
read this http://www.shorewall.net/Shorewall_and_Routing.html#id2460800
Hello, On 10/13/05, Cristian Rodriguez wrote:
read this
http://www.shorewall.net/Shorewall_and_Routing.html#id2460800
Another question... al the examples are using 2 eth devices (eth0 and eth1). I have eth0 and eth0:anet. With what should I change eth1? eth0 or eth0:anet? -- Damian Mihai Liviu Phone: +40741226993 Yahoo: liviudm_cisco URL: http://liviudm.blogspot.com
Dazzle wrote:
Hello,
On 10/13/05, Cristian Rodriguez wrote:
read this
http://www.shorewall.net/Shorewall_and_Routing.html#id2460800
Another question... al the examples are using 2 eth devices (eth0 and eth1). I have eth0 and eth0:anet. With what should I change eth1? eth0 or eth0:anet?
Just use eth0 for both. WARNING: do NOT attempt this in SuSE 10.0 ! It worked for me in SuSE 9.3, but since I have upgraded to 10.0 my /var/log/messages is full of messages like this: Oct 13 13:53:07 home kernel: Badness in dst_release at include/net/dst.h:154 Oct 13 13:53:07 home kernel: [<c0288974>] __kfree_skb+0x174/0x180 Oct 13 13:53:07 home kernel: [<c02cb317>] arp_process+0x87/0x4a0 Oct 13 13:53:07 home kernel: [<c02cb805>] arp_rcv+0xd5/0x140 Oct 13 13:53:07 home kernel: [<c028e15f>] netif_receive_skb+0x21f/0x320 Oct 13 13:53:07 home kernel: [<c028e2d9>] process_backlog+0x79/0x100 Oct 13 13:53:07 home kernel: [<c028e3dc>] net_rx_action+0x7c/0x150 Oct 13 13:53:07 home kernel: [<c0120bb3>] __do_softirq+0x43/0xa0 Oct 13 13:53:07 home kernel: [<c0120c36>] do_softirq+0x26/0x30 Oct 13 13:53:07 home kernel: [<c01055ed>] do_IRQ+0x3d/0x60 Oct 13 13:53:07 home kernel: [<c0103dea>] common_interrupt+0x1a/0x20 From time to time network stops working, and the only cure is to reboot. Search on google says this is known problem with this kind of load balancing, caused by "route cache", and that it is necesary to turn it of and recompile the kernel. Didn't try that yet, maybe tomorrow... -- Siniša Bandin Novi Sad Serbia&Montenegro Europe planet Earth phone: +381 63 582 161
Sinisa Bandin escribió:
It worked for me in SuSE 9.3, but since I have upgraded to 10.0 my /var/log/messages is full of messages like this:
Oct 13 13:53:07 home kernel: Badness in dst_release at include/net/dst.h:154 Oct 13 13:53:07 home kernel: [<c0288974>] __kfree_skb+0x174/0x180 Oct 13 13:53:07 home kernel: [<c02cb317>] arp_process+0x87/0x4a0 Oct 13 13:53:07 home kernel: [<c02cb805>] arp_rcv+0xd5/0x140 Oct 13 13:53:07 home kernel: [<c028e15f>] netif_receive_skb+0x21f/0x320 Oct 13 13:53:07 home kernel: [<c028e2d9>] process_backlog+0x79/0x100 Oct 13 13:53:07 home kernel: [<c028e3dc>] net_rx_action+0x7c/0x150 Oct 13 13:53:07 home kernel: [<c0120bb3>] __do_softirq+0x43/0xa0 Oct 13 13:53:07 home kernel: [<c0120c36>] do_softirq+0x26/0x30 Oct 13 13:53:07 home kernel: [<c01055ed>] do_IRQ+0x3d/0x60 Oct 13 13:53:07 home kernel: [<c0103dea>] common_interrupt+0x1a/0x20
open a bug report..
Cristian Rodriguez wrote:
Sinisa Bandin escribió:
It worked for me in SuSE 9.3, but since I have upgraded to 10.0 my /var/log/messages is full of messages like this:
Oct 13 13:53:07 home kernel: Badness in dst_release at include/net/dst.h:154 Oct 13 13:53:07 home kernel: [<c0288974>] __kfree_skb+0x174/0x180 Oct 13 13:53:07 home kernel: [<c02cb317>] arp_process+0x87/0x4a0 Oct 13 13:53:07 home kernel: [<c02cb805>] arp_rcv+0xd5/0x140 Oct 13 13:53:07 home kernel: [<c028e15f>] netif_receive_skb+0x21f/0x320 Oct 13 13:53:07 home kernel: [<c028e2d9>] process_backlog+0x79/0x100 Oct 13 13:53:07 home kernel: [<c028e3dc>] net_rx_action+0x7c/0x150 Oct 13 13:53:07 home kernel: [<c0120bb3>] __do_softirq+0x43/0xa0 Oct 13 13:53:07 home kernel: [<c0120c36>] do_softirq+0x26/0x30 Oct 13 13:53:07 home kernel: [<c01055ed>] do_IRQ+0x3d/0x60 Oct 13 13:53:07 home kernel: [<c0103dea>] common_interrupt+0x1a/0x20
open a bug report.. Could not log into bugzilla. Will try later...
-- Siniša Bandin Novi Sad Serbia&Montenegro Europe planet Earth phone: +381 63 582 161
On Wednesday 12 October 2005 4:43 pm, Dazzle wrote:
I am connected to 2 different ISPs using a single NIC and different IPs.
You could try looking at floppyfw. There are loadbalancing packages available for that, which you might like to use. FFW and Freesco work on dumpsterware machines: 386/486/P90 + 12MB RAM and just one working floppy drive. No need for a noisy 500MB hard disk, nor need to dispose of the waste heat. I reckon that you should be using a separate dedicated firewall box anyway. Your router/firewall is a "magic box" that sits in the corner. All the people on the LAN need to know is that it is how you get to the big-bad-world. What ISP and kind of modems is none of their business. -- Simon Dales, Software Consultant "The impossible is easy"
participants (5)
-
Cristian Rodriguez
-
Dazzle
-
Per Jessen
-
Simon Dales
-
Sinisa Bandin