Operating System - Tru64 Unix
1832281 Members
2206 Online
110041 Solutions
New Discussion

how to delete route ?

 
Gabar
New Member

how to delete route ?

I want to delete one route(10.114/16 10.114.65.105) from my routing table . can anybody help ?
# netstat -rn
Routing tables
Destination Gateway Flags Refs Use Interface

Route Tree for Protocol Family 26:

Route Tree for Protocol Family 2:
default 10.114.65.97 UGS 5 7696 tu0
10.114/16 10.114.65.105 U 1 286 tu0
10.114.65.96/27 10.114.65.103 U 2 888 tu0
10.114.65.101 127.0.0.1 UH 5 104036 lo0
10.114.65.103 10.114.65.103 UHL 19 91463 tu0
10.114.65.105 10.114.65.105 UHL 0 14 tu0
10.114.65.106 10.114.65.106 UHL 0 14 tu0
127/8 127.0.0.1 UR 0 12 lo0
127.0.0.1 127.0.0.1 UHL 2 3285 lo0
192.168.114/24 192.168.114.70 U 3 500 ics0
192.168.114.70 192.168.114.70 UHL 0 34 ics0
2 REPLIES 2
Ivan Ferreira
Honored Contributor

Re: how to delete route ?

See man route for examples, the command could be:

route delete -net 10.114 10.114.65.105

Also remove the entry from /etc/routes file.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Al Licause
Trusted Contributor

Re: how to delete route ?

Why do you wish to delete this entry from the routing table ?

If I am reading this correctly this is the entry with the U only flag ? If so, this is the entry associated with the interface and will be there as long as the interface is active. That is what the U signifies....Up or Available as per the man page for netstat.

The only way to eliminate this entry is to delete the tu0 interface.

Since this route is not defined statically, there is no entry in the routes file to be deleted.

From the routing table it appears that you may have defined more than one network address for this interface using the ifconfig command. The 105 address has a 16 bit netwask while the 103 address has a 27 bit mask.

ifconfig tu0 will show this.

If this is the case, you need to remove the 105 address from the interface. Make sure you remove it from any files containing that address as well.