[lug] route add syntax

D. Stimits stimits at idcomm.com
Fri Feb 2 12:12:09 MST 2001


charles at lunarmedia.net wrote:
> 
> i have a linux box with the following interface config
> 
> eth0 my cable modem provider's address assigned through dhcp
> 
> eth0:1 10.6.21.233 255.255.255.0
> 
> i am trying to add a few static routes to the linux box that will hit a
> router off of my eth interface for private networks i am using in a lab.
> 
> i am entering:
> 
> route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.6.21.1
> route add -net 172.16.0.0 netmask 255.240.0.0 gw 10.6.21.1
> route add -net 192.168.0.0 netmask 255.255.0.0 gw 10.6.21.1
> 
> 10.6.21.1 is the ethernet interface of a router plugged into my home lan.
> 
> when i enter the route add commands, i get returned to a command prompt as
> though it was accepted, however, netstat -rn does not show these networks
> in the linux boxes routing table.
> 
> do i have incorrect syntax?
> 

Don't know if the command is correct, but it looks approximately like
"the right thing". Try the -v argument for verbose operation to see if
it tells you something new.



More information about the LUG mailing list