[ale] Killing a route

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


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 gw netmask 
# netstat -nr 

Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface UH        0 0          0 ppp0   U         0 0          0 eth0   UG        0 0          0 eth0         UG        0 0          0 ppp0  

# route del -net
SIOCDELRT: Invalid argument        
# route del -net gw
SIOCDELRT: Invalid argument  
# route del -net gw netmask

Note that only the last line  actually worked.


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