Operating System - HP-UX
1828371 Members
2847 Online
109976 Solutions
New Discussion

how to modify routing table

 
Mauro Gatti
Valued Contributor

how to modify routing table

Hi all, this is my netstat -rnv output:

gemini# netstat -rnv
Routing tables
Dest/Netmask Gateway Flags Refs Interface Pmtu
127.0.0.1/255.255.255.255 127.0.0.1 UH 0 lo0 4136
194.63.1.31/255.255.255.255 194.63.1.31 UH 0 lan0 4136
194.63.0.0/255.255.0.0 194.63.1.31 U 2 lan0 1500
127.0.0.0/255.0.0.0 127.0.0.1 U 0 lo0 0
default/0.0.0.0 194.63.131.20 UG 0 lan0 0

I'd like to remove 2nd rule
but "route delete 194.63.1.31 netmask 255.255.255.255 194.63.1.31" returns:

usage: delete destination [netmask mask] gateway

how could i remove it?

Thank you
Ubi maior, minor cessat!
7 REPLIES 7
Stefan Farrelly
Honored Contributor

Re: how to modify routing table

Looks like it was added in using the route add host option (flags UH) so try route delete host ... to remove it.
Im from Palmerston North, New Zealand, but somehow ended up in London...
steven Burgess_2
Honored Contributor

Re: how to modify routing table

Mauro

Try

route delete 194.63.1.31 194.63.1.31

If you get error , route not in table, try

route delete net 194.63.1.31 194.63.1.31

HTH

Steve

ps

It does look as though the entry is incorrect though as I would expect to see a route to a network via a gateway. In your example you have a route to a network via the same address as the gateway

HTH

Steve
take your time and think things through
Sridhar Bhaskarla
Honored Contributor

Re: how to modify routing table

Hi,

???...

Why do you want to delete this route?.

You can try not using netmask and mask parameters. It is a host entry.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
MANOJ SRIVASTAVA
Honored Contributor

Re: how to modify routing table

Hi Mauro


You may like to look at this :

http://www2.itrc.hp.com/service/cki/docDisplay.do?docId=200000049791567


Manoj Srivastava
Mauro Gatti
Valued Contributor

Re: how to modify routing table

gemini# route delete 194.63.1.31 194.63.1.31
delete host 194.63.1.31: gateway 194.63.1.31: no such route


route delete net 194.63.1.31 194.63.1.31 delete rule 3!


gemini# route delete host 194.63.1.31 netmask 255.255.255.255 194.63.1.31
usage: delete destination [netmask mask] gateway

I'd like to have a final situation like:

Routing tables
Dest/Netmask Gateway Flags Refs Interface Pmtu
127.0.0.1/255.255.255.255 127.0.0.1 UH 0 lo0 4136
194.63.0.0/255.255.0.0 194.63.1.71 U 2 lan0 1500
127.0.0.0/255.0.0.0 127.0.0.1 U 0 lo0 0
default/0.0.0.0 194.63.131.20 UG 0 lan0 0



Ubi maior, minor cessat!
Sridhar Bhaskarla
Honored Contributor

Re: how to modify routing table

Hi (again),

As I mentioned before, it is a host route internal to the system and I am not positive if we can delete it.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Anil C. Sedha
Trusted Contributor

Re: how to modify routing table

Mauro,

I am sure you can delete that route. But what i would like to question alongwith with Sri, is that why are u deleting your system route.

That route pertains to your network interface.

Also, why are you keeping the other routes without your primary network route.

Regards,
Anil
If you need to learn, now is the best opportunity