Operating System - HP-UX
1823921 Members
2980 Online
109667 Solutions
New Discussion юеВ

how can we know know the system external ip address in hp-ux:

 
sokolova
Advisor

how can we know know the system external ip address in hp-ux:

how can we know know the system external ip address in hp-ux?
5 REPLIES 5
Torsten.
Acclaimed Contributor

Re: how can we know know the system external ip address in hp-ux:

What should be the difference between internal and external addresses?

All IPs are in

/etc/rc.config.d/netconf

just do a "more" on this file.

You can also do a

lanscan

and show the settings for each NIC, like

ifconfig lan0


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!   
S B Nair
Occasional Visitor

Re: how can we know know the system external ip address in hp-ux:



You can use #netstat -in

and isolate from the class of IPs
Sajeesh
Asif Sharif
Honored Contributor

Re: how can we know know the system external ip address in hp-ux:

Hi sokolova,

Your question is not clear.

you can check the IP address from the following commands.

First see how many lan cards are installed.
#lanscan

after that

#ifconfig lan0 or lan1 etc

Example:

# lanscan
Hardware Station Crd Hdw Net-Interface NM MAC HP-DLPI DLPI
Path Address In# State NamePPA ID Type Support Mjr#
0/1/2/0 0x001321D650CB 0 UP lan0 snap0 1 ETHER Yes 119
# ifconfig lan0
lan0: flags=1843
inet 192.xxx.xxx.24 netmask ffffff00 broadcast 192.xxx.xxx.255
#
# netstat -rn
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
192.xxx.xxx.24 192.xxx.xxx.24 UH 0 lan0 4136
192.xxx.xxx.0 192.xxx.xxx.24 U 2 lan0 1500
127.0.0.0 127.0.0.1 U 0 lo0 0
#

Regards,
Asif Sharif
Regards,
Asif Sharif
Laurent Menase
Honored Contributor

Re: how can we know know the system external ip address in hp-ux:

if you don't have a proxy
ADDR=www.whatismyip.org
PORT=80

If you must use a proxy
$ADDR is the address of the proxy
and PORT the proxy port.

for instance
ADDR=web-proxy
PORT=8088
a=$( (echo "GET / HTTP/1.1\nHost: www.whatismyip.org\nUser-Agent:\n\n";sleep 1; echo "^]close")| telnet $ADDR $PORT | tr "
" "\$" )

a=="${a%\$*\$*}"
IP="${a##*\$}"
V. Nyga
Honored Contributor

Re: how can we know know the system external ip address in hp-ux:

Hi,

or 'ping' the ws with its name and you'll get back the ping statistic with the ip-address.

Volkmar
*** Say 'Thanks' with Kudos ***