Operating System - HP-UX
1833784 Members
4207 Online
110063 Solutions
New Discussion

command for finding out network cards

 
SOLVED
Go to solution
Shivkumar
Super Advisor

command for finding out network cards

Floks,

What is command to find out network interface cards along with virtual IPs on hpux 11i ?

Thanks,
Shiv
3 REPLIES 3
Henk Geurts
Esteemed Contributor

Re: command for finding out network cards

hi Shivkumar
most networking details can be found with

netstat -in
lanadmin
lanscan
ifconfig.

see the man pages for details.
regards.
Geoff Wild
Honored Contributor
Solution

Re: command for finding out network cards

Here's one that you can modify:

# 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.
Senthil Kumar .A_1
Honored Contributor

Re: command for finding out network cards

Hi shiva,

Example.. in my sytem how do i map..see at the end..

[rx260-04]/senthil >netstat -in
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
lan2 1500 15.54.200.0 15.54.202.134 45131 0 9035 0 0
lan1 1500 192.168.0.0 192.168.202.134 43546 0 1 0 0
lo0 4136 127.0.0.0 127.0.0.1 45 0 45 0 0


[rx260-04]/senthil >lanscan
Hardware Station Crd Hdw Net-Interface NM MAC HP-DLPI DLPI
Path Address In# State NamePPA ID Type Support Mjr#
0/0/3/0 0x00306E39C705 0 UP lan0 snap0 1 ETHER Yes 119
0/1/2/0 0x00306E394737 1 UP lan1 snap1 2 ETHER Yes 119
0/4/1/0 0x00306E4A794C 2 UP lan2 snap2 3 ETHER Yes 119


[rx260-04]/senthil >ioscan -funC lan
Class I H/W Path Driver S/W State H/W Type Description
====================================================================
lan 0 0/0/3/0 intl100 CLAIMED INTERFACE Intel PCI Pro 10/100Tx Server Adapter
lan 1 0/1/2/0 igelan CLAIMED INTERFACE HP PCI 1000Base-T Core
lan 2 0/4/1/0 btlan CLAIMED INTERFACE HP A5230A/B5509BA PCI 10/100Base-TX Addon

netstat -in --> lanscan --> ioscan -funC lan
-----------------------------------------------
lan1 --> 0/1/2/0 --> igelan CLAIMED INTERFACE HP PCI 1000Base-T Core

lan2 --> 0/4/1/0 --> HP A5230A/B5509BA PCI 10/100Base-TX Addon

get the point..

Regards :)
Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)