Operating System - HP-UX
1834471 Members
2533 Online
110067 Solutions
New Discussion

Changing network interface

 
SOLVED
Go to solution
Mihails Nikitins
Super Advisor

Changing network interface

Hello,

I should switch a network connection from one network adapter to another one with minimum operation disturbance of my K460 running HP-UX 10.20. The system recognize the additional interface in SAM, it is not in use.

Here is my SAM information.

IEEE802.3/Ethernet lan0 10/4/8.1 Enabled 10.1.1.1
Ethernet lan1 10/4/16.1 Enabled 10.2.2.2
Ethernet lan2 10/12/6 Not Configured 0.0.0.0

Please comment if the following plan is wrong.

1. Edit /etc/rc.config.d/netconf by changing interface name

Change
INTERFACE_NAME[0]=lan0
to
INTERFACE_NAME[0]=lan2

2. Change physical connections.

3. Run /sbin/init.d/net so that the changes take effect.

4. If something goes wrong, restore the previous netconf and run /sbin/init.d/net.

One more question. SAM shows lan0 as "IEEE802.3/Ethernet", currently LANCONFIG_ARGS[0]="ether ieee".

Is it really needed to preserve this setting as "ether ieee" or it will be sufficient with "ether" for lan2?

Thank you in advance for any comments!
KISS - Keep It Simple Stupid
8 REPLIES 8
Stefan Farrelly
Honored Contributor
Solution

Re: Changing network interface


A lot of questions....

1. Looks good.

2. Not so good. You should disable the lan before swapping over the physical lan connections. /sbin/init.d/net stop Dont forget to do this from the console as if you do it from a terminal your own connection will be killed!

3. Change the cables. From the console do a net start. Hopefully the your primary ip will come up aok on the new lan card.

4. If something goes wrong you can try to do a net stop, restore the netconf file and the physical lan connections then try a net start. You may just get lucky.....

5. ether for lan2 is fine, dont need the ieee.

Now, all sorts of currently running applications/net connections may cause your net stop command to not work, and thus ruin the whole exercise. Play safe - change the netconf file, reboot the server, and change the physical lan connections before it comes up again. Changing lan cards/ip's on the fly is risky stuff.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Alan Riggs
Honored Contributor

Re: Changing network interface

One refinement to Steffan's response. To disable the lan interface you should issue the ifconfig lan0 down command yourself. The standard HP /sbin/init.d/net script does nothing upon receiving the "stop" flag. You must shut down your interfaces manually.
CHRIS_ANORUO
Honored Contributor

Re: Changing network interface

Make backups of netconf and hpetherconf.
Check these files for updates.
disable the lan0 with ifconfig command on the console and not through telnet.
Your steps are good but check the corrections from Stefan.
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Steve Sauve
Frequent Advisor

Re: Changing network interface

Don't know if this is possible at your site, but why not plug the second card into the network. Config it with a different IP and connect to it (to make sure everything looks good).
Then bring down the original card and use ifconfig to change the ip of the second one. Actually if you created a script with a couple ifconfig statements you could pull the switch pretty quickly.
This way you don't have to worry about swapping wires and starting and stopping thing.
Just a thought,
Steve
Elmar Bueker
Occasional Advisor

Re: Changing network interface

The biggest problem i see is, that there may be some subsystems which will exit if the network interface goes down.

In our company we need the original interface from the machine to run a license server daemon.
So i would prefer that both cards are active. To do so, modify the /etc/rc.config.d/netconf so that both cards are active. Assign an IP address to the old interface which is not in your net.

#NEW Interface
IP_ADDRESS[0]=
SUBNET_MASK[0]=
INTERFACE_NAME[0]=lan2
BROADCAST_ADDRESS[0]=
LANCONFIG_ARGS[0]="ether"
DHCP_ENABLE[0]=

#OLD Interface
IP_ADDRESS[1]=< 192.100.100.10="">
SUBNET_MASK[1]=< 255.255.255.0="">
INTERFACE_NAME[1]=lan1
BROADCAST_ADDRESS[1]=< 192.100.100.255="">
LANCONFIG_ARGS[1]="ether"
DHCP_ENABLE[1]=

When you create the configuration, be careful with the array numbers [0].


If you have subsystems, which need the MAC of the old interface you should look in the file /etc/rc.config.d/hpetherconf to set the correct interface and MAC.

HP_ETHER_INTERFACE_NAME[0]=lan1
HP_ETHER_STATION_ADDRESS[0]=0xXXXXXXXXXXXXX

Connect the second interface to the switch or hub. Leave the old one connected.

After that you can try to restart the network.

When the system dont works correctly, the most reasons are misconfigured values or stopped sybsystems.


To activate the cards i would prefer the following way:
- Be sure, that all necessarry software and
patches are installed on the system
- Modify all the files.
- Look for a time window when nobody is
working and then do a reboot.

If you choose this way, you can verify that all subsystems are running well.
Mihails Nikitins
Super Advisor

Re: Changing network interface

Thanks to all of you!!!

1. Now I agree it is safer to restart the server after changes.

2. It may be reasonable to check everything from single mode first. I would go single user, make all changes, type "ifconfig lan0 down" and then issue "net start". If nework connectivity is OK, I would restart everything. If something is not working, I can easily return to the previous configuration and reboot.

3. It sounds good to plug the new adapter in the network with another IP address. But
I guess that the new address should not belong to an existing subnet. I'm afraid problems with routing may occur if two network adapters are attached to the same subnet. I would rather choose some unused private address for the new adapter and connect to some other device with the same subnet's IP address. Then I would bring the interface up manually, I hope it should not affect current operation.

4. My
/etc/rc.config.d/hpetherconf
does not contain any customizations. I guess nothing should be modified in my case.

HP_ETHER_INTERFACE_NAME[0]=
HP_ETHER_STATION_ADDRESS[0]=
KISS - Keep It Simple Stupid
Stefan Farrelly
Honored Contributor

Re: Changing network interface


You have to be careful attaching 2 NIC's on the same subnet, see the following question and replies on what you need to do to set this up correctly;

http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0xd3627e990647d4118fee0090279cd0f9,00.html
Im from Palmerston North, New Zealand, but somehow ended up in London...
Elmar Bueker
Occasional Advisor

Re: Changing network interface

Hello,

the problems with 2 NIC's are not on K-Class with HP-UX.

The only problem which could occur is that the mashine will act as an router.

If you have a problem with that you can stop the default routing with the following command:

With lanadmin you can check the state (errors) of the interface.

Execute lanscan to get the NMID from the interface

Check the state of the network parameters
nettune -l

Switch of routing
nettune -s ip_forwarding 0
nettune -s ip_forward_directed_broadcasts 0

I'm not sure that the command takes effect after an reboot.