You are on page 1of 35

Arhitecturi si Protocoale

de Comunicatii (APC)

Data transmission, multiplexing and


switching (overview)

Data transmission
Tx Data
10110 NIC

NIC = Network
Interface Card

Tx Signal

Rx Signal

Rx Data
10110
NIC

Transmission
medium

Data is transmitted encoded in the parameters of an


electromagnetic wave (signal) that propagates from the
transmitter to the receiver on the transmission medium.

Data encoding and signal transmission: bit string signal.

Signal propagation through the transmission medium.

Signal reception and data decoding: signal bit string.

Octavian Catrina

Data and signals

A simple data encoding (baseband transmission)


A bit string can be encoded as a digital signal with 2 levels.
t
TxC 0 1 0 1 1 0

0 1

Tb

t
RxC 0 1 0 1 1 0

0 1

Tb

Encoding: data signal


0101100

Tx

Decoding: signal data


Rx

0101100

TxC
RxC
RxC must be synchronized with TxC
Tx: Transmitter
TxC: Transmitter clock

Rx: Receiver
RxC: Receiver Clock

Try to imagine a data encoding with more levels, based on the same
principle. Example: 4 signal levels, 2 bits/level.

Octavian Catrina

Modulation techniques
Data

Baseband
transmission

(truncated signal
bandwidth)
f

Carrier
signal

Amplitude
modulation

(ASK = Amplitude
Shift Keying)

2nd Carrier
signal
Frequency
modulation
(FSK = Frequency
Shift Keying)

Phase
modulation
(PSK = Phase
Shift Keying)

f
t
f
t
f

Try to imagine a data encoding with more levels, based on these techniques.
E.g., 4 phase values, or combined amplitude and phase modulation.

Octavian Catrina

Data transmission rate

Bit rate
1 bit in Tb seconds
Bit rate: Rb= 1/Tb bit/s.
Example: Tb = 1s Rb = 1 Mbit/s.

t
0 1 0 1 1 0 0 1
Tb

Packet transmission duration


Packet with N bits transmitted at rate Rb
Packet transmission duration: Tp = NTb= N/Rb seconds.
Example: N = 1Kbit, Rb = 1 Mbit/s Tp = 1ms.

Packet rate
Packets with N bits transmitted at rate Rb
Packet rate: Rp = 1/Tp = Rb/N packet/s.
Example: N = 1Kbit, Rb = 1 Mbit/s Rp = 1000 packet/s.

Octavian Catrina

Propagation delay

Time to travel from transmitter to receiver

Signals travel with finite speed.


Speed depends on medium (and slightly of signal frequency):
vacuum: c = 3108 m/s; conductor cable: c = 2.3108 m/s, etc.
Distance d, speed c Td = d/c seconds.
Example: d = 100 Km, c = 2108 m/s Td = 50 s

t0
01011

Tx

t0+Td
Propagation delay Td= d/c
Distance d

Rx

t
01011

Tx: transmitter
Rx: receiver

Total packet transfer duration on a link: T = Tp + Td = N/Rb + d/c


(the packet transmission duration plus the propagation delay)

Octavian Catrina

Packet transfer - Example 1


Packet transfer, point-to-point link. Data and acknowledgement.
Stop and go error control: single unacknowledged data packet.
Distance D (cable length)

Send 1
DATA 1
Transfer
T = Tp+Td

Transmission
Tp = L/R
Propagation
Td = D/V

Receive 1
ACK 1

Send 2

DATA 2
R = Data rate (bits/sec)
L = Packet length (bits)
D = Distance
V = Signal propagation
speed

Octavian Catrina

Receive 2
ACK 2

Packet transfer - Example 2


Packet transfer, point-to-point link. Data and acknowledgements.
Efficient error control: multiple unacknowledged data packets.
Distance D (cable length)

A
Send1-4

B
DATA 1
DATA 2

How much time


it takes to deliver
4 data packets?
Compare with
example 1.

Receive1

DATA 3
ACK 1
DATA 4

