Networking
cancel
Showing results for 
Search instead for 
Did you mean: 

ifconfig -a not working on HP-UX , why ?

redhat7012
Advisor

ifconfig -a not working on HP-UX , why ?

Hi ,

 

Wont ifconfig -a work on HP-UX server ?

 

server version is :

HP-UX wlsms01 B.11.11 U 9000/800 3995265642 unlimited-user license

 

Is their any alternate command for this in HP-UX ?

 

 

regards,

aparna.

 

 

P.S. This thread has been moved from HP-UX > System Administration to HP-UX > networking - HP Forums Moderator

 

 

2 REPLIES
Patrick Wallek
Honored Contributor

Re: ifconfig -a not working on HP-UX , why ?

No, 'ifconfig -a' does not work on HP-UX.  If you use ifconfig you must specify an interface to see its configuration.

 

# ifconfig lan0

 

If you just want to see ip addresses for all interfaces:

 

# netstat -in

 

 

Duncan Edmonstone
Honored Contributor

Re: ifconfig -a not working on HP-UX , why ?

>> ifconfig -a not working on HP-UX , why ?

 

The question is "why should it?" Just because thats how a command behaves on "A N other" UNIX/Linux system, you should never assume thats how it will work on another flavour... that's what man pages are there for...

 

Anyway Patrick has already given you a way of getting the IP addresses bound to NICs - if you want more detail/something more like "ifconfig -a" would give you on Linux, then try:

 

lanscan -p | while read lan
do
ifconfig lan${lan}
done 2>/dev/null

 


HTH

Duncan