Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problems with ip address 3

Status
Not open for further replies.

hookem1994

Technical User
Mar 28, 2001
15
US
I am trying to locate my ip address on a Solaris box. The way our boxes are set up i get my computers name (i.e. w2kwucds01.utah.sw.com) instead of the ip address. If I ping the computer name it tells me that it is alive.Also if I ping my ip address it states I am alive.
The reason I need this we use DCHP and our IP's always change and I am wanting to write a script to automate this. Can anyone assist?
I have tried the following:
ifconfig -a .... does not list my current user ip
netstat -rn .... does not list my current user ip

Thanks,
David
 
Not sure if this is what you want, but finger should tell you where you're connecting from. Doesn't the /etc/hosts file tell you the IP address of the host? Sorry if this isn't appropriate, I don't really know too much about DHCP. Good luck.
 
Thanks guys.... I was able to use the nslookup to resolve this problem. Now comes the fun part of working on my scripts. Thanks again for your help.
 
ping -s <server>

can also tell you the ip :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top