Receive2

ACK 2
Receive3
ACK 3
Receive4
ACK 3

Octavian Catrina

Synchronization

Bit synchronization

When does a bit (cell) start/end in the received signal?

Physical layer function: Maintain synchronization of


transmitter and receiver clocks.
Short distance: Share a common clock generator (e.g., within
a computer or between a computer and nearby peripherals).
Large distance (networking): Include timing information in the
transmitted signal, using appropriate encoding (next slide).

Frame synchronization

When does a frame start/end in the received bit string?

Typically a Data link layer function: Define a frame format that


allows the receiver to detect start/end of frame.

Octavian Catrina

Bit synchronization

Principle

Receiver electronics use the transitions in the data signal to


adjust the local clock such that it remains synchronized with
the transmitter clock.
How to make sure there are enough transitions, even for long
sequences of 1s or 0s? Use a suitable data encoding:
Example: Manchester encoding
NRZ encoding
(Non-Return
to Zero)

Manchester
encoding

Clock
bit 0 = low-to-high signal transition.
bit 1 = high-to-low signal transition.
Octavian Catrina

bit 0 = code bits 01.


bit 1 = code bits 10.
10

Attenuation and distortion

Medium changes the signal during propagation

Attenuation: reduction of signal strength.


Distortion, dispersion: change of signal shape.
Attenuation depends on medium properties, distance and
signal frequency. Signal shape is changed by the different
attenuation and propagation delay of the signal's components.
Effects of attenuation,
distortion, dispersion

t0
0101
1

Distance d

Tx

t0+Td
Rx

???

Tx: transmitter
Rx: receiver

Medium bandwidth (analog)

Range of signal frequencies that the medium can transmit.


(Signal components with frequency outside medium bandwidth are
practically completely attenuated.)

Octavian Catrina

11

Noise and other harmful signals

Our signal is not alone in the medium ...

EMI/RFI noise

Electromagnetic Interference, Radio Frequency Interference.


Electromagnetic waves emitted by power lines, engines, radio
transmitters, etc.

Crosstalk signal

Various "noise" signals overlap with the transmitted signal.

Induced by radiation of nearby transmission media.

Reflection signal

Caused by discontinuities of the medium.


Rx

Tx
Crosstalk

01011

Rx

Tx

???

EMI/RFI
Octavian Catrina

12

Data transmission errors


t
TxC 0 1 0 1 1 0

t
RxC 0 1 0 1 1 0

0 1

Tb Encoding: datasignal
0101100

Tx

Tb Decoding: signaldata

Signal attenuation, distortion,


noise

Decoding errors

The receiver can fail


to decode the data
correctly if the signal
shape is too much
altered or the clocks
are not synchronized
well enough.

Octavian Catrina

0101100

Rx

TxC
Rx clock synchronized with Tx clock

0 1

RxC

Tx
TxC 0

t
1

Rx
RxC

t
0

1 1 0
Errors !

1
13

Theoretical limits

Maximum data rate (capacity) of noiseless medium

Limited by medium bandwidth and number of encoding levels.

Nyquist's theorem: C = 2W log2M [bit/s]


where: W = medium bandwidth, M = signal encoding levels ( 2).
Example: Analog telephone connection:
W = 3000 Hz, M = 2 C = 6000 bit/s.

Maximum data rate (capacity) of noisy medium

Limited by medium bandwidth and noise (regardless of the


number of encoding levels).

Shannon's theorem: C = W log2(1+S/N) [bit/s]


where: W = medium bandwidth, S/N = signal/noise ratio.
Example: W = 3000 Hz, SNR = 30 dB C = 29900 bit/s.
where: SNR = 10 log10(S/N) [dB].
Octavian Catrina

14

Data networks

Challenges

Scalability: Large number of computers, any distance.


Efficiency: Cost effective interconnection.

Solutions

Efficient resource sharing techniques: multiplexing and


switching. Wide variety of technologies.

Many data streams share


each data link:
Multiplexing/demultiplexing

