Data Link Layer - Framing and Switching
2024-11-28
Functions of the Data Link Layer
Devices:
Bridge, Switch, Modem
Protocols:
Ethernet, WLAN, Bluetooth, PPP
The Data Link Layer can be split into
A | \(\cdot\) — | M | — — | Y | — \(\cdot\) — — |
B | — \(\cdot\) \(\cdot\) \(\cdot\) | N | — \(\cdot\) | Z | — — \(\cdot\) \(\cdot\) |
C | — \(\cdot\) — \(\cdot\) | O | — — — | 1 | \(\cdot\) — — — — |
D | — \(\cdot\) \(\cdot\) | P | \(\cdot\) — — \(\cdot\) | 2 | \(\cdot\) \(\cdot\) — — — |
E | \(\cdot\) | Q | — — \(\cdot\) — | 3 | \(\cdot\) \(\cdot\) \(\cdot\) — — |
F | \(\cdot\) \(\cdot\) — \(\cdot\) | R | \(\cdot\) — \(\cdot\) | 4 | \(\cdot\) \(\cdot\) \(\cdot\) \(\cdot\) — |
G | — — \(\cdot\) | S | \(\cdot\) \(\cdot\) \(\cdot\) | 5 | \(\cdot\) \(\cdot\) \(\cdot\) \(\cdot\) \(\cdot\) |
H | \(\cdot\) \(\cdot\) \(\cdot\) \(\cdot\) | T | — | 6 | — \(\cdot\) \(\cdot\) \(\cdot\) \(\cdot\) |
I | \(\cdot\) \(\cdot\) | U | \(\cdot\) \(\cdot\) — | 7 | — — \(\cdot\) \(\cdot\) \(\cdot\) |
J | \(\cdot\) — — — | V | \(\cdot\) \(\cdot\) \(\cdot\) — | 8 | — — — \(\cdot\) \(\cdot\) |
K | — \(\cdot\) — | W | \(\cdot\) — — | 9 | — — — — \(\cdot\) |
L | \(\cdot\) — \(\cdot\) \(\cdot\) | X | — \(\cdot\) \(\cdot\) — | 0 | — — — — — |
Morse Code Used for telegraph systems
Problem
The sender meant:
— \(\cdot\) \(\cdot\) — — —
\(\rightarrow\) DO
The receiver understood:
\(\cdot\) \(\cdot\) — —
\(\rightarrow\) EAT
How does the receiver know when a new PDU starts?
Count
contains the number of bytes payload inside the frameCount
is modified during transmission, the receiver is unable to correctly detect the end of the frameThe method is called Byte Stuffing or Character Stuffing, because the…
Drawback:
Strong relationship with the character encoding (e.g., ASCII)
SYN
SOH
(Start of Header)STX
(Start of text) and ETX
(End of Text)ETX
character, it it must be escaped by a stuffed DLE
(Data Link Escape)DLE
character is represented in the payload by sequence DLE
DLE
01111110
The second last byte (ending delimiter) of a Token Ring frame contains the same 4 line code violations as the starting delimiter
Preamble is a 7 bytes long bit sequence 101010 ... 1010
SFD
(1 byte) with the bit sequence 10101011
Type
contains the information what protocol is used in the network layer
Type
has value 0x0800
Type
has value 0x86DD
Type
has value 0x0806
Pad
field can be used to increase the frame length to the minimum frame size (72 bytes)
Frame format for IEEE 802.11b
Possible use of the address fields:
The field Sequence Control (2 bytes) consists of a fragment number (4 bits) and a sequence number (12 bits)
The final field contains a CRC checksum (32 bits) that covers all fields, except the payload
IEEE 802.1X is a standard for port-based link access control. In WLAN networks like for instances eduroam the Extensible Authentication Protocol (EAP) is used.
The human-friendly representation is typically given in hexadecimal notation with dashes (-
) or colons (:
) as separators
Example: 00-16-41-52-DF-D7
EUI-48 and EUI-64 MAC addresses can be formed according to the numbering spaces based on Extended Unique Identifiers (EUI) managed by the IEEE:
EUI-48 (e.g., Ethernet, WLAN, Bluetooth) and EUI-64 (Firewire, 6LoWPAN, Zigbee)
1
FF-FF-FF-FF-FF-FF
MAC addresses | Manufacturer | MAC addresses | Manufacturer | ||
---|---|---|---|---|---|
00-20-AF-xx-xx-xx |
3COM | 00-0C-6E-xx-xx-xx |
Asus | ||
00-00-0C-xx-xx-xx |
Cisco | 08-00-2B-xx-xx-xx |
DEC | ||
00-01-E6-xx-xx-xx |
Hewlett-Packard | 00-02-B3-xx-xx-xx |
Intel | ||
00-04-5A-xx-xx-xx |
Linksys | 00-04-E2-xx-xx-xx |
SMC | ||
00-03-93-xx-xx-xx |
Apple | 00-50-8B-xx-xx-xx |
Compaq | ||
00-02-55-xx-xx-xx |
IBM | 00-09-5B-xx-xx-xx |
Netgear |
Working with MAC addresses under Linux
Read out the own MAC address(es): ip link
or ifconfig
Read out the MAC address(es) of the neighbors (mostly the Routers): ip neigh
Set MAC address: ip link set dev <Interface> address <MAC Address>
Virtual Bridges Bridges can be virtualized in software (e.g., to connect virtual machines)
Interesting build instructions for your own laser bridge
How does the bridge know which host is connected to which port?
Device | Port |
---|---|
A | 1 |
B | 1 |
C | 1 |
X | 2 |
Y | 2 |
Z | 2 |
Loops are a potential issue on the Data Link Layer:
Similar examples can be found here:
Source: Peterson, Davie. Computernetze
The STP was developed in the 1980s by Radia Perlman at Digital Equipment Corporation (DEC)
The protocol and format of the configuration messages are described in detail in the standard IEEE 802.1D
Bridge ID according to IEEE
Cisco extension of the bridge ID, introducing the Extended System ID
0000
= 0, 0001
= 4,096 … 1110
= 57,344, 1111
= 61,440The path costs have been standardized by the IEEE, but can be adjusted manually
Data rate | Path costs |
---|---|
10.000 Mbps | 2 |
1.000 Mbps | 4 |
100 Mbps | 19 |
16 Mbps | 62 |
10 Mbps | 100 |
4 Mbps | 250 |
You should now be able to answer the following questions:
Computer Networks - Data Link Layer - Framing and Switching - WS 24/25