This is a short tech-note to
preserve the speed, duplexity and MAC settings for a network interface on HP-UX
to survive a reboot. First, list the network interfaces with ioscan!
#ioscan -fknC lan
Class I
H/W Path Driver S/W State
H/W Type Description
==========================================================================
lan 0
1/0/0/1/0 igelan CLAIMED
INTERFACE HP PCI-X 1000Base-T
Built-in
lan 1
1/0/4/1/0/4/0 iether CLAIMED
INTERFACE HP AB545-60001
PCI/PCI-X 1000Base-T 4-port 1000B-T Adapter
lan 2
1/0/4/1/0/4/1 iether CLAIMED
INTERFACE HP AB545-60001
PCI/PCI-X 1000Base-T 4-port 1000B-T Adapter
lan 3
1/0/4/1/0/6/0 iether CLAIMED
INTERFACE HP AB545-60001
PCI/PCI-X 1000Base-T 4-port 1000B-T Adapter
lan 4
1/0/4/1/0/6/1 iether CLAIMED
INTERFACE HP AB545-60001
PCI/PCI-X 1000Base-T 4-port 1000B-T Adapter
|
With the lanadmin command you
can list the current settings. (Speed and duplexity) -x (lowercase) is for
displaying. If something is wrong, you can modify it with the -X (uppercase)
parameter. Note that there is an interactive mode for lanadmin if you don’t
enter any parameter. Here I display the settings for PPA 1 and 2:
#lanadmin -x 0
Speed = 1000
Full-Duplex.
Autonegotiation =
On.
#lanadmin -x 2
Speed = 1000
Full-Duplex.
Autonegotiation = On.
|
Though these settings won’t
survive a reboot, so you need a config file to firm down the settings. The
config files are to be found under /etc as usual, they vary according to the
driver the adapter uses:
#ll
/etc/rc.config.d/hp*conf | grep -e lan -e ether
-r--r--r-- 1 bin bin 1340 Feb 26 14:14
/etc/rc.config.d/hpbtlanconf
-r--r--r-- 1 bin
bin 4469 Oct 24 2005 /etc/rc.config.d/hpgelanconf
-r--r--r-- 1 bin bin 6463 Feb 26 14:00
/etc/rc.config.d/hpietherconf
-r--r--r-- 1 bin bin 4988 Feb 26 14:16
/etc/rc.config.d/hpigelanconf
|
In my case, the lan0 uses a igelan driver, so I need to write its config
into /etc/rc.config.d/hpigelanconf:
# tail -n 4 /etc/rc.config.d/hpigelanconf
HP_IGELAN_INTERFACE_NAME[0]=lan0
HP_IGELAN_STATION_ADDRESS[0]=
HP_IGELAN_SPEED[0]=auto_on
HP_IGELAN_MTU[0]=1500
|
The HP_IGELAN_INTERFACE_NAME[x]
is an array containing the name of the interfaces; the HP_IGELAN_STATION_ADDRESS[x]
array contains the MAC addresses of every btlan-adapter (it is used for a
custom MAC address, leave it blank if not applicable). The HP_IGELAN_SPEED[x]
array can have the following value: 10HD, 10FD, 100HD, 100FD and AUTO_ON. Note
that there is no such setting as 1000HD or 1000FD, there is no way to force
gigabit speed. If you want gigabit just set either way of the communication to
AUTO_ON. For these three arrays the indices are coherent, this means that e.g.
the speed setting HP_IGELAN_SPEED[8]=100FD belongs to the card declared in HP_IGELAN_INTERFACE_NAME[8].
The PPA number and these indices shouldn’t be the same, this means that I could
define my cards in any order I wish. I just need to pay attention to the driver;
it may be that other cards must be declared in other config files.
There is separate script for each driver at below location:
#grep -l lanadmin
/sbin/init.d/*
/sbin/init.d/hpbtlan
/sbin/init.d/hpbtlan_enh
/sbin/init.d/hpgelan
/sbin/init.d/hpiether
/sbin/init.d/hpigelan
/sbin/init.d/hpintl100
/sbin/init.d/hppcifddi
/sbin/init.d/vlan
|
We could also accomplish above activity through sam.
Sam -> Networking and
Communications -> Network Interface Cards -> select (appropriate)
lan card - . Key Tab (to move curser to File) -> Actions ->
Modify.
|
Thank you for Reading,
No comments:
Post a Comment