Feb 8, 2009
Getting the MAC address for network interfaces in HP-UX
Run lanscan Command: The output will look like as follows: gwh210da # lanscan Hardware Path Station Address Crd In# Hdw State Net-Interface /NamePPA NM ID MAC Type HP-DLPI Support DLPI Mjr# ------------------ -------------------- -------- ------------- ------------------------------------ ------- -------------- -------------------- ------------- 0/0/0/1/0 0x001279958672 0 UP lan0 snap0 1 ETHER Yes 119 0/0/10/1/0 0x001560046BA4 1 UP lan1 snap1 2 ETHER Yes 119 0/0/10/1/1 0x001560046BA5 2 UP lan2 snap2 3 ETHER Yes 119 0/0/12/1/0 0x001A4B0634B8 6 UP lan6 snap6 4 ETHER Yes 119 0/0/12/1/1 0x001A4B0634B9 7 UP lan7 snap7 5 ETHER Yes 119 The output will have one entry for each LAN card in the computer. The second field ("Station Address") is the MAC address. -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- To get the MAC addresses of another machine on the LAN, try the following: $ ping {hostname} -n 1 $ arp -a | grep {hostname} where {hostname} is the hostname or IP address of the remote machine. Please find below the example for the same: gwh210da # ping 10.188.37.165 -n 1 PING 10.188.37.165: 64 byte packets 64 bytes from 10.188.37.165: icmp_seq=0. time=0. ms ----10.188.37.165 PING Statistics---- 1 packets transmitted, 1 packets received, 0% packet loss round-trip (ms) min/avg/max = 0/0/0 gwh210da # arp -a | grep 10.188.37.165 gwh210db.tsrt.bt.com (10.188.37.165) at 0:12:79:95:96:ce ether |
Post a Comment