ACCC Home Page ACADEMIC COMPUTING and COMMUNICATIONS CENTER
Accounts / Passwords Email Labs / Classrooms Telecom Network Security Software Computing and Network Services Education / Teaching Getting Help
 
How to Find Your MAC Address
0 Contents 1 Windows and Mac 2 Unix

Finding Your Machine's MAC Address: Unix

 

In computer networking, a Media Access Control address, better known as MAC address, is a unique identifier assigned to a network adapter or network interface card (NIC) by the manufacturer for identification. The MAC address can also be called the Ethernet Hardware Address (EHA), hardware address, adapter address or physical address. Your computer may have more than one MAC address. Do you have wireless and an ethernet port? Then you have at least two MAC addresses. Your smart phone probably also has a MAC address -- my iPhone has two; one for wireless and one for bluetooth.

MAC addresses are typically 6 groups of two hexadecimal digits (0-9,A,B,C,D,E,F), separated either by colons (:) or hyphens (-). The Wi-Fi Mac address on my iPhone, for example is: 00:1C:B3:09:85:15. The first three numbers, 00:1C:B3, are an Apple manufacturing code; only Apple products will have MAC address starting with those digits. (Settings then General then About then Wi-Fi Address. :)

Why do you care about MAC addresses? Generally speaking, you don't. But if you are having trouble with connecting to a network or if your computer has been hacked, then the ACCC's security, networking, operations, or repair folks might need you to tell them what it is to help them troubleshoot your problem. So here is how to tell.

Generally in Unix, the command to use is: ifconfig -a

 
   
 
     
Solaris/SunOS
 
  1. Become root, using su.
  2. Enter: ifconfig -a
    # ifconfig -a 
    ce0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu
         1500 index 2 inet 128.248.xx.xx netmask ffffff00 broadcast 128.248.xx.255
         ether 0:3:ba:21:33:33 
  3. The ethernet device is often called leo or ie0, but in this case, it is ce0. The MAC address is labeled ether, it is 00:03:ba:21:33:33 -- note that Solaris and SunOS takes of leading 0's from MAC addresses. (Actually, it's not 00:03:ba:21:33:33, I changed it to protect the innocent.)
 
     
Linux
 
  1. Become root, using su.
  2. Enter: ifconfig -a
    # ifconfig -a
    eth0      Link encap:Ethernet  HWaddr 00:09:3D:12:33:33  
              inet addr:10.248.155.17  Bcast:10.248.255.255  Mask:255.255.0.0
              inet6 addr: fe50::234:3dff:fe12:7d73/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:3489041718 errors:0 dropped:0 overruns:0 frame:0
              TX packets:3259212142 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:2732221481 (2.5 GiB)  TX bytes:4065716672 (3.7 GiB)
              Interrupt:185 
    
  3. The ethernet devices are called eth0, eth1, and so on The MAC address is in the first line of the output, labeled HWaddr, it is 00:09:3D:12:33:33. (Actually, it's not 00:09:3D:12:33:33, I changed it to protect the innocent.)
 
     
FreeBSD/NetBSD
 
  1. Become root, using su.
  2. Enter: ifconfig
    The relevant information is:
    en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
      ether 00:1f:f3:5b:2b:1f
      media: autoselect status: inactive
      supported media: autoselect 10baseT/UTP <half-duplex> 10baseT/UTP <full-duplex> 
    10baseT/UTP <full-duplex,hw-loopback> 10baseT/UTP <full-duplex,flow-control> 
    100baseTX <half-duplex> 100baseTX <full-duplex> 100baseTX <full-duplex,hw-loopback> 
    100baseTX <full-duplex,flow-control> 1000baseT <full-duplex> 1000baseT <full-duplex,hw-loopback> 
    1000baseT <full-duplex,flow-control> 
    none 
    en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
      inet6 fe80::21f:5bff:fec7:ee2f%en1 prefixlen 64 scopeid 0x5
      inet 192.168.1.108 netmask 0xffffff00 broadcast 192.168.1.255
      ether 00:1f:5b:c7:ee:2f
      media: autoselect status: active
      supported media: autoselect
      
  3. The ethernet port in this example is en0; it is not being used and its MAC address is ether 00:1f:f3:5b:2b:1f. The wireless is en1; it is being used and its MAC address is ether 00:1f:5b:c7:ee:2f. I cheated a bit here; this output is from my MacBook Pro, Mac OS X 10.5, in a Terminal window. Underneath the covers, Mac OS X is based on BSD Unix. If you take a look at the Leopard section on the Mac and Windows page, you will see that this is the same MAC address that Mac OS X reports for the AirPort card.
 
     
OpenBSD
 
  1. Become root, using su.
  2. Enter: netstat -in
    The relevant information is:
    Name   Mtu   Network         Address            Ipkts     Ierrs  Opkts     Oerrs Coll
    ef0    1500  131.193.195     something.zone.uic.72967739  0      49389949  0     0
                                 ALL-SYSTEMS.MCAST.
                                 08:00:69:aa:4a:55
    lo0    32992 loopback        localhost        2320502     0      2320502   0     0
                                 ALL-SYSTEMS.MCAST.
    
  3. The name of the adaptor in this case is ef0, its MAC address is called Address, and it is 08:00:69:aa:4a:55.
 
     
HP-UX
 

Newer versions of HP-UX use: nwmgr --get

For example:

# nwmgr --get 
Name/           Interface Station          Sub-   Interface      Related 
ClassInstance   State     Address        system   Type           Interface 
==============  ========= ============== ======== ============== ========= 
lan0            UP        0x00306EF4E07C igelan   1000Base-T 
lan1            UP        0x000F202B92D4 igelan   1000Base-T 
lan2            UP        0x0010837BDE00 btlan    100Base-TX

The Station Address is the MAC address, for example for lan0, it is 00:30:6E:F4:E0:7C.

In older versions of HP-UX, you might have to use lanscan.

 
     
IRIX
 
  1. Become root, using su.
  2. Enter: netstat -ia
  3. The relevant information is:
    	Name  Mtu  Network  Address           Ipkts    Ierrs Opkts   Oerrs Colls
    	fxp0  150  <link>   00:08:c7:3c:9b:02 4112773  0     224501  0     0      
        
  4. The name of the adaptor in this case is fxp0, its MAC address is called Address, and it is 00:08:c7:3c:9b:02.

Several people tried this command for me. Most got the MAC address, but some didn't. I have no idea why. Here is another command that even a non-root user can try: /etc/nvram eaddr
Here is the full dope: http://www.faqs.org/faqs/sgi/faq/admin/section-3.html.

 
     
AIX
 

The ifconfig -a command doesn't return the MAC address under AIX, so you must use netstat -ia.

  1. Become root, using su.
  2. Enter: netstat -ia
    The relevant information is:
    Name  Mtu   Network     Address              Ipkts Ierrs    Opkts Oerrs  Coll
    en0   1500  link#2      0.2.55.3a.0.97           0     0       14     0     0
                            01:bb:5e:00:cc:01
    
  3. The name of the adaptor in this case is en0, its MAC address is called Address, and it is 01:bb:5e:00:cc:01
 
 

MAC Address Previous: 1 Windows and Mac


2009-3-7  security@uic.edu
UIC Home Page Search UIC Pages Contact UIC