Octavian Catrina

Interconnection devices
forward data on the links
towards the destination:
Switching and routing

15

Multiplexing
Using the same transmission medium for
multiple simultaneous communications

...

Multiplexed
link

TDM: Time Division


Multiplexing

FDM: Frequency Division


Multiplexing

Each source is given certain time


intervals during which it can use
all the bandwidth.
Multiple sources send at different
points in time on the same
frequency bandwidth.

Each source is given its own


frequency band and can use it
permanently.
Multiple sources send on
different frequency bands at the
same time.

Bandwidth (Hz)

Time
123456 123456 123456 123456

...

6
5
4
3
2
1

Bandwidth (Hz)

Time

Other techniques (wireless networks): CDM (Code Division


Multiplexing). SDM (Space Division Multiplexing). Etc.

Octavian Catrina

16

Frequency Division Multiplexing


R/3 bits/s
R/3 bits/s

R bits/s

FDM
mux

FDM
demux

R/3 bits/s

Shift signal from each


source in frequency
domain by modulation.

frequency

(signal bandwidth)

frequency (medium bandwidth)

FDM enables wireless (radio-wave) communications (analog/digital) and


the multiplexing of analog signals (e.g. TV broadcast, wireless/wired).
FDM is also used for digital transmissions, often in conjunction with TDM
or CDM, e.g., for wireless digital communications.
WDM (Wavelength Division Multiplexing) uses different light wavelengths
(light colors) to create multiple channels on optical fiber. WDM is FDM
applied to light waves.

Octavian Catrina

17

Time Division Multiplexing

Synchronous TDM
Fixed bandwidth allocation. Good for constant bit-rate streams.
Inefficient for variable bit-rate, bursty streams. Simple, cost effective.
Fixed size slot. Fixed cycle: N slots (3)
R1 R/3 bits/s

R2 R/3 bits/s
R3 R/3 bits/s

R bits/s

One slot for each source


per cycle: blue, red, green;
Multiplexer
empty slot if no data.

Demultiplexer

Asynchronous (statistical) TDM


On demand bandwidth allocation. Much more efficient for variable
bit-rate, bursty streams. Various solutions.
Variable slot (or fixed). Variable cycle.
R1 bits/s
R2 bits/s

R bits/s

R3 bits/s
R1+R2+R3 R
Octavian Catrina

E.g.: First In
First Served

Header

Data
18

TDM example (historical)

E1 multiplex (ITU-T standard)


Originally designed to multiplex 64 Kbps
digital voice channels.
Also used for WAN data links (2 Mbps
digital channel or a fraction of it).
E1 frame: 125 s; 32 time slots; 8 bits/slot
31 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 0
Frame synchronization

Signaling channel

32 channels 64 Kbps (8bit/125s). Total bit rate: 2.048 Mbps (3264Kbps).

This is a simple example. Actually, we need flexible techniques


able to multiplex a much larger number of data streams or/and
data streams with much higher bit-rates.
We need a digital hierarchy.
E.g., multiplex 4 E1 streams in a 8 Mbps stream, and so on.

Octavian Catrina

19

TDM: Digital hierarchies (I)

Plesiochronous Digital Hierarchy (PDH)

Developed in 1960s-1970s. The digital signals are generated from


independent reference clocks, with (inherent) slight differences. So
they are "almost" synchronous, i.e., plesyochronous. The differences
accumulate and must be compensated by the multiplexing technique.
Disadvantage: Needs complex multi-stage multiplexers/demultiplexers.
A low level stream cannot be easily extracted from a higher level
stream (complete demultiplexing followed by re-multiplexing!).
E0

E1

E2

E2
E3

64Kbps

2Mbps

8Mbps

ITU-T: Europe, etc.

E0

E3

32Mbps

32Mbps

8Mbps

2Mbps

64Kbps

ANSI: North America, etc.

