LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-21-2006, 08:13 AM   #1
debloxie
Member
 
Registered: Jul 2003
Posts: 153

Rep: Reputation: 30
Question Multi-Routing Multiple ISPs & 2 linuxboxes


Hello there,

I want to believe this is achievable, I have a linuxbox/squid/router-gateway doing NAT for a network of 172.16.0.0/24. The linuxbox has 2 eth cards (eth0 and eth1). eth0 has an ip of 196.1.176.50/28 and gateway is a cisco router at the ISP's end with 196.1.176.49/28. This is basicaly just routing to the fibre-switch(i dont know if the cisco really has anything to do with this but just thot to mention it here). The eth1 has an ip of 172.16.0.1/24.the LAN is in that range too and am perform SNAT.

Now due to incessant irregular service from the current ISP, a VSAT has been erected and commissioned has a redundant link for the 1st ISP. the first ISP's link is faster and will be the default while that of the second is slower and will be the failover. The isp IPs are 83.229.67.115/29 and the gateway is 83.229.67.113/29

Now there is another linuxbox/squid gateway as the first in a second location different from the first configured just the same and doing same thing as the first. The VSAT link is located where the first linuxbox is located. The second linuxbox connects to the same fibreswitch (1st ISP, so both linuxboxes use the 1st ISP. Now they both need to share the redundancy on the second VSAT.the second box at the other location has an IP of 196.1.176.59/28 on eth0 and gateway of 196.1.176.49/28. The eth1 LAN has 176.1.82.1/24. Its lan have this range also.

The output from the 1st linuxbox are :

[root@gw root]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:06:29:1F:85:16
inet addr:196.1.176.50 Bcast:196.1.176.63 Mask:255.255.255.240
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3713176 errors:0 dropped:0 overruns:0 frame:0
TX packets:6620913 errors:1 dropped:0 overruns:0 carrier:1
collisions:0 txqueuelen:1000
RX bytes:2651864608 (2529.0 Mb) TX bytes:999098648 (952.8 Mb)
Interrupt:27 Base address:0x2200 Memory:feb7f000-feb7f038



eth1 Link encap:Ethernet HWaddr 00:06:29:1F:85:17
inet addr:172.16.0.1 Bcast:172.16.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6755870 errors:0 dropped:0 overruns:0 frame:0
TX packets:4072199 errors:328 dropped:0 overruns:0 carrier:328
collisions:0 txqueuelen:1000
RX bytes:1024309114 (976.8 Mb) TX bytes:2994640499 (2855.9 Mb)
Interrupt:25 Base address:0x2240 Memory:feb7e000-feb7e038

imq0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING NOARP MTU:1500 Metric:1
RX packets:6737906 errors:0 dropped:0 overruns:0 frame:0
TX packets:6735217 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:30
RX bytes:923322088 (880.5 Mb) TX bytes:922246565 (879.5 Mb)

imq1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING NOARP MTU:1500 Metric:1
RX packets:4185739 errors:0 dropped:0 overruns:0 frame:0
TX packets:4072731 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:30
RX bytes:3028931597 (2888.6 Mb) TX bytes:2937645272 (2801.5 Mb)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:97876 errors:0 dropped:0 overruns:0 frame:0
TX packets:97876 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:14184768 (13.5 Mb) TX bytes:14184768 (13.5 Mb)


[root@gw root]# ip route show
196.1.176.48/28 dev eth0 scope link
172.16.0.0/24 dev eth1 scope link
169.254.0.0/16 dev eth1 scope link
127.0.0.0/8 dev lo scope link
default via 196.1.176.49 dev eth0


[root@gw root]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
196.1.176.48 0.0.0.0 255.255.255.240 U 0 0 0 eth0
172.16.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 196.1.176.49 0.0.0.0 UG 0 0 0 eth0


How can I be able to achieve this mulit-routing over 1 nic (eth0 on linuxbox 1 i think) , 2 ISPs and 2 differently located linuxboxes?
 
Old 07-21-2006, 09:09 AM   #2
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
Maybe you can just try to start a daemon who pings ISP1 once a minute, and if it is up then routing is set to point to it, else to ISP2? You can run it on both boxes or on one and use it as router by the second.
 
Old 07-21-2006, 09:43 AM   #3
debloxie
Member
 
Registered: Jul 2003
Posts: 153

Original Poster
Rep: Reputation: 30
This sounds logical to me. But i will want to know how the routes are setup with the situation i have on ground. 1 linuxbox with WAN (196.1.xxx.xxx) on the same switch as the 2nd link with a different subnet of IPs (83.229.xxx.xxx) then theres a wan uplink to the second location where the ip of the the wan interface of the 2nd box is also in the range 196.1.xxx.xxx.i want both boxes to be able to use the 83.229.xxx.xxx link when their own links are down thereby serving as redundancy.

Dou have routes command template or somewhere i read up or a script ?
 
Old 07-21-2006, 10:04 AM   #4
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
I don't know exactly.. You have to recompile kernel with something like 'policy routing', I guess. Search this, maybe. I just suggested solution that will work, I don't know details of policy routing.
 
Old 07-21-2006, 10:07 AM   #5
debloxie
Member
 
Registered: Jul 2003
Posts: 153

Original Poster
Rep: Reputation: 30
i have all that in the kernel such as advanced ip routing and policy.

I just need the get the proper route commands and tweaks to enable this function as a failover/redundancy.

I am trying to c what i can get from the net as well.

Cheers
 
Old 07-22-2006, 03:26 AM   #6
debloxie
Member
 
Registered: Jul 2003
Posts: 153

Original Poster
Rep: Reputation: 30
Any suggestions anyone?
 
Old 07-22-2006, 03:41 PM   #7
debloxie
Member
 
Registered: Jul 2003
Posts: 153

Original Poster
Rep: Reputation: 30
Just went thru the linux routing guide @ http://linux-ip.net/html/linux-ip.ht...multi-internet

Found it very informative and exhaustive (aint complaining but found very useful tips for other things as well). It in turn referred to me to this http://www.ssi.bg/~ja/#routes wch also suggested this Lokiwall site to me http://lokiwall.sourceforge.net/ although i cud not get a patch for my 2.4.31 kernel or the link wasnt working. i also went to LARTC site for Uplinking to multiple internet providers.

They are all good docs, i really need someone who has been thru this and has it working. I am not looking for an easy way coz right right now am breaking up my lab.

am using RH 9.0 on an IBM eserver 330 with 2 net cards. I have another one at another location from this first one but both are uplinked thru a wireless link so they can reach over locally. They are both squid servers/gateway. Their gateway is Cisco 2600 router just for routing traffic to the backbone Foundry switch. The 2 nd server and the cisco are in the same building while the 1st server and the new VSAT failover link are in the same place. The aim is for the servers to switch to the VSAT when the first link thru the Cisco switch is down and return bacl to it when its back up. So the VSAT link is just backup/redundancy. The 2 servers are identical. The kernel is 2.4.31.

I know i have two setup static routes here but i wud want to know how the failover redundancy will fit it.

Pls any help

Thanks
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
multi gateway routing problem hi100nu Linux - Networking 2 06-17-2006 01:24 PM
how to configure multi-nic routing meping Linux - Networking 20 10-24-2005 01:29 PM
How to Boot Multi Windows & Multi Linux olkar Linux - Newbie 5 10-03-2005 11:52 AM
Routing multiple subnets to multiple wans raven1000x Linux - Networking 1 03-10-2004 02:29 AM
Internet Failover (Multiple ISPs) ghight Linux - Networking 2 02-12-2004 03:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration