Builder · Lesson 02

How do data-link protocols carry frames?

A frame needs both a medium and a protocol: shared rules define its boundaries, local addresses, access to the link, and integrity checks.

The local medium

A frame still needs somewhere to travel.

The link layer moves a frame across one local connection. A wired Ethernet link uses a cable and switch port; a Wi-Fi link uses radio, an access point, and shared wireless coordination.

The medium changes how the frame is carried, but it does not change the higher-level destination described by the packet inside.

One hop has one local delivery context.A switch or access point helps move the frame on the current link. The next router can replace that local wrapper for the next hop.

The link protocol

A protocol turns a medium into a shared set of rules.

A data-link protocol defines how a node recognises a frame, identifies local sender and receiver, shares the medium, and checks whether the frame arrived intact. It is the agreement that makes neighbouring interfaces interoperable.

Ethernet and Wi-Fi are common LAN protocols. PPP, HDLC, and the older SLIP are used on point-to-point or serial links. RS-232 defines an electrical and signalling interface for short serial connections, often between a host and a modem, console, or industrial device; it is an interface standard rather than a routed network protocol.

These link technologies do not replace IP: they carry an IP packet inside a link-specific frame or serial exchange for one hop.

Medium is the path; protocol is the agreement.The same packet can cross several links while each hop uses its own local framing rules.

Shared control bus

CAN lets controllers share messages without a central switch.

Controller Area Network (CAN) is a multi-master serial bus used widely in vehicles and industrial systems. Electronic control units place messages on a shared two-wire bus, and every node can observe the frame and decide whether the identifier is relevant.

CAN identifiers describe message priority and meaning rather than a destination address. When several nodes start together, the message with the dominant arbitration bits keeps transmitting; the others detect the result and defer without corrupting the winning frame. A numerically lower identifier therefore has higher priority.

01

Shared bus

Nodes connect to the same differential CAN_H and CAN_L pair, normally with termination resistors at both physical ends.

02

Arbitration

Non-destructive bitwise arbitration lets the highest-priority message continue while lower-priority nodes retry later.

03

Data frame

A frame carries an identifier, control information, a small data payload, a CRC, acknowledgement, and end-of-frame signaling.

04

CAN FD

CAN FD extends the payload and can change the bit rate during the data phase while preserving the bus arbitration model.

CAN is not Ethernet and it is not IP.CAN defines a local control-bus exchange. Higher-level profiles such as CANopen or J1939 assign meaning to messages; gateways can connect CAN systems to IP networks when needed.

Choose the direction

Simplex, half-duplex, and full-duplex describe who can transmit.

Simplex sends in one direction only. Half-duplex allows both sides to transmit, but they take turns. Full-duplex allows both sides to transmit at the same time. Duplex describes direction and simultaneity; it does not by itself determine the link rate.

Comparison of simplex one-way transmission, half-duplex alternating transmission, and full-duplex simultaneous transmission
01

Simplex

Useful when the receiver never needs to send back on the same channel, such as a broadcast or one-way sensor feed.

02

Half-duplex

Requires turn-taking on a shared medium. Older shared Ethernet and Wi-Fi coordination are common examples.

03

Full-duplex

Both directions operate concurrently, as on a modern switched Ethernet link with independent transmit and receive paths.

Duplex must agree at both ends.A half/full-duplex mismatch can cause collisions, retransmissions, and poor performance. Fiber links commonly use two fibers for separate directions, or two wavelengths on one fiber in a BiDi design.

Shared Ethernet

CSMA/CD coordinates older half-duplex Ethernet.

Carrier Sense Multiple Access with Collision Detection lets several devices share one medium. Each device first listens to the carrier. If the medium is idle, it transmits; if two devices transmit at nearly the same time, they detect the collision, stop, and wait for different random delays before trying again.

CSMA/CD cycle: listen to the carrier, transmit when idle, detect a collision, stop, wait with random backoff, and retry
01

Listen

Carrier sense checks whether another device is already transmitting.

02

Transmit

A device sends when the shared medium appears idle.

03

Detect

Devices detect a collision and abandon the damaged transmission.

04

Back off

Each device waits for a random interval before retrying, reducing repeated collisions.

CSMA/CD is mainly historical for Ethernet.Shared coaxial Ethernet and hubs needed collision detection. Modern switched Ethernet normally runs full-duplex on a dedicated link, so collisions and CSMA/CD are no longer part of ordinary frame transmission.

Build the model

Six data-link protocol families

01

Ethernet (802.3)

Frames wired LAN traffic and uses MAC addresses and an FCS.

02

Wi-Fi (802.11)

Frames wireless LAN traffic while coordinating access to shared radio.

