Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need routing help

Status
Not open for further replies.

SLG

MIS
Dec 19, 2001
106
US
I am trying to setup a linux firewall/router. I have three interfaces:
eth0-internal (1.1.1.1)
eth1-external (2.2.2.2)
eth2-backup (3.3.3.3)

Everyone connects to the 2.2.2.2 address all of the time except when it happens to go down. Then they connect to the 3.3.3.3 address. Here is the problem; I have one user that is one the 3.3.3.3 subnet that can not connect. We'll say his address is 3.3.3.4. I know all I need is a route but I've never been very good at setting up routes.
I want him to use the primary 2.2.2.2 all of the time except when it is down like everyone else.

Thanks in advance!
 
Try to do something like


route add -net 1.1.0.0 netmask xxx.xxx.xxx.xxx gw 2.2.2.2 metric 0

route add -net 1.1.0.0 netmask xxx.xxx.xxx.xxx gw 3.3.3.3 metric 1


Note that 1.1.xxxx network adress and netmask depends on your own config
 
Would this be in addition to haveing a default GW of 2.2.2.1?
 
That replace the default gateway. Addind two different routes, you can use the metric to have a second route to the same net not used in normal operation
 
Thanks! I'll give it a shot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top