LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 01-17-2014, 05:25 AM   #1
ddeciimal
LQ Newbie
 
Registered: Jan 2014
Posts: 1

Rep: Reputation: Disabled
Question Slightly .. Confusing... muliple network routing..


Greeting.

Now for the question...
First the details...

I have two local networks...with 192.*.*.* and 172.16.*.*

They Are two different Floors..

Now for the Question..
I want use two different Internet connections.. nd linux boxes as gateways.
------------Editing it -----------I did earlier also
The Step 1 is using one connection...
The step 2 would come later on.. if conn 1 fails .. then.. I will switch it to a slower conn2 as a backup conn...
-------------Finish Edit..

with eth0 as real IP and eth1 as local IP.
on both boxes..

But now we want to migrate everything to a single box With ONE real IP.

and two diffrent Networks.

that is the
eth0 --> 202.x.x.x (Will be a real IP)
Netmask --> 255.0.0.0

eth1 --> 192.168.0.1 ( Will be the gateway for network one)
netmask 255.255.255.0

eth2 --> 172.16.0.1 (GW for network two)
netmask 255.255.255.0


Any Suggestions on how to do it..

Of somebody has already hacked together a script .. to do route together the network...


RS

Last edited by ddeciimal; 01-17-2014 at 08:31 AM.
 
Old 01-17-2014, 08:10 AM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,339

Rep: Reputation: Disabled
Using one router for multiple networks is not complicated in the slightest. However, I'm a bit comfused with regards to the Internet connection, as you first say you want to use two Internet connections, but in the example only one NIC has a public IP address. Could you clarify?

Otherwise, your setup will work if you simply:
  • assign IP addresses to each interface
  • enable routing on the Linux box
  • configure clients on both network to use the relevant IP address on the Linux box as a gateway
  • and finally NAT overload all outgoing traffic behind a public IP address
 
  


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
Mutiple IPs and network cards routing (source policy routing?) shogun1234 Linux - Networking 1 01-17-2013 12:09 AM
Routing to internet through one network, and to local ips in another network IceDane Linux - Networking 6 04-02-2009 01:21 AM
Muliple Network cards benb3342 Linux - Networking 3 02-03-2009 09:18 AM
Very confusing network problem bigmoe Linux - Networking 1 07-07-2006 06:15 AM
2 network cards, 2 network connections - routing problem tvojvodi Linux - Networking 4 02-24-2004 03:26 PM

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

All times are GMT -5. The time now is 02:27 AM.

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