Traduisez - Übersetzen - Traduzca - Traduza - Tradurre - Translate

Adding gateways under Linux

Dilan Arumainathan (root@dilenger.intergate.bc.ca)
Sun, 8 Mar 1998 13:06:18 -0800 (PST)

I have a linux box that needs to talk to 2 routers that are on different
subnets that can only be accessed thru 2 different routers.

[router1(1.2.3.4)]--------------[target router1(1.2.6.1)]
/
Linux Box
1.2.3.1
\
[router2(1.2.3.5)]--------------[target router2(1.2.7.1)]

I am trying to add 2 different routes to the routing table on the linux
box by typing
route add -net 1.2.6.0 gw 1.2.3.4 netmask 255.255.255.0
route add -net 1.2.7.0 gw 1.2.3.5 netmask 255.255.255.0
and getting errors that point to incorrect parameters. Ours is a class B
address(1.2.0.0) and when I type
route add -net 1.2.0.0 gw 1.2.3.4
it seems to work fine but I can only add one gateway and I cant talk to
the hosts on the subnets that can only be addressed through the 2nd
router. Any ideas?
I am running Kernel V 2.0.30.

Thanks
Dilan