1833835 Members
2501 Online
110063 Solutions
New Discussion

Re: shutdown -r

 
SOLVED
Go to solution
Guna_2
Regular Advisor

shutdown -r

Hi all,

I changed HP box ip address by using sam and i canged the gateway by using route add command.

I restarted the server 2,3 times by using "shutdown -r" command. I never faced any problem.

Unfortunetly my ups powersupply failed and my server entirely switched off. When i boot the server back and i checked that the ip address is newely assigned one. But the gateway was the old one. Imediately i checked the etc/rc.config.d/netconf file. The DEFAULT GATEWAY entry was old gateway.

Now my doubt is

1.) Is route add comamnd changes the configuration permanently?

2.) If it is temporarly also, Then how this was working after restaring with shutdown -r command. Because after restaring the /sbin/init.d/net script starts and it used to read the /etc/rc.config.d/netconf configuration file.


Can any one please clear my doubt......
10 REPLIES 10
Steven E. Protter
Exalted Contributor

Re: shutdown -r

Shalom,

1.) No.

2.) /etc/rc.config.d/netconf is permanent and is where the DEFAULT route should be set. You can only have 1 default route. You can have otheres but they will not be default.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Rita C Workman
Honored Contributor

Re: shutdown -r

1) The route add command is temporary from the CLI. You must go in and edit the /etc/rc.config.d/netconf to make it 'permanent'.
>>>So when you rebooted it dropped back to what was in the netconf file (just as you say in line 2)

Always remember......you must change those files to make it permanent !!

Rgrds,
Rita
Torsten.
Acclaimed Contributor

Re: shutdown -r

Hi,

1.) Is route add comamnd changes the configuration permanently?
No.

The config is stored in /etc/rc.config.d/netconf

Best way to change:

set_parms initial or addl_netwrk

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Indrajit_1
Valued Contributor

Re: shutdown -r

Hi;

NO. after adding a new route, make an entry in /etc/rc.config.d/netconf file.

for example..
vi /etc/rc.config.d/netconf

ROUTE_DESTINATION[0]=default
ROUTE_MASK[0]="10.10.255.255"
ROUTE_GATEWAY[0]="10.x.x.x"
ROUTE_COUNT[0]=""
ROUTE_ARGS[0]=""


Cheers;
Indrajit Roy
Never Ever Give Up
Guna_2
Regular Advisor

Re: shutdown -r

Hi all,

In this case I changed the gateway by using route add command only. After that i restarted with shutdown -r command.

That time why the gateway was new. If it reads the configuration file from /etc/rc.confg.d/netconf file then the gw could be old one.

DCE
Honored Contributor

Re: shutdown -r


Guna

You can also use SAM to permanently change the default route
Guna_2
Regular Advisor

Re: shutdown -r

Hi all,

My doubt is as per u all teh route add command will not change the configuration permanently;

o.k fine.

But i changed the gw with route add comamnd. It doesn't made any changes in /etc/rc.config.d/netconf file. And after I restarted the server by using shudown -r command. Even After restarting also the gw was newely asigned gw.


After full poweroff and boot only the gateway was old one.

Thats what i am not understanding.


Will shudown -h command and poweing off the machine makes any difference from shutdown -r command.
Patrick Wallek
Honored Contributor
Solution

Re: shutdown -r

If you only changed the gateway via 'route add' and did NOT change /etc/rc.config.d/netconf, then there is NO WAY your gateway should have been set to the NEW gateway after a reboot (shutdown -r).

Are you sure that your machine actually did reboot?

What does /etc/shutdownlog show? Does it show that your machine actually rebooted after your network / gateway changes?
DCE
Honored Contributor

Re: shutdown -r



Guna the only difference between shutdown -r and shutdown -h is the one automatically restarts the system after shutdown, and the other halts it.


Ways to permantently change default getway
1. issue route add command, then modify /etc/rc.config.d/netconf

2. run set_parms command (this may result in a reboot)

3. Use SAM to change the default gateway. This is the same as step one - but menu driven
Guna_2
Regular Advisor

Re: shutdown -r

Hi Patrick Wallek

You are absoutely right. The machine was not actually rebooted. When i checked the etc/shutdownlog that dont have any entry of reboot after the modification.

Thank You So much for all of ur eforts.

Rgds,
Guna