MAC Addresses (Media Access Control Address) is the physical address of a network device. It works on Layer 2 of OSI Model and it is very important for networking. Every network interface or every device has a MAC address. Sometimes we need MAC address lookup for various reasons. In this lesson, we will learn how to do MAC address lookup on different platforms like Windows, Linux, MacOS, IOS, Android etc.
Now, let’s go and start how to learn MAC addresses on these platforms one by one.
You can also check IPv4 Addressing and IPv6 Addressing basics!
Table of Contents
If you are using a PC which has Windows operating system on it, you can do MAC address lookup with two ways. One way is using command line (cmd) and the other is using Windows menus.
The first way is using comman line interface to view your MAC adderss. You can do this with the following steps:
C:\Users\asus> ipconfig/all
…
Ethernet adapter Ethernet:
Media State . . . . . . . . . . . :
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . :
Physical Address. . . . . . . . . : C2-E2-82-AD-B5-56
DHCP Enabled. . . . . . . . . . . :
Autoconfiguration Enabled . . . . :
The other way to do MAC address lookup on windows is using menus. To do this, you can follow the bellow steps:
Physical Address (MAC): C2-E2-82-AD-B5-56
We have learned Windows MAC address lookup. Now, let’s learn how to learn MAC addresses on Linux devices. There are various ways to do this on Linux. Here, I will show you three ways of Linux mac address lookup. These commands are given below:
The firsy one is using the command which displays all the ip information. This is ifconfig command.
┌──(kali㉿kali)-[~]
└─$ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.125.129 netmask 255.255.255.0 broadcast 192.168.125.255
inet6 fe80::15aa:e2cc:54cc:a1e4 prefixlen 64 scopeid 0x20<link>
ether 00:aa:29:ff:1a:fc txqueuelen 1000 (Ethernet)
RX packets 111 bytes 7921 (7.7 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 61 bytes 6380 (6.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
…
Here, our mac address is in the line starting with ether. It is 00:aa:29:ff:1a:fc.
The second command which shows Linux physical address is “ip link show” command. Below, eth0 interface mac address is displayed at the last line.
┌──(kali㉿kali)-[~]
└─$ ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether 00:aa:29:ff:1a:fc brd ff:ff:ff:ff:ff:ff
The other wayof MAC address lookup is using cat command like below:
cat /sys/class/net/*/address
└─$ cat /sys/class/net/*/address
00:aa:29:ff:1a:fc
00:00:00:00:00:00
If you are using Apple Mac, you can find your MAC address easily. To do this MAC address lookup on Mac, you can follow the below steps:
We have learned how to find your MAC address on your computers, laptop etc. Now, let’s learn MAC address lookup on smart phones which uses IOS operating system. On an IOS device, there are four steps for MAC address learning. These are given below:
For other smart phones which are using Android operating system, you can follow the below steps:
In networking, MAC addresses are very important. Sometimes, we need to learn these physical addresses on routers and switches. To do MAC address lookup on Cisco devices, we have some specific commands. These Linux commands that display MAC address are given below:
Below, you can find the screenshots of these commands. We will use shows interfaces command on routers and three of these commands on switches.
Firstly, let’s start with a Cisco router.
Router# show interfaces
FastEthernet0/0 is administratively down, line protocol is down (disabled)
Hardware is Lance, address is 000c.cfa1.d79c (bia 000c.cfa1.d79c)
…
FastEthernet1/0 is administratively down, line protocol is down (disabled)
Hardware is Lance, address is 000d.bd22.0c7c (bia 000d.bd22.0c7c)
…
Now, let’s continue with a Cisco switch.
Switch# show interfaces
FastEthernet0/1 is down, line protocol is down (disabled)
Hardware is Lance, address is 0090.0c70.1e01 (bia 0090.0c70.1e01)
…
FastEthernet0/2 is down, line protocol is down (disabled)
Hardware is Lance, address is 0090.0c70.1e02 (bia 0090.0c70.1e02)
…
Switch# show version
…
Base ethernet MAC Address : 0001.C914.AC47
Switch# show interfaces vlan 1
Vlan1 is administratively down, line protocol is down
Hardware is CPU Interface, address is 0001.c914.ac47 (bia 0001.c914.ac47)
Here, we have learned MAC address lookup for various devices. We have learned how to learn mac address of the device on windows, Linux, MacOS, even IOS and Android devices. We have also talk about how to learn mac address on Cisco routers and switches.
Leave a Reply