[ale] Killing a route

Eric Z. Ayers eric.ayers at mindspring.com
Tue Aug 10 07:43:11 EDT 1999


Scott,

Sometimes, you need to specify almost the entire line sent to 'route
add' in order to delete it.   It isn't this way on all operating systems.

# route add -net 10.70.161.0 gw 10.70.162.130 netmask 255.255.255.0 
# netstat -nr 

Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
170.11.1.1      0.0.0.0         255.255.255.255 UH        0 0          0 ppp0
10.70.162.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0
10.70.161.0     10.70.162.130   255.255.255.0   UG        0 0          0 eth0
0.0.0.0         170.11.1.1      0.0.0.0         UG        0 0          0 ppp0  

# route del -net 10.207.161.0
SIOCDELRT: Invalid argument        
# route del -net 10.207.161.0 gw 10.207.162.130
SIOCDELRT: Invalid argument  
# route del -net 10.207.161.0 gw 10.207.162.130 netmask 255.255.255.0

Note that only the last line  actually worked.

-Eric.


Scott Nolde writes:
 > What is the proper command to delete a route from the route table?  I've
 > had to reboot because of a bad route associated with a ppp interface.
 > 
 > Thanks,
 > Scott
 > 
 >  
 > ------------------------------------------------
 >                  Scott Nolde
 >          smnolde-linux at mindspring.com
 > ------------------------------------------------






More information about the Ale mailing list