Operating System - HP-UX
1752785 Members
6260 Online
108789 Solutions
New Discussion

Re: delete static route in rp5470

 
AlbertLi
Occasional Advisor

delete static route in rp5470

Hi:

SW version is 11.11 and HW is rp5470.

I create new static route in netconf and net process restart. I checked netstat -rvn and new static route show up.

Then I remove new static route in netconf and net process restart. I also checked netstat -rvn and new static route still show up.

I tried to use route delete command but still can't delete new static route show up even route has deleted because server show no shuch route.

Please help to find any way to delete it..

thanks

br.
Albert
7 REPLIES 7
AnthonySN
Respected Contributor

Re: delete static route in rp5470

you need to restart the network services
/sbin/init.d/net stop
/sbin/init.d/net start
johnsonpk
Honored Contributor

Re: delete static route in rp5470

stopping and starting net services wont flush your routing table ,it only helps to add a new route which is configured in the netconf file

You need to use "route delete "command to remove the unwanted route


can you post the netstat -rn output and the route delete command you tried with error out put ?


Regards!
johnson
AnthonySN
Respected Contributor

Re: delete static route in rp5470

albert mentioned that he has already deleted the entry from netconf file
johnsonpk
Honored Contributor

Re: delete static route in rp5470

>>albert mentioned that he has already deleted the entry from netconf file

Yes .. I saw that ..besides it (restart net service)wont help you to remove the route until next reboot


Bottom line: in order to remove routes those were added dynamically (through route add command) or statically (by adding entries in netconf file and restarting net service), we have got two options


1) remove routes with route delete command

or

2) remove entries from netconf file and reboot



Note : Restarting net service will not remove routes from system.it only helps you to add a route if there is any new routing entry in the netconf file

Regards!
Johnson
Hakki Aydin Ucar
Honored Contributor

Re: delete static route in rp5470

Hi,

in addition above; Sometimes with some reason route delete can be unable to delete specified route, you can then try the following to just flush the route tables *

# /usr/sbin/route â f
Hakki Aydin Ucar
Honored Contributor

Re: delete static route in rp5470

oops, soory for typo! (itrc transformed - char)

# /usr/sbin/route -f
johnsonpk
Honored Contributor

Re: delete static route in rp5470

>># /usr/sbin/route -f

(Dangerous !!! if you dont have planned downtime )

Adding to Albert suggestion ..
The above command will flush your entire Routing table including "default route" .and there is a chance that your logged in session get terminate ..

So be sure to do it through CONSOLE and take appropriate maintenance window before executing the above command..


Obviously after the route flush , you need to restart net service to get your static routes back ..

Regards!
Johnson