2 Link-Layer Networking and Ethernet
Learn how physical and data-link functions support local network delivery, how Ethernet frames and MAC addresses work, and how switches and VLANs organize traffic.
Physical and data-link functions
Network communication divides work across layers. The sends bits as signals over a transmission medium, while the organizes bits into frames for delivery across one local link or LAN.
The physical-layer specification defines details such as signaling, connectors, and supported transmission rates. The medium may be copper cable, optical fiber, or a radio channel. At the , link-level addressing and frame-boundary handling support local delivery, and transmission errors are commonly detected.
A frame delivers data to the next link-layer destination; it does not by itself provide delivery across different IP networks. Communication between different IP networks requires a router, which forwards traffic between links.
and MAC addressing
is a widely used family of wired LAN technologies standardized by IEEE 802.3. data-link functions are described in IEEE 802.3, while IEEE 802.1 specifies bridging and VLAN behavior.
An interface uses a to identify a link-layer source or destination. A is typically written as six hexadecimal octets, for example 00:1A:2B:3C:4D:5E.
supports three destination patterns:
Unicast: a frame is directed to one destination.
Broadcast: a frame is directed to all devices in the local broadcast domain. The destination is commonly written
FF:FF:FF:FF:FF:FF.Multicast: a frame is directed to a group.
structure
An is the link-level container for data. It carries destination and source MAC addresses, a length/type field, payload and possibly padding, and a . The FCS lets the receiver check for certain transmission errors, but does not correct them.
The frame fields serve these purposes:
Destination : identifies the intended link-layer recipient.
Source : identifies the sending interface.
Length/type: indicates the payload length or, in common II frames, the payload protocol type.
Payload and padding: carries upper-layer data; padding may be added when needed to meet the minimum frame size.
: provides an error-detection check.
A basic MAC frame is conventionally described as 64 to 1518 bytes, counted from the destination address through the FCS. The preamble and start-frame delimiter are transmitted on the medium but are not included in that count. An IEEE 802.1Q VLAN tag adds four bytes, so a tagged frame may be 1522 bytes under this conventional count. Implementations may support larger frames as well.
For example, when a computer sends an IP packet in , it places the packet inside the frame’s payload and uses destination and source MAC addresses in the frame header. The and the IP packet it carries are distinct.
LAN switching and frame forwarding
A connects devices in a limited local area, such as a home, office, or campus network. Modern wired LANs commonly connect devices to an .
A learns which MAC addresses are reachable through which ports by examining the source address of incoming frames. It records those address-to-port associations in a forwarding table. When a frame arrives, it checks the destination :
If the destination is known, the forwards the frame toward the associated port.
If the destination is unknown, the generally floods the frame to other ports in the same VLAN, except the port on which it arrived.
Broadcast frames are forwarded within the same VLAN, but are not normally forwarded into other VLANs.
For example, when Computer A sends a frame to Computer B, the learns A’s and incoming port. If the already knows B’s port, it forwards the frame only there; otherwise, it floods the frame within the VLAN. When B replies, the learns B’s location, making later delivery more targeted.
Unlike a basic hub, which repeats incoming signals to its other ports, a makes forwarding decisions using frame addresses. Switched links commonly operate in full-duplex mode, allowing sending and receiving at the same time. Original shared-medium used to handle collisions; collision handling is generally not needed on modern full-duplex switched links.
VLANs and broadcast domains
A divides a switched physical network into separate logical LANs. Devices in different VLANs are in different broadcast domains even when they connect to the same physical . VLANs help organize network segments, but communication between them requires routing.
IEEE 802.1Q specifies VLAN-aware bridging and the use of VLAN tags to identify VLAN traffic on links that carry multiple VLANs.