1753513 Members
5508 Online
108795 Solutions
New Discussion юеВ

Re: Default gateway

 
SOLVED
Go to solution
Ali Imran Abbas
Regular Advisor

Default gateway

I need to change the default gateway in my hp unix server. How can I do that? Do I need to reboot the machine after changing the defualt gateway?

Please tell me the best way to do it.
4 REPLIES 4
Pete Randall
Outstanding Contributor
Solution

Re: Default gateway

/usr/sbin/route delete default xxx.xxx.xx.xx
/usr/sbin/route add default xxx.xx.xx.xx 1

or you can use SAM if you're at 11.11 or newer.


Pete

Pete
David Bellamy
Respected Contributor

Re: Default gateway

the simplest way it to edit the /etc/rc.config.d/netconf file. You don't have to reboot just do a /sbin/net stop and then /sbin/net start.
rick jones
Honored Contributor

Re: Default gateway

"bare" route commands at the shell will affect the running system but will be wiped-out upon a reboot.

altering the netconf file - either via sam or /sbin/set_parms or even vi - will have the changes "hold" across reboots.

if you are going to stop/start networking, it would probably be best to do so from the console rather than a telnet/ssh/whatnot session to the host...
there is no rest for the wicked yet the virtuous have no pillows
yulianto piyut
Valued Contributor

Re: Default gateway

hi,

no need to reboot server if you want to change your default gateway.

1. add your new default gateway
# route add default new_gatewap_ip netmask
2. delete your old default gateway
# route delete default old_gatewap_ip
3. edit /etc/rc.config.d/netconf, change the line at default gateway to your new gateway ip.

hopes can solve your case.

thx,

-piyut-