LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Working with 'route' and unwanted route entries (http://www.linuxquestions.org/questions/linux-networking-3/working-with-route-and-unwanted-route-entries-43912/)

pioniere 02-03-2003 01:30 PM

Working with 'route' and unwanted route entries
 
I am working with the 'route' command in RH 7.3, trying to get a couple of different subnets to talk to each other. The problem I am encountering is that there are routes now entered (i.e., entered using the 'route' command) that I cannot get rid of.

I can use the 'route' command to successfully delete the unwanted route(s), and typing the 'route -n' command shows that they have been removed.

However, when I re-start the network, or re-boot, the unwanted route(s) are back, showing up when I type 'route -n'. How do I permanently get rid of these unwanted routes?

I have looked into the bowels of /etc/sysconfig, and /proc/net in an attempt to resolve this issue. The unwanted routes do appear to be in /proc/net/route, but these files are controlled by the kernel and I don't believe they can be directly edited.

It would be hugely appreciated if anyone who can explain this to me. I haven't been able to find much documentation out there that deals specifically with the mechanics of 'route'. Thanks.

Tinkster 02-03-2003 01:38 PM

Hi there ...

No idea how/where RH stores the setup information,
but you could try a
Code:

grep -r "route add" /etc/*
to locate the files that hold your route configuration?
Or at least get an indication where the routes are being set,
and hopefully you can then check the files that do it
where the info comes from :)

HIH

Cheers,
Tink

pioniere 02-04-2003 11:05 AM

No joy
 
This provides interesting information, but I am no closer to solving this issue. This is a real annoyance, and I am unable to find information on this anywhere. Even the detailed Network Administrator's Guide at The Linux Documentation Project doesn't give details on this.

There must be someone out there who has worked with routing tables enough to understand how to remove 'persistent' entries. Lets hear from some experts!!

Tinkster 02-04-2003 12:38 PM

Well, if you actually understood what I said and
went through the scripts looking for all possible
additions to route and had no luck ...

... are you running routed (the routing daemon)
by any chance?

Cheers,
Tink

Darin 02-04-2003 03:16 PM

Well there are some basic routes that are added by default when you start networking such as a loopback route and a subnet route for each interface, are you trying to get rid of these?

If you have route entries beyond what is mentioned above then tinkster gave you the best method I can think of for finding these. If you have route entries that exist after reboot there really are only two explainations, one being that these should exist by default for each interface and the other being that some startup script adds them.

If you want more specific answers besides to grep your /etc directory then maybe you could provide some more specific information such as what your interfaces are set at (ifconfig -a) and what routes exist (netstat -r.)

TRBentley 02-04-2003 03:42 PM

This is a known problem with RH. I had this problem when I started using dial up modems. The sulution recommended to me is to run a script from the S99local.

/sbin/route del default


This did the trick for me.

pioniere 02-05-2003 12:14 PM

Thanks for all of the advice thus far. The routes I am trying to remove are not the 'default' routes placed there upon the activitation of the network device, but rather are routes that were manually added later.

I'll check out the s99local suggestion.


All times are GMT -5. The time now is 09:34 PM.