Operating System - HP-UX
1834149 Members
2298 Online
110064 Solutions
New Discussion

How to reassign lan0, lan1, and lan2?

 
SOLVED
Go to solution
David Yandry
Frequent Advisor

How to reassign lan0, lan1, and lan2?

Hello Experts,

I am trying to configure two (almost) identical HP9000 K380 servers under HP-UX 11.0. On the first (production) server lanscan looks like this:

Path Card In# Net-Interface
10/8/2/0 1 lan1
10/8/1/0 0 lan0
10/12/6 2 lan2

On the lab server it looks like this:
Path Card In# Net-Interface
10/8/2/0 2 lan2
10/8/1/0 1 lan1
10/12/6 0 lan0

The cards are identical and are located in the same locations but have different lan assignments. The NIC at 10/12/6 is the built-in 10-Base-T port. The NIC at 10/8/1/0 and 10/8/2/0 is a 2-port 10/100 card. The problem is that I added the 10/100 card to the lab server after I loaded HP-UX. Does anybody know of a way to reassign the lan numbers so that both machines match? I really don't want to reload the operating system and all the software and patches.

Thanks,
David

7 REPLIES 7
A. Clay Stephenson
Acclaimed Contributor

Re: How to reassign lan0, lan1, and lan2?

Most of the time lan assignments don't matter although for MC/SG some folks like to keep them there lan assignments the same. The other time it might matter is if you are setting up a firewall lab and the rules apply to specific lanX designations. Probably the most straightforward approach is Ignite --- this sounds like a perfect use of an IgniteUX "Golden Image".
If it ain't broke, I can fix that.
Steven E. Protter
Exalted Contributor

Re: How to reassign lan0, lan1, and lan2?

This document might work.

It works with disk instance numbers.

http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&admit=-1335382922+1098717421883+28353475&docId=200000067424466

I admit to a bit that I'm mystified as to how the install decides to hand out these lan numbers.

I've never had these differences cause me real operational issues.

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
Sanjay_6
Honored Contributor

Re: How to reassign lan0, lan1, and lan2?

A. Clay Stephenson
Acclaimed Contributor
Solution

Re: How to reassign lan0, lan1, and lan2?

Let me give you a plan B I found in my MC/SG notes:

I. cd /
ioscan -f | grep -e "DEVICE" -e "INTERFACE" | grep -v "target" | awk '{printf("%-20.20s %-12.12s %3d\n",$3,$1,($2 + 0))}' > devlist # all of this is one line

This creates a file listing HW Path, Class, and Instance Numbers for the devices. It's the Instance Numbers that you want to change.

B. Vi devlist and assign instance numbers 0, 1,2 to lan0, lan1, and lan2 respectively. Leave the disk assignments as they are. Save the file.

III. Now blow away the ioconfig file and reboot:
cd /stand
mv ioconfig ioconfig.old
cd /etc
mv ioconfig ioconfig.old
shutdown -r 0

4) The system bootup will stop at ioinitrc message:
/sbin/ioinit -c # this will recreate the missing ioconfig files
/sbin/ioinit -f /devlist -r # this will read in your edited file and reboot. You may see error messages like "Input is identical". Pay no attention.

After the box has rebooted, do a lanscan and make sure your assignments are as you expected.




If it ain't broke, I can fix that.
Steven E. Protter
Exalted Contributor
David Yandry
Frequent Advisor

Re: How to reassign lan0, lan1, and lan2?

Thanks everyone for the quick responses. I just finished A. Clay's "Plan B" and it worked perfectly. The longest parts of this were the reboots. My lan assignment now match exactly.

This place rocks!!!

Regards,
David
A. Clay Stephenson
Acclaimed Contributor

Re: How to reassign lan0, lan1, and lan2?

I should add a Plan C. Put in a support call and ask for the "ioconfig2infile" utility. It will save you one reboot as compared to Plan B. They should give you the details of how to use the utility but Plan B will work fine though it does take two reboots.
If it ain't broke, I can fix that.