System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Do we need to stop and start /sbin/init.d/net after changing the IP address?

SOLVED
Go to solution
senthil_kumar_1
Super Advisor

Do we need to stop and start /sbin/init.d/net after changing the IP address?

Hi All,

I want to change the IP address permanently in /etc/rc.config.d/netconf

So do we need to need stop and start /sbin/init.d/net after changing the IP address?
17 REPLIES
TTr
Honored Contributor
Solution

Re: Do we need to stop and start /sbin/init.d/net after changing the IP address?

You only need to "start". The "stop" option does not do anything.

In addition to netconf, you need to change the IP in /etc/hosts.

You can change the IP manually in /etc/hosts and netconf, but it is normally changed by using "/sbin/init.d/set_parms".

If the server is very simple and does not have any services running on it, you can get away by running the "/sbin/init.d/net start" command. Otherwise it is also recommended to reboot the server after changing the IP address. There may be a lot of services and applications that may have the old IP cached in and will fail or hang when you change the IP.
James R. Ferguson
Acclaimed Contributor

Re: Do we need to stop and start /sbin/init.d/net after changing the IP address?

Hi:

Another way to manage a change like this is to do:

# /sbin/set_parms ip_address

Run this exactly as written. You will be presented an interactive menu. You should plan this at a time you can reboot. The manpages for 'set_parms' offer additional information and options.

Regards!

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: Do we need to stop and start /sbin/init.d/net after changing the IP address?

Hi (again):

I would add that changing your server's IP address may mean that your network gateway and network mask need modification too.

Moreover, your server probably doesn't live in isolation. DNS servers will undoubtedly need coordinated changes, too.

Regards!

...JRF...
Johnson Punniyalingam
Honored Contributor

Re: Do we need to stop and start /sbin/init.d/net after changing the IP address?

>>>I want to change the IP address permanently in /etc/rc.config.d/netconf<<<

Yes, before that, take simple backup copy

# cd /etc/rc.config.d
# cp -p netconf netconf.bk
# vi netconf


>>>So do we need to need stop and start /sbin/init.d/net after changing the IP address?>>>>>

Yes,

/sbin/init.d/net stop
/sbin/init.d/net start

I would prefer to do above change via console/
Problems are common to all, but attitude makes the difference
Jeeshan
Honored Contributor

Re: Do we need to stop and start /sbin/init.d/net after changing the IP address?

If you assign new IP address of the new interface then you need not to stop and start the /sbin/init.d/net daemon. Just start the daemon . It will then start the new IP address of the new interface.

If you change the existing IP address then you need to stop and start the daemon. sometimes you have to restart the server.
a warrior never quits
Hakki Aydin Ucar
Honored Contributor

Re: Do we need to stop and start /sbin/init.d/net after changing the IP address?

Actually , when it comes to update netconf YES.
I prefer following one liner command:
/sbin/init.d/net stop; /sbin/init.d/net start

But apparently stop means nothing,
and according some old resources you can lost your net connection (but I guess it is for old OS, in 11iv1 it is no problem like this)
Vivek_Pendse
Valued Contributor

Re: Do we need to stop and start /sbin/init.d/net after changing the IP address?

you need to stop & start the net service, but before this, if the ipaddress being used by any lan card, then first unplumb it, then only modify the netconf & restart the net service.

Regards,
Vivek
Raj D.
Honored Contributor

Re: Do we need to stop and start /sbin/init.d/net after changing the IP address?

Senthil,
If you have already ip address assigned to the lan cards and want to change with netconf editing, you can do so,
- Manually bring down the ip ,gateway etc, and do a net start and stop .
- check with netstat -in ; and netstat -rn

Hth,
" If u think u can , If u think u cannot , - You are always Right . "
senthil_kumar_1
Super Advisor

Re: Do we need to stop and start /sbin/init.d/net after changing the IP address?

How to change the ipaddress temporarily.

What is the exact syntax?
sujit kumar singh
Honored Contributor

Re: Do we need to stop and start /sbin/init.d/net after changing the IP address?

Hi

You can try

ifconfig lanX 192.168.0.1 netmask 255.255.255.0 up

ifconfig lanX:1 192.168.0.1 netmask 255.255.255.0 up

just check and see

regards
sujit
R.K. #
Honored Contributor

Re: Do we need to stop and start /sbin/init.d/net after changing the IP address?

Hi Senthil,

Temporary Change:
#ifconfig lan1 192.6.1.17 netmask 55.255.255.0 up

Checking:
#ifconfig lan1

I have attached a 2-page doc for ifconfig test.

Regds..
Don't fix that what ain't broke
Steven E. Protter
Exalted Contributor

Re: Do we need to stop and start /sbin/init.d/net after changing the IP address?

Shalom,

ifconfig lan# 10.0.0.15 netmask 255.255.255.0 up

Replace # with actual lan number from lanscan

Need to be root.

This impacts network services such as NFS, which also may need to be restarted.

/sbin/init.d/nfs.core
/sbin/init.d/nfs.server
/sbin/init.d/nfs.client

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
Raj D.
Honored Contributor

Re: Do we need to stop and start /sbin/init.d/net after changing the IP address?

Senthil,

To change the ip address manually,

1. Bring down the interface,
2. release the old ip ,
3. apply the new ip:

Steps: # Bring down:
# ifconfig lanx down
# ifconfig lanx unplumb
# ifconfig lanx 0.0.0.0
## check with # netstat -in

Bring up with ip:
# ifconfig lanx 192.168.x.x netmask 255.255.255.0 up

[ Where lanx is the lan number from lanscan ]

Hth,
Raj.


" If u think u can , If u think u cannot , - You are always Right . "
Raj D.
Honored Contributor

Re: Do we need to stop and start /sbin/init.d/net after changing the IP address?


Also,
If you want to change the gateway at the same time:

# check current entry with # netstat -rn
# route delete default x.x.x.1


TO add new GW:
# route add net netmask 1

# verify with netstat -rn


Hth,
" If u think u can , If u think u cannot , - You are always Right . "
senthil_kumar_1
Super Advisor

Re: Do we need to stop and start /sbin/init.d/net after changing the IP address?

How to create the alias lan card (secondary netwrok card) from already available one.
Javed Khan_1
Valued Contributor

Re: Do we need to stop and start /sbin/init.d/net after changing the IP address?

my assumption is you are trying to configure standby interface . for this you will need to install and configure APA.

If your requirement is just to configure second lan interface just to sam - network interface card -- and configure ip ( if you assign ips from no need to edit netconf manually it does all )

Javed
Never Give Up
R.K. #
Honored Contributor

Re: Do we need to stop and start /sbin/init.d/net after changing the IP address?

Hi Senthil,

Are you talking about configuring two IPs out of one lan card?
Like lan100 or lan900?

If this is the case, then probably it is Auto Port Aggregation (APA).
There are two types:
- Failover
- Load balance

Which one are you looking for?
Don't fix that what ain't broke