Operating System - HP-UX
1832891 Members
2629 Online
110048 Solutions
New Discussion

listing TCP/IP configurations

 
SOLVED
Go to solution
Norman_21
Honored Contributor

listing TCP/IP configurations

Could anyone advise what's the command in HP-UX that will work like ipconfig/all in MS-Windows, to show the NICs as well as TCP/IP Current Configuration assigned to each NIC.

Thnx
"Attitudes are contagious, is yours worth catching"/ My first point was given by SEP on January 31, 2003
11 REPLIES 11
Michael Tully
Honored Contributor
Solution

Re: listing TCP/IP configurations

The following two commands should show you what you want.
e.g.
# ifconfig lan0

# lanscan

You can also view all of the current TCP/IP connections using:
# netstat -a
Anyone for a Mutiny ?
James Murtagh
Honored Contributor

Re: listing TCP/IP configurations

Hi,

You can use the lanscan command to show all NICs (I am pasting this so hope the format is OK!) :

# lanscan
Hardware Station Crd Hdw Net-Interface NM MAC HP-DLPI DLPI Path Address In# State NamePPA ID Type Support Mjr#
8/16/6 0x0060B018B5F7 0 UP lan0 snap0 1 ETHER Yes 119

And use "ifconfig " to get the configuration.

# ifconfig lan0
lan0: flags=843
inet 10.1.33.0 netmask fffff800 broadcast 10.1.33.255

Both commands are located in /usr/sbin.

Regards,

James.
Dave Unverhau_1
Honored Contributor

Re: listing TCP/IP configurations

The lanscan command will show each NIC, along with its path, hw address, card instance, Net Name-PPA, encapsulation and more.

The ifconfig command will provide the ip address and netmask assigned to the specified NIC. Issue the ifconfig commnd followed by the Name-PPA of the desired NIC (e.g. ifconfig lan0)

The domain that the host belongs to, as well as DNS servers can be found in the /etc/resolv.conf file.

Unfortunately, there is not a single command that will provide all of this info in a concise form (as far as I know).

You might want to do a man on each of these commands, as well as on resolv.conf.

Regards,

Dave
Romans 8:28
Gerhard Roets
Esteemed Contributor

Re: listing TCP/IP configurations

To see the configured information .. not running necesseraly

look at the contents of /etc/rc.config.d/netconf

Another usefull command would be
ioscan -fnClan
netstat -rn
netstat -i

Let me make it "man netstat" and "man ifconfig" a lot of running configuration information can be extrapolated out of these commands.

Add these to the list above
Christian Gebhardt
Honored Contributor

Re: listing TCP/IP configurations

lanscan | grep lan | awk '{print $5}' | xargs -l ifconfig

Chris
Norman_21
Honored Contributor

Re: listing TCP/IP configurations

Thanks Guys,

All the options works fine it's just there is no option to show all in one output unless a script can do that!
However, the resolv.conf was not configured and I did the configuration by poining the HP-UX to another DNS server. I use to get an error msg "unable to qualify my own domain... short name.."
After I have add the CORP domain name that msg went away. I wonder if the hostname of the server must be registered or it should work without registration..
One more thing, I have sent and email to myself as a test using the mailx -s command but didn't get any email!!
Please advise.
"Attitudes are contagious, is yours worth catching"/ My first point was given by SEP on January 31, 2003
Yogeeraj_1
Honored Contributor

Re: listing TCP/IP configurations

hi,

For the NIC part, i have a script that gives me an output like below:
============================================================
home/yd> ./lan-speed.sh
Card at PPA 0 - IP Address: 192.96.14.9 - Speed = 100 F
ull-Duplex Auto-Negotiation-OFF
Card at PPA 1 - IP Address: 192.97.14.3 - Speed = 100 Full-Duplex
Card at PPA 2 - IP Address: 192.98.14.3 - Speed = 100 Half-Duplex
Card at PPA 3 - IP Address: Not assigned - Speed = 100 Half-Duplex
Card at PPA 4 - IP Address: Not assigned - Speed = 100 Half-Duplex
Card at PPA 5 - IP Address: 10.0.0.100 -
============================================================
(see attachment)

For the local mail:
Please try to add an alias in /etc/aliases

and retry.

regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
T G Manikandan
Honored Contributor

Re: listing TCP/IP configurations

Edit your /etc/mail/sendmail.cf

Make changes as below

DS

//find the DS entry and append smtp server name in

Dj$w.
//find Dj$w and append your domain name

save your file
DO a
/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start

Make sure that you can do a nslookup of the smtp server

#nslookup
#nslookup

The mail should work.
Yogeeraj_1
Honored Contributor

Re: listing TCP/IP configurations

oops!
attachment
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
U.SivaKumar_2
Honored Contributor

Re: listing TCP/IP configurations

Hi,
If your server is accessible using a Public IP address in Internet and you need a name for your server to be mapped to IP address so that
anyone from anywhere in the internet can access your server using this name , say
yourserver.yourcompany.com . Then you have to
register your domain yourcompany with the help of registrar or administrator of .com domain.

If you want to only access the internet servers
by their name from your server But do not want to assign any name to your server for people to access in internet. Then simply point to your ISP's DNS server in resolv.conf.

To receive mails from Internet , you need to register a domain name.

regards,
U.SivaKumar
Innovations are made when conventions are broken
Norman_21
Honored Contributor

Re: listing TCP/IP configurations

Yogeeraj scripts is the choice!
Thanks to everyone
"Attitudes are contagious, is yours worth catching"/ My first point was given by SEP on January 31, 2003