3

Please note that this is ONE NIC and TWO Gateways

Now this solution is super easy in Windows:
* Connection Properties -> TCP/IP Properties -> Default Gateways -> Add (separated by metrics)

I notice Windows adds a second route in its routing table as such:

Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0  192.168.192.253  192.168.192.12       1
          0.0.0.0          0.0.0.0  192.168.192.254  192.168.192.12       2


How would I perform something very similar to this in Linux? ( Server Console )

My ultimate goal is to have a service, domain.com, run on one nic, but have access from two external IP addresses. So if anyone knows how to go that far, it would save another post as this would only protect the server if a router failed! :)

2 Answers 2

1

Connection Properties -> TCP/IP Properties -> Default Gateways -> Add (separated by metrics

ip route add default via 192.168.192.253 dev eth0

but have access from two external IP addresses

Are they assigned to the router, or directly to the PC? (I'm guessing the former, in which case you have to configure the router...)

If the addresses belonged to the computer itself, you could use ip addr add.

1
  • I have two routers actually. One router is ...253 and the other is ...254, however the Ubuntu server only has a console interface and one network card. Commented May 28, 2011 at 23:16
1

The following should work

ip route add default via 192.168.192.253 dev eth0 metric 100

ip route add default via 192.168.192.253 dev eth0 metric 200

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .