In Ubuntu 14.04, when I run the command ifconfig | grep HWaddr to know the mac address of my computer, I find two MAC addresses, how is it possible?

zina@zina-HP-Pavilion-g4-Notebook-PC:~$ ifconfig | grep HWaddr
eth0      Link encap:Ethernet  HWaddr a4:5d:36:71:61:d9  
wlan0     Link encap:Ethernet  HWaddr 24:fd:52:e1:9b:4d  

MAC addresses belong to network adapters, not computers. Your computer has a wireless interface (wlan0) and a wired interface (eth0). Each has its own MAC address.

If you're connected to a wired network, the MAC address that everyone else sees is the first one. If you're on wireless, it's the second one.

  • On running ifconfig | grep HWaddr, I see a third entry besides eth0 and wlan0: pan1 Link encap:Ethernet HWaddr 76:40:d6:7b:56:2b. Any idea what that's about? – DK Bose Mar 17 '16 at 12:16
  • 2
    "the MAC address that everyone else sees"... on the local network, of course, as it won't go any further. – jcaron Mar 17 '16 at 12:47
  • 1
    @DKBose The pan1 interface is a software interface used to bridge the Wifi and LAN connector together (only used when you make a Wifi connection a Wifi router and share this connection with another computer that connects to your laptops wired connector). You may also see hardware-addresses linked to Bluetooth and Firewire connections. These can be used as network interfaces too. – Tonny Mar 17 '16 at 12:47
  • @Tonny, are you sure that pan is used for anything else apart from Bluetooth? – jcaron Mar 17 '16 at 12:49
  • @jcaron With IPv6 that's not entirely true anymore. Self-generated Ipv6 addresses often embed the mac-address. So mac-addresses can get exposed wider than the local LAN, albeit in a non-Ethernet way. – Tonny Mar 17 '16 at 12:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.