Signal Bit-rate
Channels
Signal Bit-rate
E0
64 Kbps 1 E0
DS0
64 Kbps
E1
2.048 Mbps 32 E0
DS1 (T1) 1.54 Mbps
E2
8.45 Mbps 4 E1 (128 E0) DS2 (T2) 6.3 Mbps
E3
34 Mbps 4 E2 (16 E1) DS3 (T3) 44.8 Mbps
E4
140 Mbps 4 E3 (64 E1)
Octavian Catrina

E1

Channels
1 DS0
24 DS0
4 DS1 (96 DS0)
7 DS2 (28 DS1)
-

Obsolete
E1/E3, T1/T3 still used.

20

TDM: Digital hierarchies (II)

Synchronous Digital Hierarchy

Developed at the end of 1980s. Widely deployed in 1990s. The digital


signals are generated from a common and extremely accurate reference
clock (e.g., cesium atomic clock).
SONET: Synchronous Optical Network (ANSI standard).
SDH: Synchronous Digital Hierarchy (ITU-T standard, similar).

Features

Lower level streams can be easily added to or dropped from a higher


level stream with a single stage multiplexer/demultiplexer (ADM).
High reliability (automatic path reconfiguration in case of faults) and
comprehensive means to control the network (enable/disable circuits),
and monitor network operation and performance, etc.
ADM - Add/Drop Multiplexer
ADM

STS-n link

ADM

STS-n

Add/Drop lower level streams


(DS-m, STS-k, k<n)
Octavian Catrina

SONET (ANSI)
Bit-rate
STS-1, OC-1
51.84 Mbps ( 50 Mbps)
STS-3, OC-3
155.52 Mbps ( 150 Mbps)
STS-12, OC-12
622.08 Mbps ( 600 Mbps)
STS-24, OC-24
1244.16 Mbps ( 1.25 Gbps)
STS-48, OC-48
2488.32 Mbps ( 2.5 Gbps)
STS-192, OC-192 9953.28 Mbps ( 10 Gbps)

SDH (ITU-T)
STM-1
STM-4
STM-16
STM-64
21

Circuit switching

Circuits

Fixed capacity communication channels.


Phases: circuit setup, communication, circuit release.

Circuit switches
Switch tiny, fixed-size data units between time slots on
synchronous TDM links, using mapping stored at circuit setup.

A
B

Synchronous TDM
multiplexors
S1
S2
S3

C
D

Synchronous TDM
demultiplexors
E
F
G
H

Guaranteed bandwidth. Low, constant transfer delay.


Ideal for real-time, constant bit-rate traffic (audio, video).
Inefficient for variable bit-rate traffic.
Examples: telephone network, ISDN, SONET/SDH.

Octavian Catrina

22

SONET/SDH networks
OC-n
DCC

ADM

OC-n

DCC
TM

Hub

TM

OC-N

ADM

TM

OC-n ADM

OC-n

Survivable SONET ring

TM
ADM

OC-n

OC-n
DCC

OC-n
DS--n

TM

DS-n
STS-n
(ATM,
IP)

TM - Terminal Multiplexer.
ADM - Add/Drop Multiplexer.
DCS - Digital Cross-Connect.

SONET & SDH allow the creation of high speed circuit-switched


networks, that can provide an arbitrary mesh of high-capacity
digital circuits (STS-n, DS-n).
Used to interconnect switches in the core (backbone) of PSTN
and packet switched networks.
Typical topologies: Ring (dual, survivable). With hub (star)
extensions.
Octavian Catrina

23

Packet switching

Packets
Encapsulated data units with routing information in header.

Packet switches
Switch variable-size packets between asynchronous TDM links
based on information in the header and forwarding tables.

Dynamic bandwidth allocation. Variable transfer delay. More


efficient for variable bit-rate traffic.

Octavian Catrina

24

Packet switching: connection-oriented

Virtual circuit (VC)

Logical path set up between network nodes across a packetswitched network. Identified on each link by a VC identifier (VCI).
Phases: VC setup, communication, VC release.

Switching table
Indicates how to forward packets
on VCs: maps VCI on each input
link to output link and next VCI.

