1833330 Members
2925 Online
110051 Solutions
New Discussion

route change

 
SOLVED
Go to solution
Warren griggs
Frequent Advisor

route change

Hi,

I need to change my default route on a server and can't really get any downtime for it. I know on Solaris you can user "route change" but I've noticed on the HPUX man page there is only "route add" and "route delete".

What is the best way I can change this on the fly??

Thanks in advance,

Colin.
8 REPLIES 8
Pete Randall
Outstanding Contributor
Solution

Re: route change

Colin,

You'll need to delete it, then re-add it.

Pete

Pete
John Dvorchak
Honored Contributor

Re: route change

You can use route add then route delete. Can be done on the fly. If you want to keep the change and make it perminent you will also have to edit /etc/rc.config.c/netconf.
If it has wheels or a skirt, you can't afford it.
MANOJ SRIVASTAVA
Honored Contributor

Re: route change

Hi Colin


All you need is to

route delete < IP ADRSS>

route add < IP ADRESS>


you may like to look at this document too :
http://www2.itrc.hp.com/service/cki/docDisplay.do?docId=200000049791567




Manoj Srivastava

John Dvorchak
Honored Contributor

Re: route change

Ok I caught the typo:

/etc/rc.config.d/netconf

If it has wheels or a skirt, you can't afford it.
Warren griggs
Frequent Advisor

Re: route change

Pete,

Won't this stop all traffic going to the default route until I re-add it?

Is it ok to do as long as I do it quickly?

Thanks,

Colin.
Jean-Louis Phelix
Honored Contributor

Re: route change

hi,

In man 7 routing, you can read that it's possible to have multiple default routes :

There may still be multiple routing entries remaining. In that case the IP packet is routed over the first entry displayed by netstat -r.
Such multiple routes include:

+ Two or more routes to a host via different gateways.
+ Two or more routes to a network via different gateways.
+ Two default routes.

So in your case, you can add the new defalut route, then delete the old one.

Regards.
It works for me (© Bill McNAMARA ...)
Pete Randall
Outstanding Contributor

Re: route change

Colin,

I guess it's been covered but, since you asked, add then delete should do the trick.

Pete

Pete
Kim Kendall
Regular Advisor

Re: route change

Make sure you're on the system console when you do it, or you'll be cutting yourself off at the knees. ;)