1822353 Members
5260 Online
109642 Solutions
New Discussion юеВ

Unable to delete route

 
SOLVED
Go to solution
Clay Jones_2
Frequent Advisor

Unable to delete route

I have recently brought down two aliases (lan1:1 and lan1:2) on an HPUX 11.11 sysytem, and host routes still appear in the routing table:

> netstat -rn
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
172.16.10.22 172.16.10.22 UH 0 lan1 4136
172.16.10.54 172.16.10.54 UH 0 lan1:2 4136
172.16.10.55 172.16.10.55 UH 0 lan1:1 4136
default 172.16.0.2 UG 0 lan1 0

When I try to remove them via the "route" command, I get the following errors:

> route delete 172.16.10.54 172.16.10.54
delete host 172.16.10.54: gateway 172.16.10.54: no such route

> route delete host 172.16.10.54 172.16.10.54
delete host 172.16.10.54: gateway 172.16.10.54: no such route

> route delete net 172.16.10.54 172.16.10.54
delete net 172.16.10.54: gateway 172.16.10.54: no such route

> route delete 172.16.10.54 255.255.255.255 172.16.10.54
delete host 172.16.10.54: gateway 255.255.255.255: no such route

> route delete 172.16.10.54 255.255.0.0 172.16.10.54
delete host 172.16.10.54: gateway 255.255.0.0: no such route

I've tried a few others as well. Anyone know how to remove these routes?

18 REPLIES 18
Hazem Mahmoud_3
Respected Contributor

Re: Unable to delete route

Try removing them from the netconf file (/etc/rc.config.d/netconf).
Then restart the network services.

-Hazem
Clay Jones_2
Frequent Advisor

Re: Unable to delete route

Thanks for your reply. These aliases were never in the netconf file. Can you elaborate on "restart the network services"? Thanks again.

Hazem Mahmoud_3
Respected Contributor

Re: Unable to delete route

inetd -c

-Hazem
Ashwani Kashyap
Honored Contributor

Re: Unable to delete route

Does this work :
route delete 172,16.10.54 172.16.10.22
Clay Jones_2
Frequent Advisor

Re: Unable to delete route

> route delete 172.16.10.54 172.16.10.22
delete host 172.16.10.54: gateway 172.16.10.22: no such route

Alas, no.
Clay Jones_2
Frequent Advisor

Re: Unable to delete route

inetd -c had no effect either. Routes remain....
Ashwani Kashyap
Honored Contributor

Re: Unable to delete route

Can you try bringing down the interface by doing :

ifconfig lan1:1 down
ifconfig lan1:2 down

and then try to delete the route .
Sanjay_6
Honored Contributor

Re: Unable to delete route

Hi Clay,

you can flush the routing table by using
route -f
Make sure you have a connection to the server through console if you loose connection doing this.
Do a "netstat -rn" to check and see the current routing table. If you don't see the default gateway over there,

use
route add default ip_add_of_def_gw 1

now telnet out of that system to another and see if it works. Do a netstat to check the new routing table.

Hope this helps.

Regds
Victor Fridyev
Honored Contributor

Re: Unable to delete route

Hi,

Try to add to the command parameter subnet:
route delete host 172.16.10.54 subnet 255.255.255.0

or may be you have to use ffffff00 format

HTH
Entities are not to be multiplied beyond necessity - RTFM
Clay Jones_2
Frequent Advisor

Re: Unable to delete route

Thanks everyone. Both interfaces are down, and route -f only clears routes to remote hosts. These routes are "UH" and used to point to the local host.

BTW, route -f was tried by the previous person working on this issue and it essentially removed the default route and nothing else.
Clay Jones_2
Frequent Advisor

Re: Unable to delete route

> route delete host 172.16.10.54 subnet ffff0000
subnet: bad value

> route delete host 172.16.10.54 subnet 0xffff0000
subnet: bad value
Ashwani Kashyap
Honored Contributor
Solution

Re: Unable to delete route

If you assign an IP address of 0.0.0.0 to lan1:1 and lan1:2 , does it remove it .
Clay Jones_2
Frequent Advisor

Re: Unable to delete route

> ifconfig lan1:2 0.0.0.0
nydhora1@/etc/rc.config.d> ifconfig lan1:2
ifconfig: no such interface
nydhora1@/etc/rc.config.d> netstat -rn
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
172.16.10.22 172.16.10.22 UH 0 lan1 4136
172.16.10.55 172.16.10.55 UH 0 lan1:1 4136
172.30.18.100 172.16.0.198 UGH 0 lan1 0
172.16.0.0 172.16.10.22 U 2 lan1 1500
default 172.16.0.2 UG 0 lan1 0


Success! That is one messed up way to control your network. Or is it just me?
Jeff Schussele
Honored Contributor

Re: Unable to delete route

Hi Clay,

First thing to do is run the netstat command in verbose more

netstat -rvn

Then enter rhe route delete command to match the output - probably something like

route delete host 172.16.10.54 netmask 255.255.255.0 172.16.10.54

You must match the route exactly. So if the netmask is not 255.255.255.0 then enter it as the netstat -rvn command displays it.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Clay Jones_2
Frequent Advisor

Re: Unable to delete route

Jeff,

Thanks for your reply, but I had tried that. I had tried every combo imaginable. Only setting the interface address to 0.0.0.0 did it.
Ashwani Kashyap
Honored Contributor

Re: Unable to delete route

This is most probably a unplumbing/plumbing issue that might be resolved in a patch but I am not sure .
Gary Gunderson
Occasional Advisor

Re: Unable to delete route

This is a little late in the response here. I've just run into a similar problem.

netstat -nvr returns:
10.10.32.0/255.255.255.0 172.16.254.253 UG

route delete net 10.10.32.0 netmask 255.255.255.0 172.16.254.253

returns a syntax error

route delete net 10.10.32.0 netmask 0xffffff00 172.16.254.253

is succesful!

Hope this helps some other poor soul.
Coolmar
Esteemed Contributor

Re: Unable to delete route

Yes, the power is on for that device. I wonder, could the card be faulty? HP sent us the wrong OS..11.11 rather than 11.23, so we had to use the older 11.23 DVDs. Do you know where I can find the latest drivers online?