QoS support
Ordered packet delivery.
Can guarantee QoS by
reserving resources on VC
(bandwidth, delay).

Examples: MPLS, Frame


Relay, ATM, X.25 (obsolete).

Octavian Catrina

S2

S6
1
3

S3

43

2
16

24

2
1

S1
VCI

data

4
2
S5 19

S4

Switching tables
Packet switch 1

Packet switch 3

Packet switch 5

Input
Output
Link VCI Link VCI
2 16 3 24
... ... ... ...

Input
Output
Link VCI Link VCI
1 24 2 43
... ... ... ...

Input
Output
Link VCI Link VCI
3 43 2 19
... ... ... ...

25

Packet switching: connectionless

Datagrams
Standalone packets, forwarded independently of each other,
based on source and destination addresses in the header.

Routing table
Gives next hop on the path
to each known destination.

Best effort service


Packet delivery and ordered
delivery not guaranteed.
Can add some QoS support
(traffic classes, priorities, and
resources allocated per class).

R2

Examples: Internet Protocol


(IP), Novell IPX (obsolete).

Octavian Catrina

yx

R1
x

yx

R3

R4

yx

DA,SA

yx
yx

R6
y

yx

data

Routing tables
Router R1
DA
y
...

R5

Next hop
R3, R4
...

Router R3
DA
y
...

Next hop
R6
...

Router R6
DA
y
...

Next hop
...

26

Packet transfer - Example 3


Packet transfer. Store and forward packet switching. Data and acknowledgement.
Distance D

Distance D

DATA

Send

Distance D

This example assumes


that the packet queues in
all the switches are empty
(no queuing delay ).
DATA

How much time


it takes to deliver a
data packet?

How much is the transfer


delay if the packet queues
are not empty?

DATA

Compare with
example 1.

Receive

ACK

Receive

ACK
ACK

Octavian Catrina

27

Packet transfer - Example 4


Packet transfer. Cut-through switching. Data and acknowledgement.
Distance D

Distance D

DATA

Send

DATA

Distance D

What happens if the


packet queues in the
switches are not empty?

DATA

How much time


it takes to deliver
a data packet?

Receive

ACK

Compare with
example 3.

Receive

ACK
ACK

Octavian Catrina

28

Example (historical): Frame Relay (I)


Data Link
Physical

Frame Relay
switch

Frame Relay
WAN
DLCI=4

DLCI=1

DLCI=9

DLCI=4

Frames
DLCI=2
DLCI=1

DLCI=5

DLCI=7

DLCI=3

Layer-2 connection-oriented packet


switching.
Link bandwidth: up to 45 Mbps.

Light-weight packet-switching, connection-oriented

Layer 2 packet (frame) switching. Successor of X.25.


Developed after 1988 in the framework of ISDN (ITU-T).

Frame Relay virtual circuits (VC)

Called Data Link Connections (DLC).


Distinguished by DLC identifiers (DLCI).
DLCI have local (link) or global (network) significance.

Octavian Catrina

29

Frame Relay (II)


Input
Port DLCI
1
9
1
5
2
7

Output
Port DLCI
4
8
4
6
3
11

Input
Port DLCI
1
8
1
6

Output
Port DLCI
4
12
4
5

12

7
6
Input
Port DLCI
2
6

Output
Port DLCI
3
9

Input
Port DLCI
1
9

Output
Port DLCI
2
9

Return paths not shown 9


in the switching tables!

Octavian Catrina

30

Example: ATM

ATM: Asynchronous Transfer Mode

First universal digital carrier: voice, video, data.


Foundation of Broadband Integrated Services
Digital Network (B-ISDN): first attempt to unify
data, telephone, and video/audio networks.
Widely deployed in the 1990s, being phased out.

Video
/Audio

Voice Data
PBX

Cell switching: convergence of technologies

As in circuit switching, ATM is connection-oriented


