?
Solved

Need to delete a host route from Linux

Posted on 2003-03-10
4
Medium Priority
?
945 Views
Last Modified: 2008-02-01
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!
0
Comment
Question by:miataman92
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 22

Expert Comment

by:pjedmond
ID: 8107442
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:)
0
 
LVL 22

Accepted Solution

by:
pjedmond earned 225 total points
ID: 8107464
Otherwise, you can delete tham manually:

/etc/sysconfig/static-routes contains a list of static routes for redhat 7.2

For your system, I recommend:

find /etc/ | grep rout

and you should find the file you need.

Hope that helps:)
0
 
LVL 3

Expert Comment

by:naccad
ID: 8111205
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
0
 

Expert Comment

by:CleanupPing
ID: 9077692
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.
0

Featured Post

Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

741 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question