Operating System - HP-UX
1820269 Members
3297 Online
109622 Solutions
New Discussion юеВ

Re: locations of ip address

 
mike worrell
Regular Advisor

locations of ip address

hi all,

is there a place other than netconf and /etc/hosts where the ip address is located and is there any other way than lanscan to get mac address.

Our communication people just asked me and they are the only 2 places I have ever done anything with an ip address, they are updating their lists of mac and ip addresses.

Is there any other locations for these 2 items.

thanks
mike
9 REPLIES 9
James R. Ferguson
Acclaimed Contributor

Re: locations of ip address

Hi Mike:

If you are using DNS, then your /etc/resolv.conf file will contain entries like:

nameserver 10.100.100.10

Regards!

...JRF...
Rodney Hills
Honored Contributor

Re: locations of ip address

You must have a DNS server. Use "nslookup" to find out the mapping.

If you have NIS, then you can enter "ypcat hosts" to get a list.

-- Rod Hills
There be dragons...
Sanjay_6
Honored Contributor

Re: locations of ip address

Hi,

/etc/rc.config.d/netconf and /etc/hosts are the places where your ip address is located. Also check your DNS database. you can get the mac address of the lan port using lanscan. I don't think there is any other command.

Hope this helps.

Regds
harry d brown jr
Honored Contributor

Re: locations of ip address


Mike,

Before giving them the MAC address, make sure you aren't overriding it in your /etc/rc.config.d files, like hpbtlan.

live free or die
harry
Live Free or Die
PIYUSH D. PATEL
Honored Contributor

Re: locations of ip address

Hi,

/etc/hosts
/etc/rc.config.d/netconf
/etc/resolv.conf
lanscan

You can boot the server and then go to the diagnostic tools and also find out the mac address. Run stm or cstm.

Piyush
Arockia Jegan
Trusted Contributor

Re: locations of ip address

/etc/hosts & /etc/rc.config.d/netconf are the only files holding the ip address of the system.
Ralph Grothe
Honored Contributor

Re: locations of ip address

Why is it your MAC collectors don't want to use the lanscan command?
As far as I can see there is the SGID bit set so that at least for their purpose they can issue the command (maybe in a looping remsh, or ssh command to all your LAN's HP-UX boxes?) even as mere mortal users.
Apart from this they could snoop your IP traffic by use of a packet sniffer (e.g. the libpcap).
For this to work they need to have access to a host in your LAN where they can set the NIC to promiscous mode, which of course requires sysadmin privileges on this host.
Another option would be to use the SNMP, provided your HP-UX boxes are SNMP-manageble stations.
Madness, thy name is system administration
Ralph Grothe
Honored Contributor

Re: locations of ip address

Since there is only little parsing involved I attached four lines of sh code which you can place in a remsh loop to be invoked on your hosts.
I would rather do this stuff in Perl (it's much more fun ;-) but I used awk because I hear there are still boxes without a Perl interpreter.
Madness, thy name is system administration
mike worrell
Regular Advisor

Re: locations of ip address

thanks to all for all your help