and uses small, fixed-size data units (known as cells).
However, ATM uses asynchronous TDM and packet
switching on virtual circuits.
Small, fixed-size cell reduces the end-to-end delay
and jitter (required by telephony) and simplifies the
design and implementation of high-speed switches.
Asynchronous TDM improves the efficiency for a
broad range of QoS requirements (see next slide).
Octavian Catrina

Cells:
5 octets
header,
48 octets
payload.

31

ATM service categories (ATM Forum)


Service category

Description

AAL

CBR
(Constant Bit Rate)

Fixed data rate, low delay and delay variation


specified in service contract and guaranteed.
Non-compressed real-time video, audio (teleconferencing, telephony, video-on-demand).

VBR-RT (real-time
Variable Bit Rate)

Variable data rate, low delay and delay variation


specified in service contract and guaranteed.
Type 2
Compressed real-time video, audio.

VBR-NRT
(non real-time VBR)

Similar with VBR-RT, but delay constraints not


guaranteed. Other real-time applications.

UBR
Best effort service. No traffic and QoS
(Unspecified Bit Rate) commitment. E-mail, ftp.
ABR
(Available Bit Rate)

Octavian Catrina

Type 1

Type 2
Type 3/4

Variable data rate specified in service contract,


minimum rate guaranteed, higher rate provided Type 5
whenever resources are available. Bursty traffic.

32

Example: MPLS

MPLS: Multiprotocol Label Switching

Connection-oriented technology for IP backbone networks.


Multiprotocol: usable with various underlying link technologies
and payloads.
Defined by the IETF, widely accepted and deployed by ISPs.

Motivation: addresses major Internet challenges

Heterogeneous network infrastructure.


Scalability (traffic and network growth).
Efficient resource management (traffic engineering).
Support for new value added services (VPN, QoS).

Original idea (late 1990s): Try to (better) reconcile the


main approaches to data networking

Datagram-oriented (IP).
Connection-oriented (FR, ATM) - virtual circuits (VC).
Octavian Catrina

33

IP packet forwarding without MPLS


R1: Routing table
Destination Out IF
NH
10.4.3.0/24
i2
R2
10.5.0.0/16
i2
R2

i1

i2

i2

R1
DA=10.5.1.1

R2: Routing table


Destination Out IF
NH
10.5.0.0/16
i3
R3
10.4.3.0/24
i1
R4

R3: Routing table


Destination Out IF
NH
10.4.3.0/24
i1
R2
10.5.0.0/16
i2
Direct

i3
R2

i1

i1

DA=10.5.1.1

DA=10.5.1.1

i2
R3 10.5.0.0/16
DA=10.5.1.1

i1
R4

10.4.3.0/24

A routing protocol determines the routes.

Each router on the path to the IP packet's destination makes a


longest match routing table lookup to find the route to be taken by
the packet (destination-based FEC determined at each hop).

Let's add now MPLS and destination-based label switched paths.

Octavian Catrina

34

Packet forwarding using MPLS


In Core:
LSRs forward packets based on labels.
Label switching (aka label swapping)

At Edge:
Ingress LSR
Classifies IP packets
& Adds labels (MPLS
header)
IP

Label switching table


In IF In L Out IF Out L
i2
L1
i3
L2

IP
i1

R1
Edge LSR

L1

IP
i2

At Edge:
Egress LSR
Removes labels
(MPLS header) &
Forwards IP packets

Label switching table


In IF In L Out IF Out L
i1
L2
i2
L3

L2

LSP

i3

IP
i1

R2
i1 LSR

LSR

i2

R4
i3

IP

L3
i1

R5
Edge LSR

LSR

MPLS domain

i1

i2
R3

LSR = Label Switching Router


LSP = Label Switched Path

Ingress router classifies the packets, determines the appropriate LSP


(destination, service class), then labels and forwards them on the LSP.
Internal routers forward the packets along the path according to the label
and switching tables (instead of destination address and routing table).
LSP egress router removes the labels and then forwards the packets.
LSPs are set up based on IP routing tables using label distribution protocols.
Octavian Catrina

35