03

CAN

Shares control messages on a multi-master bus with priority arbitration and CRC checks.

04

PPP

Encapsulates network-layer packets across a point-to-point link with negotiation and optional authentication.

05

HDLC

Uses framed serial communication for point-to-point and WAN links.

06

SLIP

Provides simple character-based framing for IP over a serial line; PPP largely replaced it.

PPP and historical protocols

Some link protocols authenticate peers; others belong to network history.

PPP can negotiate authentication before carrying network-layer packets. PAP sends a simple username and password exchange, while CHAP uses a challenge and response so the password is not sent directly over the link.

IPX and AppleTalk are older network protocol suites that once supported Novell NetWare and Apple networks. They are useful historical contrasts with the TCP/IP stack, which became the common interoperable foundation.

01

PAP

Simple PPP authentication with a direct credentials exchange; weak against observation.

02

CHAP

PPP challenge/response authentication that avoids sending the password directly.

03

IPX

Novell packet protocol suite, historically common in NetWare environments.

04

AppleTalk

Apple networking suite with protocols such as DDP and NBP, later replaced by TCP/IP.

Authentication and routing are different jobs.PAP and CHAP decide whether a peer may use a PPP link. IPX and AppleTalk describe network-layer families, not authentication methods.

Read an Ethernet name

The name carries the medium and the rate.

Ethernet names combine a nominal bit rate, the BASE baseband signaling family, and a medium suffix. In the examples below, the number is expressed in megabits per second; T means twisted-pair copper. The actual usable throughput is lower because of framing, contention, and protocol overhead.

01

10BASE5

10 Mb/s over thick coaxial cable, an early shared-medium Ethernet.

02

10BASE2

10 Mb/s over thin coaxial cable, also known as thinnet.

03

10BASE-T

10 Mb/s over twisted-pair copper in a star-wired topology.

04

100BASE-TX

100 Mb/s Fast Ethernet over twisted-pair copper.

05

1000BASE-T

1 Gb/s Gigabit Ethernet over twisted-pair copper.

06

10GBASE-T

10 Gb/s Ethernet over suitable twisted-pair copper cabling.

Do not read “2” as 2 Mb/s.In 10BASE2, the 10 is the 10 Mb/s rate; the 2 identifies the thin-coaxial physical medium and its segment convention.

Read a frame

IEEE 802 defines local frame families; Ethernet carries one of them.

A frame is the link-layer container for one local hop. Its exact fields depend on the IEEE 802 family, but the receiver needs local addresses, a way to identify or describe the payload, the data, and an integrity check.

Comparison of simplified Ethernet II, IEEE 802.3, 802.1Q VLAN, and IEEE 802.11 frame fields
01

Ethernet II

Preamble and SFD, destination MAC, source MAC, EtherType, payload, optional padding, then FCS.

02

IEEE 802.3

Uses the same basic Ethernet addressing and FCS pattern, but the field after the source MAC is a length value rather than an EtherType.

03

802.1Q VLAN

Inserts a four-byte VLAN tag between the source MAC and EtherType or length, carrying priority, drop eligibility, and VLAN identity.

04

IEEE 802.11

Wi-Fi frames use radio-specific control and management fields and can contain up to four MAC address fields, depending on the wireless path.

Ethernet II and IEEE 802.3 are related, not identical.Both carry data over Ethernet links, but EtherType identifies the payload protocol in Ethernet II, while the 802.3 length field is paired with an LLC or SNAP interpretation. The preamble and FCS belong to transmission and integrity, not to the IP packet inside.

IEEE 802.2 service fields

LLC and SNAP identify what an IEEE 802.3 payload carries.

When an IEEE 802.3 frame uses a length field, the payload can begin with LLC (Logical Link Control). DSAP identifies the destination service, SSAP identifies the source service, and the control field describes the LLC exchange. SNAP extends this identification with an organisation identifier (OUI) and a protocol identifier (PID).

Simplified IEEE 802.3 payload containing Length, LLC DSAP and SSAP, Control, SNAP OUI and PID, payload, and FCS
Ethernet II usually takes the shorter route.Ethernet II uses EtherType directly to identify the payload protocol. LLC and SNAP provide the identification path associated with the IEEE 802.3 length-based format and older or compatibility-oriented protocol stacks.

Mini experiment

Compare the link protocol

See what each protocol contributes to the current hop.

PROTOCOLEthernet
LOCAL CONTEXTMAC address + FCS
ROLEThe frame crosses a wired LAN and the FCS helps detect corruption.

Ethernet defines the frame rules for this wired local hop.

Knowledge check

Test your data-link model

Answer twenty-three questions. The answer order changes each time.

0 / 23