Operating System - HP-UX
1833034 Members
2460 Online
110049 Solutions
New Discussion

No ifconfig -a in 11.11 v1?

 
SOLVED
Go to solution
jmb
Regular Advisor

No ifconfig -a in 11.11 v1?

Most other UNIX platforms let you look at all of your ethernet configs with "ifconfig -a". That doesn't work in v1, and I don't know of a workaround.

Does anyone know how to look at all of your ethernet settings with one command?
8 REPLIES 8
Christian Tremblay
Trusted Contributor

Re: No ifconfig -a in 11.11 v1?

Check man lanscan, man lanadmin

ifconfig too, but no -a switch

Chris
Jeff_Traigle
Honored Contributor

Re: No ifconfig -a in 11.11 v1?

HP-UX hasn't had the -a option ever (or at least as far back as my history goes to 9.0). It's easy enough to script though:

#!/usr/bin/sh
for NIC in $(lanscan | awk '{print $5}')
do
ifconfig ${NIC}
done
--
Jeff Traigle
Jeff_Traigle
Honored Contributor

Re: No ifconfig -a in 11.11 v1?

Oops... should leave out the header lines from lanscan :)


#!/usr/bin/sh
for NIC in $(lanscan -i | awk '{print $1}')
do
ifconfig ${NIC}
done
--
Jeff Traigle
Armin Kunaschik
Esteemed Contributor
Solution

Re: No ifconfig -a in 11.11 v1?

To view configuration of all configured interfaces use netstat -in.

All interfaces are shown (as Jeff described) with lanscan.

Armin
And now for something completely different...
Ralph Grothe
Honored Contributor

Re: No ifconfig -a in 11.11 v1?

HP-UX sucks in this respect.
But if it helps you could define a shell func like this:

ifconfig() { if [[ $1 = "-a" ]];then /usr/sbin/lanscan -i|cut -f1 -d\ |xargs -n1 /usr/sbin/ifconfig;else /usr/sbin/ifconfig $*;fi; }
Madness, thy name is system administration
Rasheed Tamton
Honored Contributor

Re: No ifconfig -a in 11.11 v1?

Do a lanscan

#lanscan
Hardware Station Crd Hardware Net-Interface NM MAC HP DLPI Mjr
Path Address In# State NameUnit State ID Type Support Num
0/28.1 0x097000D36E 1 UP lan1 UP 4 ETHER Yes 185
0/44.1 0x097009D0DC48 0 UP lan0 UP 5 ETHER Yes 185

Look for the NameUnit column
lan0, lan1, lan2 ,etc.

Then do;
ifconfig lan0
ifconfig lan1
ifconfig lan2
, etc. ...

This is the HP way of (ifconfig -a).
Torsten.
Acclaimed Contributor

Re: No ifconfig -a in 11.11 v1?

Hi,

try the script in the last post here:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=946574&admit=-682735245+1176726999874+28353475

Could be helpful.
Adjust if needed.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
jmb
Regular Advisor

Re: No ifconfig -a in 11.11 v1?

Thanks for your suggestions. Scripts can always be a work-around, but Armin's "netstat -in" was the easiest and quickest solution to what I was looking for.