Routing problems on Debian

Routing problems on Debian

Post by P?l Brattber » Sat, 02 Dec 2000 04:00:00



Hi.

I'm setting up my first linux system, and I've run into some problems.

I'm setting up the network, and I've got the NIC working, but I can't seem
to add the gateway for my network.

I do this:
route add -net xxx.xxx.xxx.x netmask 255.255.255.0 eth0
route add default gw xxx.xxx.xxx.x eth0

But for the last command I get this error:
SIOCADDRT: Invalid argument.

So, I can't get it to work... Any ideas?

TIA
P?l Brattberg

 
 
 

Routing problems on Debian

Post by Peter Bloomfiel » Sun, 03 Dec 2000 04:00:00



> Hi.

> I'm setting up my first linux system, and I've run into some problems.

> I'm setting up the network, and I've got the NIC working, but I can't seem
> to add the gateway for my network.

> I do this:
> route add -net xxx.xxx.xxx.x netmask 255.255.255.0 eth0
> route add default gw xxx.xxx.xxx.x eth0

> But for the last command I get this error:
> SIOCADDRT: Invalid argument.

> So, I can't get it to work... Any ideas?

> TIA
> P?l Brattberg

man route:
...
       gw GW  route  packets  via a gateway.  NOTE: The specified
              gateway must be reachable first. This usually means
              that you have to set up a static route to the gate-
              way beforehand. If you specify the address  of  one
              of your local interfaces, it will be used to decide
              about the interface to which the packets should  be
              routed to. This is a BSDism compatibility hack.

I guess adding a route to the net that the gateway is on isn't enough!