Sub topic 2
Universal vs Locally Administered MAC Addresses
Assume you know what an IP address and a LAN are, can read hexadecimal and binary, and can run terminal commands. This chapter focuses on how MAC addresses support delivery inside one local network.
Universal vs locally administered addresses
A MAC address is usually written as six hexadecimal octets, such as 02:00:5e:10:00:01. The first octet contains two important flags:
- The least significant bit is the individual/group bit.
0means a single interface;1means a group address. - The next bit is the universal/local bit.
0means the address was assigned by the manufacturer or standards authority.1means it was assigned locally by software or an administrator.
For a universally administered address, the first three octets usually identify the manufacturer through an OUI, or Organizationally Unique Identifier. The remaining octets identify the interface. A locally administered address can use a different value, so its OUI does not reliably identify a vendor.
How a MAC address is used in an Ethernet frame
An Ethernet II frame carries a destination MAC, a source MAC, a two-byte EtherType, and a payload. The destination tells the local link where to deliver the frame. The source tells receiving switches which interface sent it.
How switches learn and forward by MAC address
A switch maintains a MAC address table. When a frame arrives, it records the source MAC and incoming port. It then looks up the destination:
- Known destination: forward only through the matching port.
- Unknown destination: flood within the same VLAN.
- Broadcast or group destination: flood within the same VLAN.
Entries age out because devices can move or disconnect.
ARP: finding the MAC address for an IP address
ARP, the Address Resolution Protocol, maps an IPv4 address to a MAC address on the local subnet. If a host needs 192.0.2.20, it broadcasts an ARP request asking which device owns that IP. The owner sends an ARP reply, normally unicast. The requester stores the result in its neighbor cache and sends the Ethernet frame to that MAC.
Exercise
What does a switch learn from the source MAC of an arriving frame?
Show answer
It learns that the source MAC is reachable through the frame's incoming port.