Static routes between two LANS each with their own ADSL line out
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Static routes between two LANS each with their own ADSL line out
HELLO
Hi Y'all. GNU/Linux gods, guides and superbrains.
Don't be moddest. I'ts YOU i'm taking about !!
I'll be your humble problem-describer-pixie / solution-testing-smerf :
Andreas Vinther, 1977, from Denmark
SIMPLE NETWORK PROBLEM
I'm trying to establish a connection between two seperate ADSL LANs (coming into the house, but from separate ISPs) to a situation where all hosts on either LAN will be able to reach any host on eiher LAN WITHOUT having to use an excess of plastic routers around the house, and please no Wireless bridges. WiFi will only be available as Access Points.
.... so i thought to myself... hey I've heard that Debian does this kind of static routintg / RIP stuff quite well.
And I just happen to have one lined up in the right place, that haven't got at snowballs chance in hell of running WINXP or above.
But it kills at textbased datamanipulation/forwarding/rerouting/dropping/scanning ... so I'vew made up my mind.
That is what I want to do... Now how do io get around doing stuff like that.
FIRST SOME INFO
The Debian box is connected to both networks: Hostname: AsusAnd
(192.168.1.0/24 - TDC network)
and to
(192.168.15.0/24 - Profiber network)
Needless to say, but both netmasks are 255.25.255.0 hence the /24
The respective router's LAN addresses are 192.168.1.1 and 192.168.15.1
My Debian are locked to the following IP's (reserved DHCP):
eth0:192.158.1.56 via DHCP from 192.168.1.1
eth1:192.168.15.177 via DHCP from 192.168.15.1
So far so good - Now here we go !!
LET ME BE CLEAR FROM THE START
This is not a scenario where i'd like to always want all network-packages to travel the shortest path, nor NESSESARILY use the other ISPs gateway if the first is down or slow, although that'll be super nice.
I suspect that'll involve router-protocols like RIP.
I'll be super pleased to get some guidelines there as well, as i suspect it'll be quite easy to implement once everything else is in place.
Although RIP isn't our main goal, it probably comes as a close second. I think we all would like as stable and fast a connection as possible.
I was actually so naive that i thought if i added two static routes to the two routers x.x.1.1 and x.x.15.1, that my problems would automatically be solved by my Debian box, and that it would automatically act as a gateway when the routers send their packages for the other net. As long as i was connected to both LANs at the same time.
Note: I haven't changed or tweaked the Debian kernel to do routing. this is a simple stable install from the net-inst.iso of Debian 5.
I'd like to keep it that way unless there's no way around it.
So, my routers have static routes to each other (WITH PROPER CABLING), configured as follows:
(On router with LAN 192.168.1.1)
[static route] to 192.168.15.0 with nmask 255.255.255.0 going throuhg gateway 192.158.1.56 ( Taken from above info ) - metric around 2
Similary on my other NIC directly cabled to another switch ---and-then-to-another---> Router
(On router with LAN 192.168.15.1)
[static route] to 192.168.1.0 with subnetmask 255.255.255.0 goling throuhg gateway 192.158.15.177 ( Taken from above info ) - metric around 2
This is clearly not enough for the two subnets to see each other and address each other without further actions.
Except, (and this pisses me off) when i substitute my Debian box for a Windows, it works right out of the box.
Then again, Windows is famous for running all sorts of services if you don't trim/tweak your box.
Thaths a bit taunting. I don't want a giant unreliable M$ machine with most of it's RAM beeing tied up for completely unusable graphics, services and a supersize kernel, when I'll hardly ever watch the screen (except maybe to tweak/update through remote connections like: PuTTY, XWin32; etc.)
but hey ... come on .... who the hell wants pricy Windows box there when an old Pentium 166 from a nearby dumbster can do the trick with Linux, ??? Right !!
A DOLLAR FOR YOUR THOUGHTS
Soooooo
I CAN solve this with two additional routers, but that seems to be so confusing, hiddeous and overkill.
What is the EASIEST way to solve this?
What is the BEST way to solve trhis?
Can RIP or another router protocol be easily implemented for the connection to have some redundands in case someone cuts a cable or one of my ISPs malfuntions?
Will I be best served with re-compiling my kernel with some much needed router modules. (Sort of how it just worked with the windows kernel straight from the get-go)
Can I simply add the correct static routes to my router-table?
Can I invite RIP inside and let that handle the router-table internally as well as externally see point 3 above.
Which routes do i need to add to my Debian box and/or which modules in my kernel.
Are there any problems somewhere that i missed or opportunities for things to be running smoother, more self correcting, with more redundands or easier to manage and monitor ???
SIMPLY PUT
I need my debian box to handle packages that is receives on eth1 but destined for eth2 to be forwarded to eth2
and the other way around, so that printers and AccessPoints, etc. can be shared throughout the house.
HELP WANTED
Please help me u superhuman linux wondersd around the world. I'll buy coffee to everyone with a clue to guide me in the correct direction.
THANKS a lot in advance.....You guys are SO COOL (and i'm getting a bit chilled myself)
Also if you need root passwords for either of my machines.... please refer to the yellow pages between screw~up and tool
If you need more info on routers, router-tables, hardware specs or other info related to the hosts in my simple network architecture..
Please write me @ my email below:
superanden(7*(5+6))@gmail.com
Just to ward off spammers. There are no parenthesis in my emailaddress. So you do the nath ..... litterally
Seriously any/all help will be very graciously appreciated...
And from the bottom of my heart: THANKS TO THE LOT OF U.
U know who you are. You who help all of us clueless persons to get further and further into the jungle-SuperHighway.
WHY DO IT ALL
I prey that i some day will be able to help some of your with on of your problems (we can't know it all, but we can aspire to do so)- And if I can't help you or your relatives; then maybe just help another fellow not unlike myself to go and do GRAND things in life.
Don't forget why we help each other out, and why we, the people, must hold on to our freely available sourcecode and licenses like GPL and even better.
IT'S ABOUT BEEING IN CONTROL OF SOME OF THE KNOWLEDGE BY SHARING IT WITH THE WORLD !!!
Just look at "OUR" ooperating system GNU/LINUX- It may have started as a simple Minix look-a-like OS for familiarity by Linus and brought to heaven by so many volunteers....Let the best minds come together and play without the omnipresent alternate agenda
wow, nice post, first off, did you turn on forwarding on the debian box? (cat /proc/sys/net/ipv4/ip_forwarding to see the current state; echo 1 > /proc/sys/net/ipv4/ip_forwarding to turn it on, you'll also want to set it up in your sysctl.conf)
second you can set up two default routes just use iproute2 (which you might have to install)
add a table for each in /etc/iproute2/rt_tables
10 isp1
11 isp2
then add some routing info
ip route add default via 192.168.1.1 table isp1
ip route add default via 192.168.15.1 table isp2
ip rule add from 192.168.1.56 table isp1
ip rule add from 192.168.15.177 table isp2
and third if routing still isn't working going from one network to the other you could always mask the packets when they transition (though I wouldn't do this unless you really had to, since those routes you added to the adsl routers should work just fine)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.