MAC address in HP-UX

MAC address also known as station address can be found physically on LAN cards which are mostly PCI cards on your HP server. Obviously being a hardware, its not always feasible to open up just to get MAC address! Other way is to get these details from OS command. You can use lanscan, lanadminsamprint_manifest command to get MAC address of LAN card in HPUX.

First you need to get lan number on which your expected IP is configured. You can use netstat -nvr to check all IP configured on system and their respective lan number.
Look at interface column to get lanX number. For example we will try to get MAC of lan1 interface.

lanscan command

lanscan command without any argument will give you station address i.e. MAC addresses of all available lan on system.
Look station address and column and check value against lan1! lan1 has MAC of 0x001A3B08C4A1.

lanadmin command

This is not straight forward as lanscan command. After issuing lanadmin command you will presented with lanadmin console prompt where you can use lanadmin commands. Example below.
Here type command lan You will be greeted with LAN interface mode prompt like below.
Enter command ppa and change your number to 1 since we are checking lan1 in our example. Default is set to lan0
Once LAN interface PPA changed to 1 hit command display and you will be shown all details of that lan card including station address!
Here you can pad two zeros in from of station address to make it perfect 12 alphanumeric MAC. Means 1a3b08c4a1 becomes 001a3b08c4a1.

Using SAM

You can even use SAM (text based GUI tool) to get these details. Go to,
SAM -> Networking and communications -> Network Interface Cards
Select your lan (in our case lan1) using space bar (it will be highlighted). Then choose Actions from menu bar to get details.

Using print_manifest

If you have Ignite installed on server then you can try print_manifest command to get all system details. Those details also includes MAC of all lan cards. Only issue is your LAN PPA number wont be available here in output to match MAC with lan id.
SHARE

sangeethakumar

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment