Operating System - HP-UX
1822144 Members
3319 Online
109640 Solutions
New Discussion юеВ

Can't Delete Route in Routing Table

 
Rob Smith
Respected Contributor

Can't Delete Route in Routing Table

Hello All,

Changed the IP address on one of my boxes and when I did a net stop and then
a net start the old gateway is still in the routing table. When I try to
delete it I get this message:

hpqad /opt/ignite/bin =>route delete default 10.14.12.1
delete net default: gateway 10.14.12.1: not in table

But it is in the table as you can see:

hpqad /opt/ignite/bin =>netstat -rn
Routing tables
Destination Gateway Flags Refs Use Interface Pmtu
PmtuTime
10.14.4.150 127.0.0.1 UH 0 204 lo0 4608
127.0.0.1 127.0.0.1 UH 0 0 lo0 4608
default 10.14.4.1 UG 17 32396 btlan01 1500
default 10.14.12.1 UG 0 44 btlan01 1500
10.14.4.0 10.14.4.150 U 9 35853 btlan01 1500

Everything is working fine. How can I delete this route? Is there a way to
do it without rebooting the box? Any help would be appreciated.
Learn the rules so you can break them properly.
4 REPLIES 4
Shannon Petry
Honored Contributor

Re: Can't Delete Route in Routing Table

If the route was added with a hostname instead of a number, then you will receive this complaint.
Try making an "/etc/hosts" entry with the hostname of the router, and the ip, then deleting the route via hostname instead of number. I have had many cases where adding a route like
> route add net 10.1.1.0 gate2.dom.com
>nslookup gate2.dom.com
19.20.21.22
>route delete 10.1.1.0 10.20.21.22
delete host 10.1.1.0: gateway 10.20.21.22: No such file or directory
>route delete 10.1.1.0 gate2.dom.com
route deleted.

When you do a netstat -r what does it show?
Using a "n" in any netstat option changes the names to numbers for you, so that you can see them.

you can also try to just flush the route tables with
>/usr/sbin/route -f
and see if it is removed this way.

It may seem flakey, but the route has to be removed the same way it came in unless your flushing the whole table. However this may not be to your liking.

Lastly of course is to bounce the box which will flush even those things you can not see!


Regards,
Shannon
Microsoft. When do you want a virus today?
Brian Markus
Valued Contributor

Re: Can't Delete Route in Routing Table

I just went through this entire process last week on a 10.20 box. I had backline support from hp working on the phone with me tring to get the route to go away with out a reboot. Unfortunately we could not find a way. The only solution was to get the netconf file in order, and bounce.

I'm sure that's not what you wanted to hear.. At least you woln't have to go through all the pain to later find that you can't do it.

Hope this helps.

Brian.
When a sys-admin say's maybe, they don't mean 'yes'!
Rita C Workman
Honored Contributor

Re: Can't Delete Route in Routing Table

Well Hi Again Robert,

I don't believe you can get around the reboot. There may have been other things you were running that may have an impact here...check and make sure if your using xntp that the IP is correct for it now in those conf files.
Also, from the output you had, I noticed active packets. Since the system still recognizes this route and is sending packets, the only way you'll get around it, and confirm that your routes are 'solid' is to to that reboot.

Sorry,
Rita
Shannon Petry
Honored Contributor

Re: Can't Delete Route in Routing Table

Rob, Thanks for assigning the points, but more importantly did any of my tricks work to remove the route?

Shannon
Microsoft. When do you want a virus today?