Operating System - HP-UX
1833679 Members
4180 Online
110062 Solutions
New Discussion

Re: Changing netmask of primary lan

 
MTSU_SAN
Regular Advisor

Changing netmask of primary lan

Can I change the subnet mask of my primary lan card without rebooting the system?
Like, with sam? I'm on a v2500, running 11.0.
10 REPLIES 10
James R. Ferguson
Acclaimed Contributor

Re: Changing netmask of primary lan

Hi Jerry:

I think you will need to reboot. Plan for it.

Regards!

...JRF...
Arockia Jegan
Trusted Contributor

Re: Changing netmask of primary lan

You can do it. Also you can use ifconfig command to change the subnet mask value for the lan0.
PIYUSH D. PATEL
Honored Contributor

Re: Changing netmask of primary lan

Hi,

You can change the subnet mask, by

# set_parms ip_address ( change the subnet mask )

You have to reboot but still you can try....

Piyush
Joseph C. Denman
Honored Contributor

Re: Changing netmask of primary lan

I don't think a reboot is required. However, be careful if you are doing this remotely. You will probably lose your connection, and if you make an error, you may not be able to connect again.


ifconfig lan0 xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx

Make modifications to /etc/rc.config.d/netconf


...jcd...
If I had only read the instructions first??
Joseph C. Denman
Honored Contributor

Re: Changing netmask of primary lan

Oh, probably the most preferred method would be to use set_parms.


set_parms ip_address

However, if I remember correctly, this will prompt for a reboot.

I would attempt my first suggestion.

...jcd...
If I had only read the instructions first??
S.K. Chan
Honored Contributor

Re: Changing netmask of primary lan

I would edit /etc/rc.config.d/netconf (since you got multiple lan card I think) and reboot the system afterwards (if you want a permanent change). I've done "without-rebooting-way" and it does not quite behave properly.
MANOJ SRIVASTAVA
Honored Contributor

Re: Changing netmask of primary lan

Hi

SAM--->netwroking and communciations--->Netwrok interface cards--->select the card --->Actions--->Modify


This woul defianately require a stop and start of netwrok connection.

set_params ip_address is also another way to do it.


Manoj Srivastava
Arockia Jegan
Trusted Contributor

Re: Changing netmask of primary lan

You can change the netmask value either through sam or by using ifconfig command with out rebooting.

Or make the changes in the /etc/rc.config.d/netconf file,

NETMASK(0)=xxx.xxx.xxx.x

Run /sbin/init.d/net start

The netmask value will get automatically changed.

#ifconfig lan0

Will show the new netmask value..

REBOOT is not required.
sven verhaegen
Respected Contributor

Re: Changing netmask of primary lan

the answer is simple

Yes you can alter it :

ifconfig lanx ip-addrss netmask masknr up

will do the trick , however bear in mind that doing this will actually reset the lancard software wise ... this means outstanding connection on the card migh just hang as the previous IP has no link to a card (this is debatable as you don't change ip range only netmask ) , further you might have to clean up the routing table if you new address resides in another portion of the netmasked network (this only applies if you actualy start subnetting) , perform netstat -rn to see the routes in there and get rid of the old route for your lancard , also make sure to adapt the /etc/rc.config.d/netconf file to make sure on following reboot you have the new netmask standard set , if anything else springs to mind i'll post it also
...knowing one ignores a greath many things is the first step to wisdom...
V. V. Ravi Kumar_1
Respected Contributor

Re: Changing netmask of primary lan

hi,

better way is to go through SAM, and u no need to reboot.

regds
Never Say No