Computer Networks - 3 - What is Mac Address ? Master Spark

Опубликовано: 18 Март 2026
на канале: HamadCyber
922
60

Assalam u alaikum, i am muhammad hamad and my channel is master spark

MAC Address Stands for "Media Access Control Address," and no, it is not related Apple Macintosh computers.

The MAC address is manufactured into every network card, such as an Ethernet card or Wi-Fi card, and therefore cannot be changed.

Example of a MAC address:  00:00:00:a1:2b:cc
Every device connected to your home network has a unique MAC address. If your computer has multiple network adapters (for example, an Ethernet adapter and a wireless adapter), each adapter has its own MAC address.
You can block (blacklist) or allow (whitelist) service to a specific device if you know its MAC address.

Is the MAC address permanent?
Yes, the MAC address is permanent! MAC addresses are assigned to all network adapters at the moment of their manufacture, and they are unique for each networking device. The MAC address of a network device is written by its manufacturer directly in that device's hardware read-only memory, and cannot be removed from there.
And No, the MAC address is not permanent! Although the MAC address cannot be erased from a networking device, it can be spoofed. You can replace the default MAC address easily, with just a few clicks. However, because the original MAC address cannot be removed, you can always reset your networking device to use the original MAC address.

What are MAC addresses used for?
Network cards each have a unique MAC address. Packets that are sent on the ethernet are always coming from a MAC address and sent to a MAC address. If a network adapter is receiving a packet, it is comparing the packet’s destination MAC address to the adapter’s own MAC address. If the addresses match, the packet is processed, otherwise it is discarded.


How do IP addresses and MAC addresses work together?
IP is a protocol that is used on a layer above ethernet. Another protocol for example would be IPX. When your computer wants to send a packet to some IP address x.x.x.x, then the first check is if the destination address is in the same IP network as the computer itself. If x.x.x.x is in the same network, then the destination IP can be reached directly, otherwise the packet needs to be sent to the configured router.
Up to now things seem to have gotten worse, because now we have two IP addresses: one is the original IP packet’s target address, the other is the IP of the device to which we should send the packet (the next hop, either the final destination or the router).
Since ethernet uses MAC addresses, the sender needs to get the MAC address of the next hop. There is a special protocol ARP (address resolution protocol) that is used for that. Once the sender has retrieved the MAC address of the next hop, he writes that target MAC address into the packet and sends the packet.
Routing
I almost forgot to mention: there is no routing based on MAC addresses. Low level ethernet and MAC addresses can only reach every device on the same network (cabled or wireless). If you have two networks with a router in between you cannot have a device in network A send a packet to the MAC address of a device in network B. No device in network A has the MAC address of the device in network B, so a packet to this MAC address will be discarded by all devices in the network A (also by the router).
Routing is done on IP level. Simply seen the router is just doing what I described above in the section “How do IP addresses and MAC addresses work together?”. The router will receive packets for its own MAC address but for a different IP address. He will then check if he can directly reach the target IP address. If so, he sends the packet to the target. Otherwise the router itself also has an upstream router configured and will send the packet to that router.
Of course you can have multiple routers configured. Your home router will only have one upstream router configured, but in the internet backbone the big routers have big routing tables so they know the best ways for all packets.
Other use cases for MAC addresses
Network switches store a list of MAC addresses seen at every port and only forward packets to the ports that need to see the packet.
Wireless access points often use MAC addresses for access control. They only allow access for known devices (MAC address is unique and identifies devices) with the correct passphrase.
DHCP servers use the MAC address to identify devices and give some devices fixed IP addresses.

The root difference is that MAC is assigned by the manmanufacturing time, while IP address are assigned at connection time.

MAC is necessary because it can be used to identify a device before connecting to the network; however because it is statically assigned, it is pretty much distributed randomly, so it is unsuitable for efficient routing over more than a single network (doing so would require every device on the planet to have a huge routing table to all other devices on the planet).