-   Linux - Networking (
-   -   define tow gateway in linux (

e_sagheb 08-02-2009 01:41 AM

define tow gateway in linux
hi, I have a server with ip address and I want to define two gateways with ip: and on it but I dont know how I can do it.I dont have professianal information in linux.
thanks for your help

jschiwal 08-02-2009 07:57 AM

Your network device configuration tool probably has a gateway entry field.

You can manually add a route using the "route" or the "ip" command.
For example, if the router at is for the network, and the router at is the default gateway, you could use:

route add -net netmask gw dev eth0
route add default gw dev eth0

Also look at the man page for the "routes" configuration file. You can enter routes there.
Indicating which distribution you are using might be helpful.

All times are GMT -5. The time now is 05:21 PM.