06 Datalink PDF
06 Datalink PDF
06 Datalink PDF
Analog Signal
Lecture 6
Datalink – Framing, Switching “Digital” Signal
David Andersen
Bit Stream 0 0 1 0 1 1 1 0 0 0 1
Department of Computer Science
Carnegie Mellon University 0100010101011100101010101011101110000001111010101110101010101101011010111001
Packets
(perpetrated by Dave Eckhardt) Header/Body Header/Body Header/Body
5 6
1
Example: Ethernet Framing SONET
7 8
9 10
Sender and receiver are always synchronized. Base channel is STS-1 (Synchronous Transport System).
» Frame boundaries are recognized based on the clock » Takes 125 µsec and corresponds to 51.84 Mbps
» No need to continuously look for special bit sequences » 1 byte/frame corresponds to a 64 Kbs channel (voice)
» Transmitted on an OC-1 optical carrier (fiber link)
SONET frames contain room for control and data.
» Data frame multiplexes bytes from many users Standard ways of supporting slower and faster channels.
» Control provides information on data, management, … » Support both old standards and future (higher) data rates
Actual payload frame “floats” in the synchronous frame.
» Clocks on individual links do not have to be synchronized
3 cols 3 cols 87 cols payload capacity,
transport 87 cols payload capacity transport including 1 col path overhead
overhead overhead
9 rows 9 rows
11 12
2
How Do We Support How Do We Support
Lower Rates? Higher Rates?
125 µsec
125 µsec
Kbit/second channel. The properties of a channel
» 1 voice call. using a single byte/ST-1
Higher bandwidth channels frame are maintained!
hold more bytes per frame. » Constant 64 Kbit/second rate
125 µsec
» Nice spacing of the byte samples
125 µsec
» Multiples of 64 Kbit/second
Channels have a “telecom” Rates typically go up by a
flavor. factor of 4.
» Fixed bandwidth Two ways of doing
interleaving.
125 µsec
125 µsec
» Just data – no headers
» SONET multiplexers remember » Frame interleaving
how bytes on one link should be » Column interleaving
mapped to bytes on the next link
– concatenated version, i.e.
– Byte 33 on incoming link 1 is OC-3c
byte 97 on outgoing link 7
13 14
15 16
OC3/12 OC3/12
OC3/12 Access CO CO Access
OC-48
Access CO OC12/48
mux mux OC12/48 Metro
Metro CO
POP
CO
POP WDM Backbone OC3/12
OC48/192 Access
OC3/12
Access
DS1 POP
mux mux
OC-3c OC3/12 OC12/48 OC3/12
CO CO
OC-12c
Access Metro Access
17 18
3
Basic Concept:
Error Coding Hamming Distance
19 20
A (4,3) parity code has D=2: Commonly used codes that have good error
0001 0010 0100 0111 1000 1011 1101 1110 detection properties.
(last bit is binary sum of previous 3, inverted - “odd parity”) » Can catch many error combinations with a small number or
redundant bits
A (7,4) code with D=3 (2ED, 1EC):
0000000 0001101 0010111 0011010
Based on division of polynomials.
0100011 0101110 0110100 0111001 » Errors can be viewed as adding terms to the polynomial
1000110 1001011 1010001 1011100 » Should be unlikely that the division will still work
1100101 1101000 1110010 1111111 Can be implemented very efficiently in
1001111 corrects to 1001011 hardware.
Note the inherent risk in correction; consider Examples:
a 2-bit error resulting in 1001011 -> 1111011. » CRC-32: Ethernet
» CRC-8, CRC-10, CRC-32: ATM
There are formulas to calculate the number of
extra bits that are needed for a certain D.
21 22
23 24
4
A Switch-based Network Switching Introduction
25 26
Host
7 7 7 7
ATM IP/SONET 6 6 6 6
Host 5 5 5 5
4 network 4 4
... 4
3 3 3 3 3 3 3
Host Ethernet Host 802.X Host 2 2 2 2 2 2 2 2
Host 1 1 1 1 1 1 1 1
router gateway
Host Host
27 28
Packet Forwarding:
Switch Architecture Address Lookup
Switch
Takes in packets in one
interface and has to forward Control
them to an output interface Processor
based on the address.
Input Output
» A big intersection Port Port
» Same idea for bridges, switches,
routers: address look up differs Output Input
Port Port
Control processor manages Switch
the switch and executes Fabric Address Next Hop Info
higher level protocols. Output Output Address from header.
» E.g. routing, management, ..
Port Port B31123812508 3 13
» Absolute address (e.g. Ethernet)
Input Input 3 - » (IP address for routers)
The switch fabric directs the Port Port
38913C3C2137
5
Link Flow Control and
Error Control A Naïve Protocol
31 32
Stop and wait flow control: sender waits to send the Stop and wait flow control results in poor throughput
next packet until the previous packet has been for long-delay paths: packet size/ roundtrip-time.
acknowledged by the receiver. Solution: receiver provides sender with a window that
» Receiver can pace the receiver it can fill with packets.
» The window is backed up by buffer space on receiver
Drawbacks: adds overheads, slowdown for long links.
» Receiver acknowledges the a packet every time a packet is
consumed and a buffer is freed
33 34
Window Size
Max Throughput = Sender Receiver
Roundtrip Time
35 36
6
What is Used in Practice? Datalink Layer Architectures
37 38
39 40
41