What is MAC address?
When you communicate or transfer the data from one computer to another computer you need some address to perform that task. In Computer Network various types of address are introduced and each one works differently. Media Access Control (MAC) Address is a physical address which works at Data Link Layer. In this article, we will discuss what a MAC address is and how it's different from the IP address.
So, what is a MAC address?
In a local area network or other networks, the MAC address is your computer's unique hardware number. On an Ethernet LAN, it's the same as your Ethernet address. When you're connected to the Internet from your computer, a correspondence table relates your IP address to your computer's physical or MAC address on the LAN.
MAC Addresses are unique 48-bits hardware number of a computer, which is embedded into network card during the time of manufacturing. It's also known as Network Interface Card. MAC address is used by Media Access Control sublayer of Data-Link Layer of telecommunication protocols. MAC Address is word wide unique since millions of network devices exists and we need to uniquely identify each.
Ordination of a MAC Address -
MAC Address is a 12-digit hexadecimal number (6-Byte binary number), which is mostly represented by Colon-Hexadecimal notation. First 6-digits (like - 00:40:96) of MAC Address identifies the manufacturer, called an Organizational Unique Identifier (OUI). IEEE Registration Authority Committee assigns these MAC prefixes to its registered vendors and the rightmost six digits represent Network Interface Controller, which is assigned by the manufacturer.
MAC address is represented by three formats -
Colon-Hexadecimal notation - It's used by Linux OS. Example - XX:XX:XX:XX:XX:XX
Period-separated Hexadecimal notation - It's used by Cisco Systems. Example - XX.XX.XX.XX.XX.XX
Hyphen Hexadecimal notation - It’s used by Windows OS. Example - XX-XX-XX-XX-XX-XX
Types of MAC Address
A Unicast addressed frame is only sent out to the interface leading to specific NIC. If the LSB (Least Significant Bit) of the first octet of an address is set to zero, the frame is meant to reach only one receiving NIC. MAC Address of the source machine is always Unicast.
Multicast address allows the source to send a frame to a group of devices. In Layer-2 (Ethernet) Multicast address, LSB of the first octet of an address is set to one. IEEE has allocated the address block 00-80-C2-xx-xx-xx for group addresses for use by standard protocols.
Similar to Network Layer, Broadcast is also possible on the underlying layer( Data Link Layer). Ethernet frames with ones in all bits of the destination address (XX-XX-XX-XX-XX-XX) are referred to as the broadcast address. Frames which are destined with MAC address XX-XX-XX-XX-XX-XX will reach to every computer belong to that LAN segment.
Why do use MAC address?
All devices on the same network subnet have different MAC addresses. MAC addresses are very useful in diagnosing network issues, such as problems with IP addresses. MAC addresses are useful for network diagnosis because they never change, as opposed to a dynamic IP address, which can change from time to time. For a network administrator, that makes a MAC address a more reliable way to identify senders and receivers of data on the network.
On wireless networks, a process called MAC filtering is a security measure to prevent unwanted network access by hackers and intruders. In MAC address filtering, the router is configured to accept traffic only from specific MAC addresses. This way, computers whose MAC addresses are approved will be able to communicate through the network - even if they were given a new IP address by DHCP. When a hacker hijacked a network the IP address will be blocked because their MAC address will not be on the approved list and will be filtered out.
How do you find a MAC address of network device?
Operating Systems support various command-line and GUI utilities to allow users to find MAC address of the system.
On Unix variants including Solaris and Linux support "ifconfig -a", "ip link list" or "ip address show" command that displays MAC address of the network device among other useful information.
Windows including NT, 2000, XP and 2003 support "ipconfig /all" command that displays the MAC address.
On a MacOS, one can find MAC address by opening "System Preferences" (TCP/IP Control Panel), then selecting "Network".
What are the differences between MAC and IP address?
MAC identifies the physical address of a computer on the internet. In contrast, IP identifies the connection of a computer on the internet.
A MAC address is a number assigned to the NIC card by the manufacturer. An IP address is a number assigned to the connection in a network or Internet Service Provider.
MAC address uniquely identifies a device that wants to take part in a network. On the other hand, an IP address uniquely defines a connection of a network with an interface of a device.
MAC is 48 bits (6 bytes) hexadecimal address. IPv4 is a 32-bit (4 bytes) address, and IPv6 is a 128-bits (16 bytes) address.
ARP protocol can retrieve the MAC address of a device. On the other hand, RARP protocol can retrieve the IP address of a device.