LOGBOOK

HELP

1 / 14
Other keys: showSpace: good1-4: rate0: skip5: flag

Question

What are the two types of addresses used when sending data on an Ethernet LAN, and what is each used for?

Answer

A Layer 2 MAC (physical) address delivers the frame NIC-to-NIC on the same network; a Layer 3 IP (logical) address carries the packet end-to-end from source device to final destination.

Two primary addresses on an Ethernet LAN:

Address Type Layer Purpose
Layer 2 Physical Address (MAC) Data Link Used for NIC-to-NIC communications on the same Ethernet network
Layer 3 Logical Address (IP) Network Used to send the packet from source device to destination device

Key insight: Layer 2 addresses deliver frames locally; Layer 3 addresses enable end-to-end packet delivery across networks.

Context: When sending data, both addresses are needed - the IP address identifies the final destination, while the MAC address identifies the next hop on the local network segment.

Go deeper:

  • doc Address Resolution Protocol (ARP) — PracticalNetworking on why Layer 3 IP (end-to-end) and Layer 2 MAC (hop-to-hop) addressing are two distinct schemes that must be bridged.

  • doc MAC address — what a Layer 2 physical address actually is: a 48-bit NIC identifier, flat and only meaningful on the local segment.

The structure of a 48-bit MAC address. b0 (the least significant bit) of the most significant octet distinguishes multicast and unicast addressing, and b1 of the same octet distinguishes universal and locally administered addressing.
The structure of a 48-bit MAC address. b0 (the least significant bit) of the most significant octet distinguishes multicast and unicast addressing, and b1 of the same octet distinguishes universal and locally administered addressing.
Inductiveload, modified/corrected by Kju · CC BY-SA 2.5 · Wikimedia Commons
or press any other key

Question

Why does a frame need both a MAC address and an IP address instead of just one?

Answer

The IP address identifies the final destination end-to-end, but a frame can only be delivered hop-by-hop using the MAC address of the next NIC on the local link; neither alone can move the packet across networks.

Why a frame needs both an IP address and a MAC address

* IP answers "where is the final destination?" end-to-end; MAC answers "who do I hand this to next?" on the link. ARP/ND links the two so the frame can cross networks. *

Each address solves a different delivery problem:

Address Scope What it answers
IP (Layer 3) End-to-end, across networks Where is the final destination?
MAC (Layer 2) Single link / local network Who is the next NIC to hand this to?

How they work together:

  • The IP packet (with unchanging source/destination IP) is encapsulated in a new Ethernet frame on every link.
  • The MAC addresses are rewritten at each hop to point to the next device, while the IP addresses stay the same all the way to the destination.

Why it matters: MAC addresses are flat and only meaningful on the local network, so they cannot route between networks; IP addresses are hierarchical and routable but cannot by themselves deliver a frame to a specific NIC. Address resolution (ARP / ND) is what links the two.

Go deeper:

  • doc Address Resolution Protocol (ARP) — PracticalNetworking explains the union of end-to-end IP delivery and hop-to-hop MAC delivery, and why ARP is the glue.

  • doc Address Resolution Protocol — Wikipedia: ARP maps an internet-layer IPv4 address to a link-layer MAC so a host can actually frame and send the packet locally.

A successful ARP spoofing attack allows an attacker to perform a man-in-the-middle attack.
A successful ARP spoofing attack allows an attacker to perform a man-in-the-middle attack.
0x55534C · CC BY-SA 3.0 · Wikimedia Commons
or press any other key