Operating System - HP-UX
1755425 Members
3475 Online
108832 Solutions
New Discussion юеВ

Re: How to change default router on HP-UX 11.11?

 
Juan Paez
Occasional Contributor

How to change default router on HP-UX 11.11?

Hello,

Can someone please tell me how to change the default router on an HP-UX 11.11 machine ?? I changed the IP address of the machine fron one net to other, so I need to point the machine to a different default router.
Thanks,
Juan
6 REPLIES 6
Pete Randall
Outstanding Contributor

Re: How to change default router on HP-UX 11.11?

Juan,

You need to delete the old and add the new with the route command (man route), then edit the information in /etc/rc.config.d/netconf to make the change permanent (you could also change netconf and reboot).


Pete



Pete
Bill Hassell
Honored Contributor

Re: How to change default router on HP-UX 11.11?

The basic parameters are stored in /etc/rc.config.d/netconf so if you are familiar with scripting, the comments in that file are extensive. However, if you are changing the network (IP address, subnet mask, router) then it is much better to use /sbin/set_parms, specifically:

/sbin/set_parms ip_address
/sbin/set_parms addl_netwrk

This command will make the appropriate changes in the bootup config files for you.


Bill Hassell, sysadmin
Mark Greene_1
Honored Contributor

Re: How to change default router on HP-UX 11.11?

How did you change the IP address? The utility /sbin/set_parms will let you change the IP address and the default gateway at the same time, and will make the change in several places (i.e., /etc/hosts, as well as the system route table).

Note that this will automatically reboot the system, so schedule your time accordingly.

mark
the future will be a lot like now, only later
Kevin Wright
Honored Contributor

Re: How to change default router on HP-UX 11.11?

route delete default
route add default 1

then change your default route entry in /etc/rc.config.d/netconf.
Joe Short
Super Advisor

Re: How to change default router on HP-UX 11.11?

Edit the file /etc/rc.config.d/netconf to reflect your changes. Then bounce the server.
MANOJ SRIVASTAVA
Honored Contributor

Re: How to change default router on HP-UX 11.11?

Juan

netstat -nr | grep default will give you the default route. To do it on the fly :

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


Also to make the change permanent you need to edit /etc/rc.config.d/netconf file to make the change permanent .

Manoj Srivastava