1767188 Members
6863 Online
108959 Solutions
New Discussion юеВ

NIC speed and mode

 
SOLVED
Go to solution
navin
Super Advisor

NIC speed and mode

Hello,
What are all the ways that i can check the NIC speed and mode (using ndd, etc) on hp box.Can some one please help with appropriate syntax for this,
Thanks
Learning ...
7 REPLIES 7
Geoff Wild
Honored Contributor
Solution

Re: NIC speed and mode

Try this script:

# cat /usr/local/bin/lancards
#!/usr/bin/sh
# script to check speed and settings of lan cards
PATH=/usr/sbin:/usr/bin
ppas=`lanscan | awk '$3~/^[0-9]$/{print $3}' | xargs`
for i in $ppas
do
printf "Card at PPA %s - " $i
ipa=`ifconfig lan${i} 2>/dev/null | awk '{ip=$2}END{if(ip==""){printf("Not assigned")}else{printf("%s ",ip)}}'`
printf "IP Address: %15s- " "$ipa"
lanadmin -x $i 2>/dev/null | awk '{$1="";printf("%s",$0)}'
echo ""
done


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Mel Burslan
Honored Contributor

Re: NIC speed and mode

assuming you are running 11.x


for CardInstance in `lanscan | awk {'print $3'}`
do
/usr/sbin/lanadmin -x ${CardInstance}
done
________________________________
UNIX because I majored in cryptology...
navin
Super Advisor

Re: NIC speed and mode

Hello , Thanks very much. i need to set up a NIC as 100 full duplex and Auto neg on. Can i use sam to do that.
Thanks
Learning ...
Steven E. Protter
Exalted Contributor

Re: NIC speed and mode

Shalom navin,

lanadmin -X 0 100FD

Sam can't do that.

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
Mel Burslan
Honored Contributor

Re: NIC speed and mode

If you want to make the change permanent, i.e., persistent when you boot your server:

ioscan -fknC lan

you will see an output like this :

Class I H/W Path Driver S/W State H/W Type Description
========================================================================
lan 0 0/1/2/0 igelan CLAIMED INTERFACE HP A6825-60101 PCI 1000Base-T Adapter
lan 1 0/2/1/0/6/0 igelan CLAIMED INTERFACE HP A9784-60001 PCI/PCI-X 1000Base-T FC/GigE Combo Adapter
lan 2 0/6/1/0/6/0 igelan CLAIMED INTERFACE HP A9784-60001 PCI/PCI-X 1000Base-T FC/GigE Combo Adapter


note the name of the driver for the interfaces, igelan in the case above.

Then go and edit :

/etc/rc.config.d/hpigelanconf

file

replicate the block of parameters as many times as necessary, i.e., number of times you have network interfaces. Sequence the index numbers in square brackets for each block, first set will be [0] second set will be [1] and so on.

update the line with INTERFACE_NAME and SPEED with the proper values (never try to set to 1000HD or 1000FD as it is not supported) and save the file and exit.

To make all the values to take effect, run

/sbin/init.d/hpigelan stop
/sbin/init.d/hpigelan start

this will make all of the interfaces you just updated to take the new speed setting to take effect.

Hope it helps.

PS. if your driver is different than igelan, locate the file names with the driver names in them similar to yours.

Also keep in mind that not all LAN cards are capable of fixing their speed to 100FD by this method. Ask HP if in doubt.
________________________________
UNIX because I majored in cryptology...
rick jones
Honored Contributor

Re: NIC speed and mode

Was there a typo in this:

" i need to set up a NIC as 100 full duplex and Auto neg on"

because hardcoding to 100FD and having AutoNeg on are mutually exclusive.

Unless you _know_ that autoneg does not work with your NIC/switch combination, and you cannot get the switch/NIC fixed/replaced I would suggest leaving everything autoneg. If for no other reason than when you migrate to Gigabit, autoneg needs to be on anyway - the GbE spec requires it.

See the attached boilerplate on duplex and 100BT.
there is no rest for the wicked yet the virtuous have no pillows
Nguyen Anh Tien
Honored Contributor

Re: NIC speed and mode

As SEP advice
#lanadmin -X 0 100FD
is the easy way to do and understand.
If you need more option, just type
#lanadmin
then menu will driven you to your desire
tienna
HP is simple