Link to home
Start Free TrialLog in
Avatar of miataman92
miataman92

asked on

Need to delete a host route from Linux

In my route list I have a route showing:

destination    Subnet             GW   Flags
10.1.48.196    255.255.255.255     -     !H

No matter what I do, I cannot delete this route. I have tried statements with syntax that allows me to remove other routes from this box, but this one gives me the same type of reply everytime I try to delete it.

*No such process*
or
*No such host*
or
*netmask 00000000 doesn't make sense with host route*

I think I have tried just about everything. This route is preventing the connection of two computers on different networks. I need to get rid of it. Please help!
Avatar of pjedmond
pjedmond
Flag of United Kingdom of Great Britain and Northern Ireland image

This is a *really* irritating problem with the route command - you must use exactly the same syntax for deleting a route as when you created it:

route add -net 192.56.76.0 netmask 255.255.255.0 dev eth0

can only be deleted by:

route del -net 192.56.76.0 netmask 255.255.255.0 dev eth0

route add -net 192.56.76.0 netmask 255.255.255.0

will not work:( Also if you have defined a gw, then you must include that.

Therefore, my suggestion to deal with this is:

route print

and then route del including *ALL* the parameters:)

Hope that helps:)
ASKER CERTIFIED SOLUTION
Avatar of pjedmond
pjedmond
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
try

route delete -host 10.1.48.196
route delete -host 10.1.48.196/32
route delete -host 10.1.48.196 netmask 255.255.255.255

try them with and without the -host option


(btw, route print is not valid, route print works on windows
systems)

nick
Avatar of CleanupPing
CleanupPing

miataman92:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.