LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 11-04-2004, 04:45 AM   #1
Rajesh_Amma
LQ Newbie
 
Registered: Nov 2004
Location: India
Distribution: RedHat
Posts: 6

Rep: Reputation: 0
Multiple gateways for a host machiene


Hi,

I have two different routers in my network. So for a host m/c some packets should be send thru one gateway and some packets in the othergateway. how can i specify multiple gateways in my host configuration. Pls help me in this regard
 
Old 11-04-2004, 05:06 AM   #2
n0sr
Member
 
Registered: Sep 2004
Location: 127.0.0.1
Distribution: Slackware 13; Ubuntu Raspberry Pi OS
Posts: 255

Rep: Reputation: 34
You can use the route command to set up multiple routes. You need to know the router IP address and the interface it is connected to. For instance:

route add 192.168.1.1 eth0
route add 10.0.0.1 eth1
route add gw 192.168.1.1 metric 10
route add gw 10.0.0.1 metric 20

This will define the first router (with the IP address 192.168.1.1) as your first choice as a gateway using eth0. The second router (with the IP address 10.0.0.1) will be the second choice using eth1 if the first is unavailable. The "metric" value is arbitrary, whatever entry has the lowest number will be tried first. This would work if you have multiple routers connected to the Internet.

If you want to use the same network with two different routers you can do that as well using the same method above.

If you want to have different routers handle different protocols or ports then I think you'd have to use the firewall tools.

Does that help any?
 
Old 11-04-2004, 05:52 AM   #3
Rajesh_Amma
LQ Newbie
 
Registered: Nov 2004
Location: India
Distribution: RedHat
Posts: 6

Original Poster
Rep: Reputation: 0
Sorry my situation is slightly different , My proxy m/c is 192.168.1.1 this is the gw for accessing internet. To access my corporate network the gw is 192.168.1.5.
In this case how i will tell my client m/c to use the gw 192.168.1.1 for internet and for corporate network use thye gw 192.168.1.5 .Pls help
 
Old 11-04-2004, 06:56 AM   #4
n0sr
Member
 
Registered: Sep 2004
Location: 127.0.0.1
Distribution: Slackware 13; Ubuntu Raspberry Pi OS
Posts: 255

Rep: Reputation: 34
Sorry, I don't deal with proxy configuration, so my knowledge is very limited. I know you can set the proxy settings on a "per application" basis, but if you use the same application (such as a web browser) you cannot set for both proxy and no-proxy situations unless you use Mozilla that allows for multiple profiles. Sorry I can't help further!
 
  


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
multiple gateways efm Linux - Newbie 4 06-10-2005 08:50 AM
Multiple Gateways Jon Doe Linux - Networking 9 03-07-2005 03:26 PM
Multiple Gateways inforlinx Linux - Networking 1 02-22-2005 08:28 PM
Red Hat 7.3 and multiple gateways on multiple interfaces bluefmc Linux - Networking 2 11-19-2004 05:01 PM
multiple ips, multiple gateways, one interface drpixel Linux - Networking 6 12-04-2002 12:56 AM

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

All times are GMT -5. The time now is 02:27 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