Operating System - HP-UX
1827294 Members
2302 Online
109717 Solutions
New Discussion

Re: Changes in IP Address

 
Yogeeraj_1
Honored Contributor

Changes in IP Address

Dear experts!

I have a RP5430 with network interfaces as follows:
---------------------------------------------------------------------------------
SLX1:home/yogeeraj>./speed-lan.sh
Card at PPA 0 - IP Address: 198.47.160.11 - Config = 100 Full-Duplex AUTONEG
Card at PPA 1 - IP Address: 192.97.14.1 - Config = 100 Full-Duplex AUTONEG
Card at PPA 2 - IP Address: 172.0.28.1 - = 1000 Full-Duplex. = On.
---------------------------------------------------------------------------------
SLX1:home/yogeeraj>ioscan |grep lan
0/0/0/0 ____lan____________HP PCI 10/100Base-TX Core
0/9/0/0 ____lan____________HP A5230A/B5509BA PCI 10/100Base-TX Addon
0/10/0/0 ___lan____________HP A4926A PCI 1000Base-SX Adapter
SLX1:home/yogeeraj>
---------------------------------------------------------------------------------

We are planning to interchange the IP address between card at PPA 0 and PPA 2.

What OS level cautions do we need to excercise? Do we need a restart?

Would these steps work? (sorry we do not have any servers where we can test this!)
0. Disable user accesses.
1. Log as root user on console.
2. Disconfigure card at PPA0 and PPA 2.
3. Configure card at PPA0 and PPA 2 with "new" ip addresses.
4. Enable accesses.

Thank you in advance for your replies.

best regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
12 REPLIES 12
Mark Grant
Honored Contributor

Re: Changes in IP Address

You definately don't need to re-boot. Your suggestion works fine though don't forget to change everything in /etc/rc.config.d/netconf

You could probably do this without re-booting if you don't mind flushing arp caches here and there.

You could try using "ifconfig" to assign a dummy address to ppa0. At the same time (seperated with a ;) assign ip address 1 as a second ip address on ppa2:1. Then in a similar manner, assign a dummy address to ppa2 and ip address 1 to ppa1.

At this point you have ip2 on ppa1 and ppa2 has a dummy ip and ppa2:1 has ip1. Simpy delete inteface ppa2:1 and set the ip1 on ppa2.

This is all a bit over the top but I bet you could do this without the users even knowing it had happened.
Never preceed any demonstration with anything more predictive than "watch this"
T G Manikandan
Honored Contributor

Re: Changes in IP Address


Login at console

1.ifconfig lan0 unplumb
2.ifconfig lan2 inet 198.47.160.11 netmask up
3.ifconfig lan0 inet 172.0.28.1 netmask up

Just a short interruption.

make sure you update /etc/rc.config.d/netconf to take the changes after reboot.

Also take care of any changes in /etc/hosts file if required.
Also make sure that you disable AUTO_NEG at both ends and set at both ends with FD.
T G Manikandan
Honored Contributor

Re: Changes in IP Address

Sanjay Kumar Suri
Honored Contributor

Re: Changes in IP Address

1. Take Ignite backup.
2. Reboot may not be rquired.
3. On remote hosts use #arp â s hostname to create an ARP entry with a new Ethernet address

A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
G. Vrijhoeven
Honored Contributor

Re: Changes in IP Address

Hi Yogeeraj,

I would go the for.

0. log in to (web)console/gsp
1. adjust the netconf ( change lan0 in lan2),
2. ifconfig lan0 down
3. ifconfig lan0 unplumb
4. /sbin/init.d/net start

( this way you make sure the netconf file is set up correct.)

HTH,

Gideon
Gideon
Naveej.K.A
Honored Contributor

Re: Changes in IP Address

Yogeeraj,
The best way however is to do it through SAM.
Need to disable one network card. change the IP address of the other as of that the disabled one and then change the IP address of the disabled. enable it...You neednot restart the system.

what procedure you have mentioned should work without any errors.

Regards
Naveej
practice makes a man perfect!!!
fahed molhim
New Member

Re: Changes in IP Address

hi dear
please can you explean more about change ip address in unix server
Wilfred Chau_1
Respected Contributor

Re: Changes in IP Address

Your steps look good.

The default gateway is going to be changed too, correct?

Do this to swap the IP.

1) at the console,
# route -f (clear the route table)

2) vi /etc/rc.config.d/netconf, to reflect your change. Especially the gateway.


3) unconfigure both nic
# ifconfig lan0 0.0.0.0
# ifconfig lan2 0.0.0.0

4) run, /sbin/init.d/net start

5) check route table, netstat -rn
Jeroen Peereboom
Honored Contributor

Re: Changes in IP Address

Don't forget the network cables.
If both 'logical' subnets are available on both 'physical' cables, everything will be fine.

Assuming you're awapping the interfaces because of the speed, you probably must swap network cables at the server or at the switch side, or chamging VLANs.

JP.
Wilfred Chau_1
Respected Contributor

Re: Changes in IP Address

Good point Jeroen.
Steve Bonds
Trusted Contributor

Re: Changes in IP Address

Watch out for delays caused by arp cache timeouts on the upstream switch and/or router. These are usually minor (5-20min) but if you're expecting to be able to connect from remote systems right away, they can be an unwelcome surprise.

As has been already mentioned, other hosts on the same subnet that have recently been communicating with your host will need to have their arp cache flushed in order to talk immediately.

Another option is to override the default MAC address for each card in the card config file to keep the MAC for each IP the same, eliminating the need to re-ARP. However, I've seen this cause some strange issues so I avoid it whenever possible.

-- Steve
Yogeeraj_1
Honored Contributor

Re: Changes in IP Address

dear all,

i used the solution as described by Wilfred Chau above. Worked perfectly.

best regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)