Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Data Networking
Lecture 1: Use Cases and Networking Fundamentals
Wolfgang Kellerer
© 2023 Technical University of Munich
1
What is a Data Network?
à a communication network
with packet-based information transmission
over wireless and wireline channels
(like most modern communication networks)
5G
Information
User
WIFI
User Equipment
Link
Wireline Network
Network Node
Wireless Network
2
Network Fundamentals – a Revision
Part 1: Switching and Protocols
§ Network topologies
§ Switching principles
§ Network protocols à video tutorial
Part 2: Network Performance Analysis
§ Performance analysis à video tutorial
§ Queuing models à video tutorial
3
Network Fundamentals – a Revision
Part 1: Switching and Protocols
4
A Closer Look into the Network Structure:
Access and Core Networks
mobile access network
UMTS
LTE/5G
(national) wide area IP core network I
N
T
E
R
N
E
T
intl.
PSTN*
wireline access network
WIFI
(national) wide area classical
telecommunication network
* public switched telephone network
5
General Concept of Communication Networks
On a high level:
§ terminals (end systems) as source and destination of information
§ they communicate via the network, which can be formed as
§ a shared medium (e.g., wireless)
§ a meshed network with dedicated links (e.g., cables)
§ The interconnection of links and nodes is the network topology.
Information
Terminal
Network
6
General Concept of Communication Networks
On a closer look:
network specific control functions must be performed by the network:
§ Information exchange between all entities is based on diverse
communication protocols
§ Switching (method for information forwarding: circuit switching, packet
switching, ...) and Routing (find end-to-end path)
§ Multiplexing of resources on each network link (divide resources
among users - resources are e.g., channels, time slots, lines,…)
Application
HTTP, FTP,
SMTP, DNS
Transport
TCP, UDP
Network
IP
IP
IP
LL, MAC
LL, MAC
LL, MAC
LL, MAC
PHY
PHY
PHY
PHY
7
Switching Principles
§ Switching: a method for information forwarding within a network
§ Circuit Switching (CS)
§ Space Division Switching (different cables)
§ Time Division Switching (different time slots)
§ Wavelength Switching (different wavelengths = colors)
§ Packet Switching (PS)
§ classical, variable length packet switching (Internet)
§ fixed length packet switching (cell switching, ATM)
8
Packet Switching (PS)
Joint usage of network resources (bandwidth, switching node capacity)
C
R = 100 Mb/s
A
B
R = 1.5 Mb/s
D
buffer: packets
wait for outgoing link
(“Store and Forward”)
E
Queuing and Loss
§ If the arrival rate (in bit/s) of a link exceeds the transmission rate
(for some time)
- packets are buffered until they can be served, and
- packets get lost, if the buffer is full
9
Alternative: Circuit Switching (CS)
Resources are reserved for an end-to-end connection
(bandwidth, capacity in switching nodes)
§ Network resources are split into channels
§ Channels are allocated to end-to-end connections
§ Channels might remain unused if the
corresponding connection is idle
(e.g., no one is speaking, …)
each link consists of n
transmission channels
End-to-end connection
between Host A and Host B
that uses one channel on
each link
10
Packet Switching vs. Circuit Switching
Packet Switching can use the resources more effectively (mostly)
Example
§ Link with 1 Mbit/s
§ Each user
§ once active: 100 kbit/s
§ 10% of the time active
N user
1 Mbit/s Link
§ Circuit Switching:
§ 10 users
§ Packet Switching:
§ with 35 users the probability for more than 10 active users at the same
time is smaller than 0.0004
Q: Where does the 0.0004 come from?
11
Network Protocols
Networking means the exchange of information through messages
between processes running in the communicating hosts (terminal,
server, …).
§ How to specify the rules for the message exchange in a
communication network? à protocols
§ A Communication Protocol defines a set of rules for the
communication between entities in terms of messages, the format
of the exchanged information packets, and the addresses of the
entities.
§ Rules include
§ efficient transport, e.g., TCP
§ reliable transport, e.g., HARQ in LTE
§ fast transport with low overhead, e.g., RTP
§ access of many users to a shared medium, e.g., WLAN
12
Example for a Communication Protocol between
Computers: Accessing a Web Server
SYN
SYNACK
ACK;
GET http://moodle.tum.de:80/dnet/tutorial3.html
time
tutorial3.html
13
Protocol Stack
§ Protocols can be categorized into layers according to their
functions à complexity reduction
HTTP
software or
hardware
implementation
TCP
transport
“GET
http://moodle.tum.de:80/dnet/
tutorial3.html”
to 129.187.39.10
(moodle.tum.de)
at port 80
network interface
computer
14
OSI Model for 7 Protocol Layers
7: Application
6: Presentation
logical communication
GET http://moodle.tum.de/dnet/tutorial3.html
7: Application
6: Presentation
5: Session
5: Session
4: Transport
4: Transport
3: Network
3: Network
2: Datalink
2: Datalink
1: Physical
computer 1
1011000111001001
physical communication
1: Physical
computer 2
15
Homework
Watch Video 1: Protocols and OSI Protocol Stack
16
Basic Principles of Communication Protocols
Remember: Rules include
§ efficient transport, e.g., TCP
§ reliable transport, e.g., HARQ in LTE
§ fast transport with low overhead, e.g., RTP
§ access of many users to a shared medium, e.g., WLAN
Reliable transport: ARQ
Efficient transport: Window Protocol
Overhead: connection orientation vs. connection-less
User access: Medium Access Control (Lecture 2)
17
Protocol Principles: Stop & Wait Protocol vs. ARQ
Stop & Wait
Automatic Repeat Request
Sender stops and waits until
(ARQ)
Acknowledgement is received
After timer expiration, the
A
B
message is repeated
A
M1
ACK
B
M1
Timer T
M2
ACK
M3
M1
ACK
ACK
18
Protocol Principles: Window Protocol
A
B
Sender allows more than one
M1
message to be in flight, up to
M2
M3
ACK(2)
ACK(3)
ACK(4)
M6
acknowledged at a time
Here: !!,#$% = 3
M4
M5
!!,#$% messages can be not
Messages are sent in groups
ACK(5)
ACK(6)
è Utilization can be increased
ACK(7)
…
Note: The ACK policy shown here follows the usual
convention that the transmitted ACK number
corresponds to the sequence number the sender of the
ACK is expecting to receive next, see, e.g., RFC 793
(Transmission Control Protocol, TCP).
19
Small and Large Windows
large window size
small window size
B
A
M1
M2
M3
M4
M5
M6
ACK(5)
ACK(6)
ACK(7)
M1
M2
M3
M4
M5
M6
M7
M8
M9
M10
M11
M12
…
M7
M8
M9
ACK(2)
ACK(3)
ACK(4)
B
A
ACK(2)
ACK(3)
ACK(4)
ACK(5)
ACK(6)
ACK(7)
ACK(8)
ACK(9)
ACK(10)
ACK(7)
ACK(11)
ACK(12)
ACK(13)
ACK(8)
ACK(9)
ACK(10)
…
20
Network Fundamentals – a Revision
Part 2: Network Performance Analysis
21
Analytical Performance Analysis
Example: processing delay in an intermediary node
System A
System B
System C
TV
time
TS
TP
data sending time: TS = L / R = length or data in Bytes / bit rate in bit/s
signal propagation time: TP = l / c = length of cable in m / signal speed in m/s
processing time (includes waiting time): TV, depends on data volume, buffer
state, load, … (varying) à queuing theory
22
Homework
Watch Video 2: Performance Analysis
23
Traffic Theory for Queuing Systems
Queuing Models:
analytical models to calculate performance metrics of communication
networks
Focus: single packet forwarding node (router, switch)
Note: This modeling approach can
be applied to any other system as well,
e.g., wireless packet transmission
Performance metrics
§ Probability of x packets in service
§ Average number of packets in service
§ Average queue length (buffer fullness)
§ Average queuing delay
§ Packet loss probability
24
Homework
Video 3: Queuing Models (traffic theory)
Read [Bertsekas, Gallager] chapter 3
We use this type of Markov chain modeling in Lecture 3
25
In this lecture …
… we covered Network Fundamentals
§ Network topologies
§ Switching principles
§ Network protocols
§ Performance analysis
§ Queuing models
26
Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Data Networking
Lecture 2: MAC and PHY layers for resource management
Part 2a: PHY and Link Layer basics
Wolfgang Kellerer
© 2023 Technical University of Munich
27
What is covered in this lecture
§ Layer 1 (PHY layer): signal transmission
§ Layer 2 (Link Layer and Medium Access Control) in general
§ Tasks of Link Layer and MAC
§ Medium Access Control (MAC)
§ Wired and wireless medium access
§ Metrics
§ Multiplexing
§ Multiple Access
§ Additional Reading
§ [Kurose, Ross] chapter 5, Link Layer
§ [Beard, Stallings] chapter 2, transmission/PHY
Note: Some of the slides are adapted from the lecture „Mobile Communication“ of Holger Karl, Univ. of Paderborn
28
Signals and Information Transmission
§ Signal transmission and hence information transmission is
performed using signals
§ A signal is a representation of a message by physical units,
e.g., voltage signal, light signal, acoustic signal, …
§ Four basic signal classes
§ Analog Signal: continuous in value and time, i.e., any value at any time
§ Sampled Signal: values of the signal are only available for certain times
§ Quantized Signal: the signal can only have certain values
§ Digital Signal: discrete in value and time
29
Examples for the Classification of Signals
time
continuous in time
discrete in time
value
value
continuous
in
value
value
analog
signal Sampling
time
time
Quantization
Quantization
value
discrete
in
value
signal after
sampling
value
Sampling
time
quantized signal
time
digital signal
30
Communication Protocol Stack
Source
Sink
Source Coding
Decoding
receives from network
uses network
7: Application
4: Transport
logical communication
GET http://moodle.tum.de/dnet/tutorial3.html
3: Network
2: Datalink &
MAC
1: Physical
Channel coding
Modulation
camera
7: Application
4:Transport
3:Network
Medium specific transport over one link
1011000111001001
physical communication
e.g., QAM
2: Datalink &
MAC
1: Physical
Decoding
Demodulation
computer
31
Information Transmission
analog signal
Source
source signal
discrete in time
sampling
Medium Access
Control (and other
network protocols)
data
Quantization
Digitalization
dig. source
coding
(compression)
channel
coding
base band
coding
modulation
source coding
discrete
continuous
time
signal
value
Sink
discrete
digital (binary)
analog
continuous
continuous
signal
reconstruction
analog
analog
channel
discrete
D/A
conversion
decompression
channel
decoding
detection
demodulation
analog signal
32
Information Transmission
with communication network
analog signal
Source
source
coding
end-to-end
protocol(s)
addressing,
transport
(e.g., packetization,
reliability,…)
digital
analog
network
protocol(s)
channel
coding
base band
coding
digital
network
protocol(s)
(routing,
forwarding)
analog
source
decoding
analog signal
end-to-end
protocol(s)
network
protocol(s)
analog
channel
channel
decoding
detection
demodulation
channel
coding
bb coding
modulation
in a
network node
(e.g., router)
Sink
modulation
analog
channel
channel
decoding
detection
demodulation
Protocol Stack
33
Protocol Stack
Source
Sink
Source Coding
Decoding
IP
TCP
APP
3
ETH2
IP
TCP
APP
In:
Port 1
APP
TCP
IP
APP
Out:
Port 1
APP
APP
APP
TCP
IP
ETH1
1
4
TCP
APP
TCP
IP
2
Make sure bit frame
(=packet) arrives
at next hop
6
5
APP
TCP
IP
ETH2
TCP
3
IP: Decide on
forwarding in the
network
TCP
IP
4
7
APP
TCP
IP
ETH1
6
5
TCP: make sure file
is complete at sink
APP
APP
7
2
Out:
Port 2
1
In:
Port 1
10110001
e.g., ethernet link
camera
router
computer
34
Tasks of Link Layer and MAC (OSI Layer 2)
§ On the physical medium the digital signal is transmitted
§ Protocols (e.g., medium access control) are needed in order to control the
communication between the entities (medium access, resource usage,
retransmissions, …)
§ Protocols are end-to-end (e.g., TCP) or for each link (our focus here)
§ Link Layer and MAC (OSI Layer 2) support bit frame transmission on a
link
Application
HTTP, FTP,
SMTP, DNS
Transport
TCP, UDP
Network
IP
IP
IP
LL, MAC
IEEE 802.3
LL, MAC
IEEE 802.3
LL, MAC
802.11
LL, MAC
802.11
PHY
PHY
PHY
PHY
Digital signal: 100110101110
35
Example: LAN in the OSI Model
§ Only layers 1 and 2 are relevant to LANs. Layer 3 is mostly IP
IEEE 802.2
IEEE 802.1: Bridging
CSMA/CA
MAC
Physical layer
CSMA/CA
802.11
802.3
802.4
802.5
802.6
see http://standards.ieee.org
air interface
§ PHY (1) covers transmission (electrical signals, connectors, clock, ...).
§ MAC (2a) covers multiple access to the shared medium
§ LLC (2b) forms a common convergence sublayer to all possible MAC layers,
hiding their differences to the layer 3.
36
Tasks of Link Layer and MAC
type
Ethernet packet:
preamble
dest.
source
address
address
data (payload)
CRC
§ Framing
will be covered for specific
examples, e.g., ethernet,
WLAN, …
§ encapsulate layer 3 data into a layer 2 packet
§ addressing
§ Link (medium) access
§ when and how a node is allowed to send a packet
§ when a node has to listen for a packet
in this and following lectures
§ (reliable) transmission of a frame between adjacent nodes
§ communication protocol: ARQ
§ Error detection and error correction
§ checksum, Forward Error Correction, …
§ Packet forwarding and switching
§ where to send a packet to
will not be covered here
will be covered in the last
parts of this course
(switching, routing, SDN)
37
Homework
§ Browse the Internet for a better understanding of the Medium
Access Control Sublayer tasks
§ While this should not be your primary source of information the
Wikipedia page „Medium access control“ is a good starting point
§ What are the different concepts for LAN medium access and for cellular
network medium access?
38
Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Data Networking
Lecture 2: MAC and PHY layers for resource management
Part 2b: Medium Access Control (MAC)
Wolfgang Kellerer
© 2023 Technical University of Munich
39
What is covered in this lecture
§ Layer 1 (PHY layer): signal transmission
§ Layer 2 (Link Layer and Medium Access Control) in general
§ Tasks of Link Layer and MAC
§ Medium Access Control (MAC)
§ Wired and wireless medium access
§ Metrics
§ Multiplexing
§ Multiple Access
§ Additional Reading
§ [Kurose, Ross] chapter 5, Link Layer
§ [Beard, Stallings] chapter 2, transmission/PHY
Note: Some of the slides are adapted from the lecture „Mobile Communication“ of Holger Karl, Univ. of Paderborn
40
Medium Access Control
§ Controls
§ when and how a node is allowed to send a packet
§ when a node has to listen for a packet
§ Medium access in a wireless medium faces difficulties not present
in a wireline medium
§ Wireless channel errors, high attenuation, broadcast characteristics
§ Limitation of RF technology
§ Energy saving
§ We start with wireless MAC in this course
41
Problems and Challenges for MAC in a Wireless Medium
§ In a wired medium, situation for a MAC protocol is relatively simple
§ Problem: Do not send when receiver is already receiving something
§ Task: Decide at sender whether receiver is busy
§ This is usually easy since attenuation in wired medium is negligible
§ Additionally: error rates are low, hence administration messages usually go
through
§ In a wireless medium, these assumptions usually do not hold
§ Sender and receiver see rather different signal/interference situation
§ Administration messages can easily get lost
§ Moreover: network topology & channel state can change due to movement –
any negotiated schedules can become useless
§ Typical goal: Ensure that, in a given channel, a receiver only receives
at most one packet at any given time
42
Metrics for Wireless MAC
What are desirable properties for a wireless MAC?
§ Throughput
§ Per communication pair,
or for an entire network
§ Stable throughput S even
under high offered load G
§ Delay
§ Time between a packet is ready to be transmitted and its successful
reception
§ Including possible retransmissions
§ Should be small at low load
43
Metrics for Wireless MAC
§ Fairness
§ Give equal opportunities to any communicating pair
§ Energy efficiency
§ Do not waste energy for coordination, but also keep packet losses or
needless transmissions low
§ Try to turn off nodes/radio frontends if possible
§ Robustness to changing topology
§ Make sure that good throughput, delay, and fairness are still achieved if
neighborhood relationships change frequently
§ Possible: provide guarantees
§ E.g., on throughput, delay
§ For multimedia traffic
§ Vaguely summarized by the term “Quality of Service” (QoS)
44
MAC, Multiplexing, Duplexing
§ Recall:
§ Multiplexing: Share a resource (here: channel) among different
communicating pairs, e.g., multiple data streams on one medium
§ Duplexing: Given a pair‘s share, decide how to distribute the resource
between the two members of that pair, to communicate back and forth
§ MAC protocol can solve
§ Either only the multiplexing problem
§ Then, specific rules for duplexing are needed in addition
§ Or both multiplexing and duplexing problems
§ With “duplexing” often not being regarded as a special case
45
Multiplexing Principles
Multiplexing: method by which multiple data streams are combined into one
signal over a shared medium à share resources
§ Frequency Division Multiplex (FDM)
§ several frequencies in RF systems
§ Wavelength Division Multiplex (WDM) ~ FDM
§ several wavelengths, as used in optical systems
§ Time Division Multiplex (TDM)
§ several time slots
§ Space Division Multiplex (SDM)
§ several lines or channels
§ Code Division Multiplex (CDM)
§ used in some mobile radio networks and some optical networks: One shared
broadband channel where each user uses different (orthogonal) codes
46
Control Options
§ Control: Decision problems for multiplexing
§ FDM: Which frequency to use?
§ TDM: Which timeslot to use?
§ CDM: Which keys to use?
§ SDM: Where/in which direction to use a channel?
§ Combined schemes: e.g., which frequency to use at which time
§ Solving these decision problems turns a multiplexing scheme into a
medium access scheme!
§ Denoted by “Multiple Access”
§ FDM à FDMA Frequency Division Multiple Access
§ TDM à TDMA Time Division Multiple Access
§ also: CSMA (Carrier Sense Multiple Access): a time-based MAC scheme for
WLAN
47
Multiple Access
§ A multiplexing technique may be further extended into a multiple access
method or channel access method, for example TDM into Time Division
Multiple Access (TDMA) and statistical multiplexing into Carrier Sense Multiple
Access (CSMA)
§ A Multiple Access method makes it possible for several transmitters or sending
stations or users connected to the same physical medium to share its capacity
§ Multiplexing is provided by the Physical Layer of the OSI model, while multiple
access also involves a Medium Access Control protocol, which is part of the
Data Link Layer (Layer 2) (so we say LL & MAC here for Layer 2)
§ Examples
§ ISDN: TDMA
§ Wireless LAN: CSMA/CA
§ GSM: FDMA/TDMA
48
Examples
Communication
System
Multiplexing
Multiple Access (MAC protocol)
Comments
ISDN
TDM
TDMA
Data rate:
64 kBit/s
GSM (2G)
TDM and FDM:
frequencies and
time slots
FDMA/TDMA: each user gets a
frequency pair (up- and downlink)
and a time slot at communication
start;
Base station schedules!
Data rate:
~ 10 kBit/s
UMTS (3G)
CDM
Each user uses all frequencies, WCDMA for separation
Data rate:
~300 kBit/s
LTE (4G)
OFDM
OFDMA: every 1 ms a user gets
different resource blocks assigned
(freq. and time slots)
Data rate:
~MBit/s
5G/NR
OFDM
OFDMA: similar to LTE, but smaller
time scales (125 µs – 1 ms)
Data rate:
~Gbit/s
WLAN
OFDM
CSMA: one user uses whole channel
and has to check before sending
(carrier sense multiple access);
Each user decides!
Data rate:
~10MBit/s
49
Control Options
§ Where to solve these decision problems?
§ Centralized – At a single node, responsible for a wireless network
§ Distributed – Each node makes local decisions
§ How to solve the decision problem?
can be
centralized or
decentralized
§ Avoid possible problems by arranging before accessing the resource
àScheduled or Contention-free protocols
§ Accept the risk that transmissions may occasionally collide
mostly a
decentralized
à Contention-based protocols
approach
§ Hybrid protocols, combining both aspects
§ Who initiates solving the decision problem?
§ Sender or receiver? e.g., always the base station
§ When is decision problem solved?
§ More or less once – static schemes, e.g., GSM
§ Frequently, possibly for every packet – dynamic schemes, e.g., LTE (every 1 ms)
50
Error Control
A
B
M1
§ Automatic Repeat Request (ARQ)
time t
§ Retransmission of a lost or faulty packet
M1
§ Reactively adds redundancy, i.e., packet
transmission delay and use of channel resources
ACK
only occurs if a packet cannot be received properly
§ Forward Error Correction (FEC)
§ Channel coding: add an error correcting code
§ Proactively adds redundancy, i.e., every packet
contains extra information to recover from bit errors
i1
i2
i3
i4
i5
i6
i7
i8
c1
c2
c3
c4
c5
c6
c7
c8
Example for a ½-rate block code
51
Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Data Networking
Lecture 3: Multiaccess Communication: ALOHA and Slotted ALOHA
Part 3a: ALOHA
Wolfgang Kellerer
© 2023 Technical University of Munich
52
What is covered in this lecture
§ 5 Dimensions of Communication
§ ALOHA
§ Slotted ALOHA
§ Backlog
§ Reading
§ [Bertsekas, Gallager] chapter 4.2
§ 4.2.1 Slotted ALOHA
§ 4.2.2 Slotted ALOHA
§ 4.2.4 ALOHA
53
5 Dimensions of Communication
§ Time
§ Signal may vary over time to propagate different information à MAC
§ Frequency
§ Each frequency portion may carry different information à MAC
§ Energy
§ Different energy levels may propagate different information à MAC
§ Space
§ Exactly the same signal can be used at different places to carry different
information à Planning
§ Code
§ Different polarization of the signal can carry different information à PHY
54
5 Dimensions of Communication:
Our Focus in this Lecture
§ Time
§ Signal may vary over time to propagate different information à MAC
§ Frequency
§ Each frequency portion may carry different information à MAC
§ Energy
§ Different energy levels may propagate different information à MAC
§ Space
§ Exactly the same signal can be used at different places to carry different
information à Planning
§ Code
§ Different polarization of the signal can carry different information à PHY
55
Assumptions (1)
§ Full time is reserved for only one user
§ One to many communication, only uplink
§ Distributed coordination (MAC protocol)
§ What will happen if two radios broadcast on the same frequency?
56
Problem Statement
§ Transmission will become irrecoverable
§ We will only hear one radio when the other stops transmitting
§ Who decides on who transmits when the Medium Access Control
protocol is run independently by each user (distributed protocol)
§ How to design such a MAC scheme?
57
ALOHA
§ Simplest MAC scheme
§ ALOHAnet
§ ALOHA originally stood for Additive Links On-line Hawaii Area*
§ Invented by University of Hawaii
§ Rules
Acknowledgement
§ Transmit when you have a packet to send
§ ACK can be used or not
§ If used
§ if no ACK received after some time: retransmit
§ if ACK received: success
* Kamins, Robert M.; Potter, Robert E. (1998). Måalamalama: A History of the University of Hawai'i. University of Hawaii Press. p. 159. Retrieved August 2, 2015.
58
ALOHA: Flow Diagram
59
Assumptions (2)
Some of the systems we discuss do
not have all those assumptions.
This will be noted accordingly.
§ Star/hub topology: m transmitting nodes and 1 receiver
pix
1. All packets have the same length: each packet
takes one time unit (= slot) for transmission;
[all transmitters are synchronized (not enforced for ALOHA!)]
2. Poisson arrivals: for each station: λ/m; total arrival rate: λ
3. Collision or perfect reception: if 2+ nodes send at same time resp. frame
ormore
sending overlaps à collision; if only
one sends à correct reception
4. 0,1, e immediate feedback: at the end of each transmission the receiver
gives feedback: 0 packets, 1 packet or >1 packet (error e)
5. Retransmission of collisions:
a collided packet must be retransmitted later
6. a) No buffering: new arrivals are discarded when packet is waiting OR
6. b) Infinite set of nodes (m à ∞): each new arriving packet from a new
node
t
60
ALOHA: Collision Example
Worst Case
packet =
1 slot length
Best Case
and
Marisa
invalid packets received
invalid packets received
§ Packets are lost (invalid) even if they slightly overlap
§ Question: under which condition can we be sure to observe success (= no collision)?
§ Worst case: 2 slots
§ Best case: 1 slot
§ Remember: we do not, and we cannot enforce any synchronized transmissions in
ALOHA!
61
ALOHA: Throughput
§ Definitions
§ Throughput: The ratio of time used against received data bits; unit is
bits/second
§ Normalized Throughput (!): The ratio of time used for successfully
received data, compared to the total spent time; no unit
§ Assumptions
§ No propagation time
§ ALOHA has three states:
§ Idle, Collision and Success
§ Sum of all normalized Idle Time, Collision Time and Success Time gives 1
§ ! = 1 − %&'()*+(,-.*/ + 1/''*2*/3)*+(,-.*/ = 456(22)*+(,-.*/
§ Success Time is the time where we only have 1 packet in 2 slot times
62
of
b 1
packets generated
In
ALOHA: Normalized Throughput apr
number
users
is on
Am m
Apack's
Assumption: no retransmissions
Define a bins and balls problem for the Worst-Case Scenario
§ Bins are frames of 2 slots and balls are the packets
packet
1
slots for
§ Definition
2
§ Probability to have exactly one single ball inside a bin (2 slots): !!
" so devidedby2
254s
§ Throughput: ! = ! (worst case: packet sending just overlaps)
# !
hitsend
not
§ #2% packets arrive in 2% slots with the arrival rate # packet/slot.
workforethisbin
§ Worst-case: 2 successive slots must only
have 1 packet for success
§
Bothers
" '#$ "
! = lim
"
$
$→& #
" '#$("
1−
= #+ (#'
$
choose one
bin
packet to
Chooseone
normalized throughput
to be
send
e
63
flux
at
me
ALOHA: Normalized Throughput
Ewan
Xe
§ ALOHA $ =%& &'(
§ Best-Case $ =%& &(
Assumption: No retransmissions!
e
tanne
Observations:
§ Max. is at 1/e
resp. 1/2e
receive
O
§ For low %: low $
due to few arrivals
§ For high %: low $
due to collisions
receive e
Can we always have the best case?
Normalized Throughput of ALOHA
64
Homework
§ How could we always get the ALOHA best case?
§ Which additional assumptions do we have to consider?
65
Recall: Poisson Distribution
§ Possible applications: number of events that occur in an interval of time when
the events are occurring at a constant rate; number of items in a batch of
random size
§ PMF
§ CDF
! !" "#
! " =$
#!
, if " ∈ {0,1, … }
0, otherwise
0, if " ∈ {0,1, … }
5 " = $ %" ⌊#⌋ "$
6 ∑&'( , otherwise
&!
§ range
0, 1, …
§ mean
8
§ variance
8
Image source: Wikipedia
66
Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Data Networking
Lecture 3: Multiaccess Communication: ALOHA and Slotted ALOHA
Part 3b: Slotted ALOHA (SA)
Wolfgang Kellerer
© 2023 Technical University of Munich
67
What is covered in this lecture
§ 5 Dimensions of Communication
§ ALOHA
§ Slotted ALOHA
§ Backlog
§ Reading
§ [Bertsekas, Gallager] chapter 4.2
§ 4.2.1 Slotted ALOHA
§ 4.2.2 Slotted ALOHA
§ 4.2.4 ALOHA
68
Slotted ALOHA
Slot 1
Slot 2
...
Slot N
§ Introduction of synchronized slot time
§ Limit the packet transmission to start of a slot
§ Recall assumptions
1. Every packet and slot are the same size & all transmitters are
synchronized
2. Poisson arrivals
3. Collision or perfect reception
4. Immediate feedback (0,1,e) è these assumptions simplify the analysis
5. Retransmissions
5. What happens if collided packets are retransmitted?
69
Retransmission Cases
§ 6.a Finite Number of Users
§ No new packet is generated while a user is backlogged
Collision
+ users
, arrival
+ − . users
+ − . ∗ ,/+ arrivals Not in backlog
,/+ arrivals per user
. users
1! probability to
retransmit
Backlog
∞ users
, arrival
Not in backlog
. users
3 arrival
Backlog
§ 6.b Infinite Number of Users
Collision
∞ users
, arrival
70
Slotted ALOHA
§ Definition
§ Backlog: Each packet that has to wait before being retransmitted is
backlogged
§ Recall assumptions:
§ 6.a No new packet is generated while a user is backlogged (Lower
Bound)
§ How to determine the retransmission probability !4 ?
We can analyze this with a Markov Chain (6.a).
§ 6b. Infinite Number of users (Upper Bound)
§ If we have infinite users, we have an effective arrival rate " = $ + &
§ & is the average number of arrivals stemming from retransmissions
§ Throughput with retransmissions '5 = "( %6
71
Slotted ALOHA with Retransmissions
Start
No
Packet
to Send
Yes
Transmit
: < :4
Roll
0≤:≤1
: ≥ :4
Success
No
Wait for next slot
Yes
Stop
72
Slotted ALOHA: Performance Analysis
distribution
Poisson
We are considering case 6.a!
§ Definition
PEAK
é
PEX
o
§ Markov Process: Each state may depend only on the previous state
I
§ State variable n: number of backlogged nodes (n=0: no backlog,
n=1: 1 previously collided user is waiting/backlogged, …)
V
§ n is the number of backlogged nodes at the beginning of a slot
§ Probability of transmission of a backlogged node: ')
I
§ Probability of transmission of an unbacklogged node: '$ = 1 − &
PEX 0
7
&8
Plowith
§ Recall: each of the m-n other nodes transmit if one packet arrives
Poisson distribution mean λ/m à probability of no arrivals is &
7
&8
73
Slotted ALOHA: Performance Analysis
§ State variable n: number of backlogged nodes
§ In each slot only a single success is possible: (1) à +*,*&+
§ The number of collided users is not limited: (e) à +*,*,§ Being in the same state means an idle slot: (0) à +*,*
7!,#
7!,$
7%,$
0
7!,!
7%,%
7%,!
1
7$,$
7$,%
7$,#
2
7#,#
3
7#,$
Markov Chain for Number of Backlogged Users
74
Slotted ALOHA: Performance Analysis
§ Recall Definitions
§ Number of backlogged nodes: 3
§ Number of all nodes: +
§ Probability of transmission of an unbacklogged node: 8& = 1 − (
'
!
"
§ Probability of transmission of a backlogged node: 8(
§ Analysis
§ Transmission probabilities
§ 9& *, 3 =
)'*
+
8& + 1 − 8& )'*'+
* unbacklogged nodes transmit
packets in a given slot
§ 9( *, 3 =
*
+
8( + 1 − 8( *'+
* backlogged nodes transmit
packets in a given slot, 3 ≥ *
75
Slotted ALOHA: Performance Analysis
,$ -, / , Collision
2≤- ≤2−/
,$ 1, / 1 − ,) 0, / , Inewbutnot Gutless
-=1
+*,*,- =
,$ 1, / ,) 0, / + ,$ 0, / 1 − ,) 1, / ,
-=0
backlog
Suess
backlogretran or success
no
,$ni ew
0, / ,no
1,
/
,
- = −1
rep aagnomniggran
)
train
new
no
All transition probabilities can be extracted accordingly
Let’s use these probabilities to derive steady state probabilities
76
Slotted ALOHA: Performance Analysis
§ Definition
§ !9 : Steady state probability of having = backlogged users
)-"
§ ∑+
)*! -) = 1 and -) = ∑,*! -, .,,)
Sum of all incoming
arrows weighted with
steady state
probabilities
§ -) can be obtained from the Markov chain transitions .,,)
§ .,,) can be obtained based on // 0, 2 and /0 0, 2 (see prev. slide)
§ ///0 0, 2 can be obtained based on 3/ and 30 (see two slides before)
èIterative calculation of a set of linear equations
§ Recursive calculation: -)-" = 2
"
#$%,#
-) 1 − .),) − ∑)("
,*! -, .,,)
77
Slotted ALOHA: Performance Analysis
Performance parameters
§ Expected number of backlogged users 5 = ∑#
*.+ /7*
EIN
§ Delay
§ Delay: Time a packet has to wait before being served
§ Units in this analysis: slots
D ELI
EID
§ Delay < is the important parameter for stability!
§ By Little‘s Theorem < =
,
-
78
Slotted ALOHA: Performance Analysis
§ Average Normalized Throughput (expected normalized
throughput):
#
8 = 9 7* ,$ 1, / ,) 0, / + ,$ 0, / ,) 1, /
*./
§ Success Probability
+!011 = 8 / = ,$ 1, / ,) 0, / + ,$ 0, / ,) 1, /
§ if '$ and ') are small
8 / = +!011 ≈ ; / & &2 *
Depending on .!
State dependent!
Dynamics!
§ Where ; / = 2 − / '$ + /') is the Attempt Rate
§ No backlogged users (/ = 0): +!011 = 8 / ≈ %& &(
79
Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Data Networking
Lecture 4: Multiaccess Communication: Backoff
Part 4a: Stability analysis of Slotted ALOHA
Wolfgang Kellerer
Fidan Mehmeti
© 2023 Technical University of Munich
80
Recap
§ Medium Access Control
§ ALOHA
§ Slotted ALOHA – Performance Analysis
§ Retransmission probability :'
§ Number of all users: >
§ Number of backlogged users: =
§ Markov chain analysis
§ Expected number of backlogged users % = ∑+
)*" 2-)
§ Success Probability .3455 = 5 2 ≈ 7(2)+ (6()) depending on n
§ with Attempt Rate ? = = > − = :: + =:4
§ No backlogged users (n=0): .3455 = 5 2 ≈ #+ ('
$
§ Expected Delay : = '
81
What is covered in this lecture
§ Slotted ALOHA analysis continued
§ Backoff
§ Exponential Backoff
§ Reading
§ [Bertsekas, Gallager] chapter 4.2
§ 4.2.3
§ 4.2.4
82
Slotted ALOHA: Stability Analysis
§ Definition
§ Backlog Growth Rate or Drift in state n:
Expected change in backlog over one time slot starting in state n
(= arrival probability − probability that a packet is served in one slot)
§ <* = + − 3 8& − 7./00
§ unbacklogged arrivals: + − 3 8&
§ If backlog grows continuously, we have instability
§ +!011 ≈ ; / & &2 * and ; / = 2 − / '$ + /')
83
Slotted ALOHA: Stability Analysis
> = 0.35, + = 30, 8' = 0.2
“good” stable point
,!:
+ -
41
0.01
e
-
Note that
> ≈ +8&
unstable
equilibrium
+
“bad” stable point
+
n=0
" = ,!:
(n)
D 3 = + − 3 8& + 38(
n=m
" = ,!4
Get
84
Slotted ALOHA: Stability Analysis
Observations in the “instability curve” on the previous slide
§ n left of the “unstable equilibrium”: <* is negative and n drifts
towards the desired stable point
§ n right of the “unstable equilibrium”: <* is positive and n drifts
towards the undesired stable point
+
3
§ The success rate (departure rate) +!011 is at most = 0.368
§ +!011 is almost zero for long periods whenever the system “jumps”
to the undesired (“bad”) stable point
85
Slotted ALOHA: Stability Analysis
§ Definitions
§ System Parameters: are set by the application requirement
§ Design Parameters: can be changed to guarantee operation
§ ; / = 2 − / '$ + /')
§ 2, /, '$ are all system parameters
§ we can limit system parameters or
§ we can change design parameters ')
§ to control our desired system behavior
How to use 8( to guarantee stability?
86
Slotted ALOHA: Stability Analysis
§ Decreasing ') increases tolerance to higher backlog size
§ But: Delay increases as a trade off ( <
4
= )
(
0
87
Slotted ALOHA: Stability Analysis
§ Delay effect of decreasing ')
§ For small ') the probability for choosing a high backlog slot
Cumulative Density Function (CDF)
number is higher à Bounding the delay is really hard for small ')
y-axis: CDF
Cumulative Density
Function or
Cumulative Distribution
Function
; < = >(@ ≤ <)
For 1! = 0.1
P GℎIJK. LM JNIO ≤ 5 = 40%
i.e., 60% of the retransmitted
packets choose a slot larger
than 5
For 1! = 0.3
P GℎIJK. LM JNIO ≤ 5 = 84%
i.e., only 16% of the
retransmitted packets choose
a slot larger than 5
88
Slotted ALOHA delay vs. TDM delay analysis
§ TDM: periodically scheduled slots (1 packet) for
each user
Expected waiting time W in slots
§ + = 16: user can use every 16th slot, i.e., an
arriving packet has to wait on average
so
16/2 = 8 slots;
I increases with arrival rates, i.e., an arriving
packet might have to wait until packets that arrived
before are served
§ + = 8: I is 4 initially
Note: In the figure, the expected waiting time is shown for Stabilized Slotted ALOHA. To implement Slotted ALOHA in a
real-world system, some additional measures to achieve stability have to be taken, which are assumed to be present
for the current evaluation. For further reference, see chapter 4.2.3 from the [Bertsekas, Gallager] book.
89
Homework
Consider
§ Is there a way to bound the delay for the retransmission
probability?
§ Which parameter (number), if we know it, could help us to better
deal with collisions?
§ How could we improve the retransmissions if we would know the
number of collisions that have happened?
90
Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Data Networking
Lecture 4: Multiaccess Communication: Backoff
Part 4b: Backoff
Wolfgang Kellerer
Fidan Mehmeti
© 2023 Technical University of Munich
91
What is covered in this lecture
§ Slotted ALOHA analysis continued
§ Backoff
§ Exponential Backoff
§ Reading
§ [Bertsekas, Gallager] chapter 4.2
§ 4.2.3
§ 4.2.4
92
Backoff
§ Instead of ') we can limit the number of possible backoff slots to
choose from to bound the initial waiting time before retransmission
§ Definition
§ Backoff slots are the slots that a packet can be transmitted after a failed
transmission (collision)
§ probability of selecting a slot is usually uniform
§ KL will be referred to as number of backoff slots
With qr
small 1!
With Backoff
Possible Slots
high 1!
Medium
Medium
Time
Time
New Arrival
Collided User
KL = 3
93
Backoff Concept
94
Slotted ALOHA: Backoff Analysis
§ bounded delay for each retransmission:
à limiting waiting time before retransmitting again
§ Harder to model since every backlogged packet has a different
Cumulative Density Function (CDF)
probability to transmit on the next slot.
95
Slotted ALOHA: Backoff Analysis
§ Assumption
§ New transmissions are frozen when a collision occurs
§ Probability that - users out of 51 collided users select the same BO
slot
§ 7(*) =
,(
+
%
+
12
1−
,('+
%
12
where the probability of a collision is 70 = 1 − 7 0 − 7 1
§ Collision probability (from above equations)
§ 70 = 1 −
12'%3,(
12
1−
%
,('%
12
96
Slotted ALOHA: Backoff Analysis
§ Example: B = 10 users; CD is
varied
§ There exists an optimal BO
§ Discussion
§ As typically we do not know N
and also N may vary over time,
we can easily choose BO
wrongly
§ In the example (new arrivals
are not considered!):
§ throughput varies with BO size
§ if we choose a low BO size, a
high number of users collide
and with additional new arrivals,
we are stuck on the left side of
the curve
§ Dynamicity is needed!
Backoff Size
97
Slotted ALOHA: Backoff Analysis
§ Recall
§ Distributed: Every user takes the decision on its own
§ Centralized: Every decision is given by a central coordinator
§ How can dynamicity be involved in a distributed system?
§ No one knows how many users have collided
§ Each user knows how many times it has collided
§ This information reflects the busy state of the channel
§ Ideas to integrate this into a dynamic BO?
98
Exponential Backoff Concept
§ Select @A = B randomly after every collision uniformly distributed
in the interval 0 ≤ B < D
§ Definition
§ 1 Number of collisions experienced by a packet
§ I! initial KL size
§ I = min(I+ , I)&4 )
§ I+ = 25 I!
§ D#$% and D/ are preset (e.g., network admin)
§ D#$% = 2# D/ , where 2 is the limit on increasing @A
99
Exponential Backoff Concept
4
to
5
U# = 1 JNIOJ
U = 2" U# = 4 JNIOJ
U = 2$ U# = 2 JNIOJ
100
Exponential Backoff Concept
101
Exponential Backoff Concept Analysis
§ Markov Chain for a single User [Bia00]
Backoff stage, i.e., number of experienced collisions
chosen backoff slot from [0, W]
p collision probability
p/Wi gets smaller
with larger Wi
(at higher stages)
After a successful
transmission the model
starts at backoff stage 0
See [Bia00] G. Bianchi: Performance Analysis of the IEEE 802.11 Distributed Coordination Function,
IEEE Journal on Selected Areas in Communications, VOL. 18, NO. 3, MARCH 2000.
102
Exponential Backoff Concept Analysis [Bia00]
§ Assumptions
§ Constant collision probability R
§ Contenders on the channel 3
§ Maximum backoff stage m; (I)&4 = 2) I! )
§ Transmission probability of a node in a randomly chosen time slot
§ +5 =
'(+&'7)
+&'7 9W ,+ ,79W (+& '7 8 )
§ Success Probability
*;X +&;X YZ[
§ +: =
+& +&;X Y
;)<=$=->-5? 5A$5 B0!5 <*3 1<*53*C3) 5)$*!#-5!
;)<=$=->-5? 5A$5 $5 >3$!5 <*3 1<*53*C3) 5)$*!#-5!
See [Bia00] G. Bianchi: Performance Analysis of the IEEE 802.11 Distributed Coordination Function,
IEEE Journal on Selected Areas in Communications, VOL. 18, NO. 3, MARCH 2000.
103
Exponential Backoff Concept
§ 7 = 0.3
§ 2=8
§ Discussion
§ initial backoff size
has huge impact
§ Large initial
backoff size à
higher success
probability, but at
the cost of delay
104
Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Data Networking
Lecture 5: Slotted ALOHA: Tree Algorithms
Part 5a: Basic Tree Algorithm (TA)
Wolfgang Kellerer
© 2023 Technical University of Munich
105
Recap
§ Slotted ALOHA Stability Analysis
§ Retransmission probability: 8(
§ Backoff Concept @A
§ Limiting the number of possible slots for retransmission
§ Exponential Backoff
§ Consider number of own previous collisions as indication for number of
other users à dynamically adapt BO
§ +, I! , R
106
Recap
§ Is the exponential backoff adaptive enough?
§ Why do we use “base 2“?
§ High inefficiency if we increase it (delay increase)
§ How can we further guarantee stability?
§ Limit the maximum number of retransmissions?
§ Find a way to resolve collisions „safely“ by understanding how many
collisions occurred?
107
What is covered in this lecture
§ Maximum number of retransmissions ;
§ Packet Drops
§ Effect on Stability
§ Tree Resolution
§ Binary Tree
§ Improvements
§ Optimal Dynamic Tree
§ Modified Tree Algorithm
§ First Come First Save (FCFS)
§ Reading
§ [Bertsekas, Gallager] chapter 4.3
§ 4.3.1 Tree Algorithms
§ 4.3.2 FCFS
§ Tyagi, Revak R., et al. "Impact of retransmission limit on preamble contention in LTEAdvanced network" IEEE Systems Journal 9.3 (2015): 752-765.
108
Tree Resolution
§ We have used multiple techniques to avoid collisions
§ Can we prioritize the collided users to resolve collisions as soon as
possible? We need to understand the number of collided users
and treat them separately
§ Assumption
§ Block all incoming traffic during a resolution
§ Instead of overlapping @A slots, provide non-overlapping slots
§ Decide on BO separately to avoid overlapping slots
§ This is called a Tree Resolution
subset
subset
collision
subset
subset
109
Tree Resolution
§ Assumption
§ Users run this algorithm independently (distributed MAC!)
§ Instant feedback is provided to every backlogged user (0, 1, e)
§ Definition
§ Branch Size D: Number of slots provided in each level of tree (e.g., 2 for binary tree)
§ Rules after the initial collision
b is an internal counter for each node to
independently know when it can transmit
1. Randomly select a backoff slot E where 0 ≤ E < D, e.g., E ∈ [0,1] for D = 2
2. If E = 0, transmit
a)
b)
If a success (1) is observed. Done.
If a collision occurs (e): Go back to step 1.
3. Else wait for the feedback. Feedback leads to an adaptive resolution:
a)
b)
If a success (1) or idle slot (0) is observed decrement 9 by 1. Go back to step 2.
If a collision is observed (e) increment 9 by (: − 1) (see note below). Go back to step 3.
Note
§ \ is only initially drawn from [0, Q-1[ and every time a collision occurs after sending
§ for \ ≥ 1 the packet waits and observes the (0, 1, e) feedback
§ \ is then used as a counter to make sure that a packet that is separated to a “waiting branch“ knows when it
can transmit
110
Tree Resolution: Binary Tree
Users select independently (distributed MAC) in
which subset they belong (. ∈ [0,1]) and transmit
once the corresponding slot comes. For each
collision they select (and separate thus) until they
are so much separated that no collision occurs.
Note: every node maintains its own tree based on
its own status and the observed feedback – the
counter b helps to draw the tree
111
Tree Resolution: Binary Tree
New Arrival
Medium
1
2
3
3
2
Collided User
1
2
1
3
1
3
1
3
Time
Tree Slots – Level 1
R
L
LL
Tree Slots – Level 2
LR
LRL
Tree Slots – Level 3
LRR
Tree Slots – Level 4
LRRL
LRRR
1
Feedback
e
e
1
e
0
e
1
V1
0
0
I
0
0
trans
U2
I
O
0
trans
§ Tree Example of previous figure: Branch size , = 2
§ Note: the users do not know, how many are in each subset!
V3
O
1
0
I
0
I
0 trans
112
Tree Resolution
slide with
rules
113
Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Data Networking
Lecture 5: Slotted ALOHA: Tree Algorithms
Part 5b: Improvement concepts for Tree Algorithms
Wolfgang Kellerer
Fidan Mehmeti
© 2023 Technical University of Munich
114
What is covered in this lecture
§ Maximum number of retransmissions ;
§ Packet Drops
§ Effect on Stability
§ Tree Resolution
§ Binary Tree
§ Improvements
§ Optimal Dynamic Tree
§ Modified Tree Algorithm
§ First Come First Save (FCFS)
§ Reading
§ [Bertsekas, Gallager] chapter 4.3
§ 4.3.1 Tree Algorithms
§ 4.3.2 FCFS
§ Tyagi, Revak R., et al. "Impact of retransmission limit on preamble contention in LTEAdvanced network" IEEE Systems Journal 9.3 (2015): 752-765.
115
Tree Resolution: Improvement concepts
§ Using an arrival rate estimation (“Optimal Dynamic Tree
change the initial branch
only
§ Change the initial branch size 9 for an optimal split
Algorithm“)
§ It can be assumed that branch size equals to the number of collided
users
§ [Capetanakis] proves that this boosts the throughput up to 0.43
§ The success probability for the initial split can be defined as a bins and
balls problem
§ With S users, probability of success for a slot is
S
7./00 =
1
1
9
1 ,'%
1−
9
Capetanakis, John. "Tree algorithms for packet broadcast channels." IEEE transactions on information theory 25.5 (1979): 505-515.
116
Tree Resolution: Improvement concepts
§ The success
probability depends
on the
4
ratio
O
§ Definition
§ number of slots used
by tree resolution: T
§ This can be used to
estimate the initial
branch size
§ E = %F (of interest is
the case E > 2)
§ ,- <
P,/.R
≤ ,- + 1
+.+S
Other (upper) branches (subsets): L and R
117
Tree Resolution: Improvement concepts
§ Using information on the tree (“Modified Tree Algorithm”)
§ Assumption: binary tree
§ If an idle slot follows a collision
§ Following slot is a “foreseen“ collision
§ Split again before transmitting
§ [Massey] provided this as an improvement to [Capetanakis]
§ Further increased the throughput to 0.46
Massey, James L. "Collision-resolution algorithms and random-access communications." Multi-user communication systems.
Springer Vienna, 1981. 73-137.
118
Tree Resolution: Improvement concepts
§ Initial collision in slot 1
§ Nobody chose slot 2 à collision in other leg is “foreseen“
§ Split before transmitting and save slot 3 for later
§ And so on...
§ In this example two foreseen collisions could be skipped
119
Tree Resolution: Binary Tree
New Arrival
Medium
1
2
3
3
2
Collided User
1
2
1
3
1
3
1
3
Time
Tree Slots – Level 1
R
L
LL
Tree Slots – Level 2
LR
LRL
Tree Slots – Level 3
LRR
Tree Slots – Level 4
Feedback
e
e
1
e
0
e
LRRL
LRRR
1
1
0
§ Which collision can be skipped in the previous example?
120
Tree Resolution: Improvement concepts
§ Using information of packet arrival time
§ First Come First Served (FCFS) algorithm
§ Simultaneously proven by [Gallager] and [Tsybakov, Mihailov]
§ Releases the blocked traffic assumption
§ The throughput increases to 0.487
§ Refer to paper and book for more details
B.S. Tsybakov and V.A.Mihailov,"Slotted multiaccess packet-broadcasting feedback channel, "Problemy Peredachi Informatsii, vol. 14,
PP· 32-59, October-December 1978.
R. G. Gallager, „Conflict resolution in random access broadcast networks," in Proc. AFOSR Workshop Commun. Theory Appl. ,
Provincetown, MA, Sept. 1978, pp. 74-76.
121
Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Data Networking
Lecture 6: Collision Avoidance Techniques
Part 6a: Pre-Backoff and Access Barring
Wolfgang Kellerer
Fidan Mehmeti
© 2023 Technical University of Munich
122
Recap
§ Limit maximum number of retransmissions H
§ Drops
§ Effect on Stability
§ Tree Resolution
§ Binary Tree to separate collided users and resolve collisions
§ Improvements
§ Optimal Dynamic Tree
§ Modified Tree Algorithm
123
Recap
§ So far, we have evaluated collision resolution techniques
§ Can we avoid collisions (pro-actively)
Collision Avoidance Techniques
124
What is covered in this lecture
§ Collision Avoidance
§ Pre-Backoff
§ Access Barring
§ Carrier Sensing
§ CSMA/CA
§ 1-persistent
§ p-persistent
§ non-persistent
§ Reading
§ [Bertsekas, Gallager] chapter 4.4 Carrier Sensing
§ 4.4.1 CSMA Slotted Aloha
§ 4.4.2
§ 4.5
125
Collision Avoidance: Pre-Backoff
§ Definition
§ Pre-Backoff: All users select a backoff slot before transmitting
§ Selection is based on a broadcast signal indicating the number of
users (from a central coordinator)
§ Useful if the probability of collision is high and and the number of
collided users can be estimated
126
Collision Avoidance: Pre-Backoff
§ Initial collision is avoided
§ Analysis of this technique depends heavily on the collision
resolution used following the avoidance
127
Collision Avoidance: Access Barring
§ Definition
§ Access Barring: All users toss a biased coin (choose a number uniformly
between 0 and 1) before transmitting, they can only transmit if this is
larger than the Access Barring Factor R61
§ Assumption
§ R61 is known by all users
§ Useful if the probability of collision is high
§ This allows only a small ratio of initial users to reach the system
§ Note: Access barring and pre-backoff are similar
128
Collision Avoidance
Pre-Backoff
Access Barring
≤
4
129
Homework
Consider
§ What would help a lot to avoid collisions? Think about how
humans avoid collisions while talking to each other on the phone
130
Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Data Networking
Lecture 6: Collision Avoidance Techniques
Part 6b: CSMA/CA
Wolfgang Kellerer
Fidan Mehmeti
© 2023 Technical University of Munich
131
Carrier Sense Multiple Access (CSMA)
§ Further information about transmissions can further decrease the
collision probability
§ Assumption
§ Every user can hear (= sense) transmissions of any other user
§ Listen to the channel before transmitting
Carrier Sense Multiple Access (CSMA)
§ Advantage: we are not limited to a slot size and do not need to
synchronize
132
CSMA/CA: Collision Avoidance
§ We relax the following
assumptions:
§ Packet size is equal to slot size
§ All users must be synchronized
§ In synchronized transmission:
no further gain occurs
Note: In the following, we assume a minislotted
structure (sensing time/interval) as well as unit sized
packets to be able to conduct a mathematical
analysis of CSMA/CA.
133
CSMA/CA: Collision Avoidance
§ Definition
§ E: Channel bit rate
§ F: Detection Time
§ G: Size of a packet or slot
§ H: Ratio of the time sensed compared to a full packet (or slot)
§<=
>
>
E>
=) =
?/5@AB B,+A
D*
F
If
are users
§ Even though we have no slots, use of < creates a minislotted
structure, but the minislots are not the same size as packets
(idle slot < transmission slot)
§ Assumption
§ We have no half busy H slot
§ It is either full or empty (so we can detect)
o
III
drat
B
do
Bwill hear
than
earlier
A
F Wealth
propagation delay
geographical distance 134
CSMA/CA: Collision Avoidance
B
ftp djd fidleMeriod
idleperiod
§ Infinite set of nodes and Poisson arrivalsI busyperiod idleperiod
userscanchoose
whether to send
§ How long does a packet have to wait before transmission? Dewan
§ If medium is free à T
§ If medium is busy à 1 + T
idleperiod
ab
edtÉid
Note: we assume to sense permanently, so waiting time is equal
to one packet size (=1) plus 3
§ Assumption
§ we have V backlogged nodes and a fixed W+ and X
§ Expected delay before transmitting is
§ Y Z = T[,- + 1 + T [-
§ J_ = 1 − J9_
trans
§ Y Z = T(1 − [- ) + 1 + T [- = T + [-
a is
Éi
it
§ The probability for no transmission J9_ is no new packets arrived in H
(= 6 %"` ) and no backlogged user transmitted (= 1 − :4 9 )
gf
é
§ [- = 1 − ] ./0 1 − W+ ,
Note: The presented analysis is valid for the so-called 1-persistent CSMA/CA (see later). The description of the
different CSMA/CA variants in the [Bertsekas, Gallager] book differs from the usual understandings of these
protocol versions. However, the mathematical analysis presented here (and in the book) is correct and
corresponds to 1-persistent CSMA/CA.
135
CSMA/CA: Collision Avoidance
in state n (sensing time – incl. busy slots)
§ = : = < + 1 − + ('G 1 − 30 )
§ We can calculate the new arrivals during state transitions time #3 to
see if change in backlog is stable: #3 = < + 1 − + ('G 1 − 30 ) #
§ Probability of success is the sum of a single user served from backlog
while there is no new arrival or a new arrival while no backlogged user
transmits
§ .3455 = + ('G )" 30 1 − 30 ()(") + #<+ ('G 1 − 30 )
)!"## no backlog (in *)
Pix K CEI
Ka
H1 )
) and 1 − 30 ) ≈ + (H1 )
("(H1 )
§ .3455 ≈ + ('G + (H1 ) #< + 30 2 = ? 2 + (I()) and ? 2 = #< + 30 2
§ .3455 = + ('G 1 − 30 ) (#< +
§ :) = #3 − .3455 (Drift)
§ :)
≈ # < + 1 − + (I )
Drift is negative if # <
Arto
− ? 2 + (I())
I ) A 23 #
G-" (A 23 #
a 9 ! !%(')
§ Departure rate: `bc %! !% ' =
p
(attempt rate)
is x i
e
so
Let‘s observe this!
expected number of departures during sensing time
expected duration of sensing time
136
CSMA/CA: Collision Avoidance
(attempted transmission rate g) – not backlog (4) as with slotted ALOHA!
§ For small I the maximum departure rate is 1/(1 + 2I) at M / =
2I
137
expected number of departures during sensing time
expected duration of sensing time
CSMA/CA: Collision Avoidance
d . K %& '
3 + 1 − K %& '
> = 0.35, 8( = 0.01
3 varied from 1 to 100
If
V 3 ( '7 *
><
W + 1 − ( '7 *
then the Drift < is
negative
§ Idle slots (I) heavily affect the performance of CSMA
§ If sensing frequency is too high, it is a huge overhead
§ Sensing increases stability
138
Collision Avoidance: CSMA Slotted ALOHA
§ There are multiple variations of CSMA depending on the decision taken after
sensing a busy carrier
§ Non-Persistent CSMA (non-aggressive method)
§ Sense one J slot
§ If idle: transmit packet (in case of collision start retransmission procedure, e.g., backoff or retransmit with
probability 1!
§ If not idle: wait random or constant time and try again
§ 1-Persistent CSMA (aggressive!)
§ Sense one J slot
§ If idle: transmit packet (in case of collision start retransmission procedure, e.g., backoff or retransmit with
probability 1!
§ If not idle: wait until ongoing transmission is detected to be idle and transmit packet (f = 100%)
§ p-Persistent CSMA
§ Sense one J slot
§ If idle:
§ transmit with probability 5
§ delay transmission by 6 and try again with probability 1 − 5
§ If not idle: packet is considered to be backlogged è start retransmission procedure, e.g., backoff or
retransmit with probability 1!
§ Note: K ≠ M+
Source: L. Kleinrock and F. Tobagi, "Packet Switching in Radio Channels: Part I - Carrier Sense Multiple-Access Modes and Their Throughput-Delay
Characteristics," in IEEE Transactions on Communications, vol. 23, no. 12, pp. 1400-1416, December 1975, doi: 10.1109/TCOM.1975.1092768.
139
Comparison of CSMA Protocols
Initial attempt sensed busy
§ non-persistent CSMA
start
retransmission
procedure
§ 1-persistent CSMA
§ p-persistent CSMA
Medium sensed
busy (duration &)
Medium sensed
idle (duration &)
!
!
!
direct
transmission
attempt
!
!
Ongoing transmission
(duration 1)
Wait random or
constant time,
sense again
140
Collision Avoidance: p-persistent CSMA
Start
Packet
to Send
Channel
free?
No
No
No
Retransmission
Procedure
Yes
Roll K,
0 ≤ K, ≤ 1
Is K, < K?
Yes
No
Transmit
Success
Yes
Stop
141
Comparison of CSMA protocols
for the detection of a collision, the service time (= packet length)
has to be larger than the roundtrip time, see lecture 8
142
Recap
§ We can detect a busy signal during a minislot
§ But if propagation delay causes delay in these detections, packets
are lost before detection
§ Why don‘t we use a busy tone as short as a minislot I, and
transmit our packet after we are sure every user heard the busy
signal?
Reservation Techniques
143
Reservation Techniques
§ Definition
v
β
§ X: Busy tone duration used for reservation
Srm
T
§ 4( : Maximum normalized throughput (i.e., FCFS:0.48, Slotted ALOHA
0.37, TDM:1)
§ 4: Maximum normalized throughput for reservation technique
§N=
+
g
+,h
i
§ If O is small enough the overhead compared to throughput is
negligible
§ Optimal O should be as large as I in order to avoid extra overhead
and guarantee detection of the busy signal
144
Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Data Networking
Lecture 7: Case Study: 802.11 Wireless LAN
Part 7a: 802.11 ACK Mode
Wolfgang Kellerer
© 2023 Technical University of Munich
145
Recap
§ Collision Avoidance
§ Pre-backoff
§ Access Barring
§ Carrier Sensing
§ CSMA/CA
§ Non-persistent, 1-persistent, p-persistent
§ Reservation
146
What is covered in this lecture
§ IEEE 802.11 DCF
§ ACK Mode
§ RTS/CTS Mode
§ IEEE 802.11
§ Standard Specifications
§ MAC implementations
§ Reading
§ [Kurose, Ross] chapter 6
§ 6.3 (up to not including) 6.3.4
§ G. Bianchi, Performance Analysis of the IEEE 802.11 Distributed
Coordination Function. Selected Areas in Communications, IEEE
Journal on 18 (3), 535-547
147
IEEE 802.11 DCF – a CSMA/CA Specification
§ The distributed coordination function (DCF) defines two different
operation modes
§ ACK mode
§ RTS/CTS mode
§ In the ACK mode, an acknowledgement packet is added on top of the
CSMA/CA mechanism that was introduced in the previous lecture
§ In the RTS/CTS mode, an additional reservation process is added to
mitigate the influence of an erroneous transmission
§ Definitions
§ CW: Contention Window is the name of the maximum backoff size
§ IFS: Inter Frame Space; this is a pause time between the transmission of
two messages. Two versions are used:
§ SIFS: Short IFS
§ DIFS: DCF IFS
§ DIFS > SIFS
§ Backoff slot: This corresponds to H, the time needed to detect an ongoing
transmission on the channel.
148
IEEE 802.11 DCF – ACK Mode
§ Freeze backoff counter if medium is sensed busy during the backoff period, i.e., the
backoff counter is only decremented if there was no activity during the backoff slot!
§ Ensure at least DIFS silence before transmitting and before decrementing the
backoff counter
§ ACK loss causes high inefficiency
§ Retransmit even though the data is received
From: G. Bianchi, Performance Analysis of the IEEE 802.11 Distributed Coordination Function. Selected Areas in
Communications, IEEE Journal on 18 (3), 535-547
149
IEEE 802.11 DCF – ACK Mode
Yes
Decrease
backoff counter
Start
\ = 0?
No
No
Packet to
Send?
Yes
Channel
sensed free
for DIFS?
No
No
Yes
Channel
sensed busy
during backoff
slot?
Sense channel
idle for DIFS
Sense medium idle for
DIFS; Afterwards,
draw random backoff
counter b
0 ≤ \ ≤ jU
Transmit
ACK
received?
Freeze backoff
counter
Yes
No
Note: jU depends on the
number of experienced
collisions, i.e., the
exponential backoff scheme
is employed in IEEE 802.11
DCF.
Yes
Another
packet to
send?
Yes
Note: A missing reception of an ACK
packet is understood via the ACKtimeout
interval.
No
Stop
150
Hidden Station Problem
§ One of the assumptions for CSMA is that every user can hear each other
§ What if this is not the case (as in real-life wireless communications)?
A
A’s signal
strength
B
C
C’s signal
strength
§ Signals of both stations cannot be heard by each other
§ If both of them want to communicate with the AP this will cause a collision
151
Discussion
§ How could we overcome the hidden station problem?
§ Consider the “reservation technique” that we have discussed at the
end of chapter 6
152
Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Data Networking
Lecture 7: CSMA/CA and 802.11 Wireless LAN
Part 7b: 802.11 RTS/CTS Mode
Wolfgang Kellerer
© 2023 Technical University of Munich
153
Exposed Station Problem
§ One of the disadvantage of CSMA is that every user may hear other
conversations
D
A
B
C
§ B wants to send a message to A and C wants to send a message to D
§ B blocks C due to CSMA while both could have communicated
§ Since B and D also A and C are not visible to each other. A collision would not
have occured.
154
IEEE 802.11 DCF – RTS/CTS Mode
§ A two-way reservation process is introduced:
§ Message from Client to Host à Request to Send (RTS)
§ Message from Host to Client à Consent to Send (CTS)
§ Detailed description of the RTS/CTS mode
§ Before each transmission send an RTS
§ Only transmit after the reception of CTS
§ RTS and CTS include a Network Allocation Vector (NAV) that
broadcasts the duration of the transmission - this will be used to pause
BO counters
§ by overhearing RTS/CTS (including NAV), any station can calculate the for how
long the channel is busy
§ Wait SIFS time between each step
§ Wait DIFS after ACK
155
DCF RTS/CTS mode
DIFS
§ NAV: Network Allocation Vector (by overhearing RTS/CTS any
station can calculate for how long the channel is busy)
From: G. Bianchi, Performance Analysis of the IEEE 802.11 Distributed Coordination Function. Selected Areas in
Communications, IEEE Journal on 18 (3), 535-547
156
IEEE 802.11 DCF – RTS/CTS Mode
Yes
Decrease
backoff counter
Start
; = 0?
No
No
Packet to
Send?
Yes
Channel
sensed free
for DIFS?
RTS/CTS
(NAV)
received?
No
No
Yes
Transmit RTS
CTS
received?
Freeze backoff
counter for NAV
duration
Yes
No
Sense medium idle for
DIFS; Afterwards,
draw random backoff
counter b
0 ≤ ; ≤ <=
Yes
ACK
received?
Transmit
No
Stop
Another
packet to
send?
Note: <= depends on the
number of experienced
collisions, i.e., the
exponential backoff scheme
is employed in IEEE 802.11
DCF.
Note: A missing reception of an
ACK packet is understood via the
ACKtimeout interval.
Note: A missing reception of a CTS
packet is understood via the
CTStimeout interval.
Yes
No
Sense channel
idle for DIFS
Yes
157
DCF RTS/CTS mode
A
B
AP
RTS(B)
RTS(A)
reservation collision
RTS(A)
CTS(A)
CTS(A)
DATA (A)
defer
(via NAV)
time
ACK(A)
ACK(A)
Source: Computer Networking: A Top-Down Approach, Jim Kurose und Keith Ross, Addison-Wesley, 2012, 6th Edition.
Also web based Invocom learning materials by University of Poznan are used and can be found from:
http://www.invocom.et.put.poznan.pl/~invocom/C/P1-4/p1-4_en/p1-4_7_1.htm
158
Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Data Networking
Lecture 7: CSMA/CA and 802.11 Wireless LAN
Part 7c: 802.11 analysis
Wolfgang Kellerer
Fidan Mehmeti
© 2023 Technical University of Munich
159
DCF RTS/CTS Analysis – refer to [Bia00]
160
Recap: Exponential Backoff Concept Analysis
§ Markov Chain for a single User [Bia00]
Backoff stage, i.e., number of experienced collisions
chosen backoff slot from [0, W]
p collision probability
p/Wi gets smaller
with larger Wi
(at higher stages)
After a successful
transmission the model
starts at backoff stage 0
See [Bia00] G. Bianchi: Performance Analysis of the IEEE 802.11 Distributed Coordination Function,
IEEE Journal on Selected Areas in Communications, VOL. 18, NO. 3, MARCH 2000.
161
Recap: Exponential Backoff Concept Analysis [Bia00]
§ Assumptions
§ Constant collision probability R
§ Contenders on the channel 3
§ Maximum backoff stage m; (I)&4 = 2) I! )
§ Transmission probability of a node in a randomly chosen time slot
§ +5 =
'(+&'7)
+&'7 9W ,+ ,79W (+& '7 8 )
§ Success Probability
*;X +&;X YZ[
§ +: =
+& +&;X Y
;)<=$=->-5? 5A$5 B0!5 <*3 1<*53*C3) 5)$*!#-5!
;)<=$=->-5? 5A$5 $5 >3$!5 <*3 1<*53*C3) 5)$*!#-5!
See [Bia00] G. Bianchi: Performance Analysis of the IEEE 802.11 Distributed Coordination Function,
IEEE Journal on Selected Areas in Communications, VOL. 18, NO. 3, MARCH 2000.
162
DCF RTS/CTS Analysis – refer to [Bia00]
§ Definition
§ M: normalized system throughput
§M=
k[m:nop:q &9rp4s:_&p9 _4:9ts&__!q &9 : top_ _&s!]
k[o!9a_v pr : top_ _&s!]
§ for ideal MAC: M =
k[w]
x-
= E with E[P]: average packet payload size
Probability to transmit successfully in a slot (.B0 .3 ) multiplied with E[P]
§A=
2?1 2@ P[2]
2?1 2@ S@ - "(2?1 T-2?1 ("(2@ )S*
5t = 5tz{{ (success probability)
5_4 = 1 − 1 − 5_ 9 (at least one transmission,
i.e., not none of n stations transmit)
Pt transmit probability of each of the n stations
Expected slot time
§ with probability J_4 Jt a packet of sending time Ot is successfully transmitted
§ with probability 1 − J_4 an idle slot that lasts P
§ with probability J_4 (1 − Jt ) a collision occurs that lasts Oy
163
DCF RTS/CTS Analysis – refer to [Bia00]
C
longer
res
To
shorter v
§ )5 = ,)4 + )8 + <%Y4
§ ). = ,)4 + )8 + 4%Y4 + 1)4 + )8 + 4%Y4 + <Z)Z + )8 + 4%Y4 + Z1[ + )8
+ <%Y4
Note: The collision durations/scenarios and the subsequent mathematical analysis assume that there exist no
hidden or exposed terminals. Additionally, some simplifying assumptions like neglecting the ACK and CTS timeout
periods are taken. For further details, see [Bia00].
164
DCF RTS/CTS Analysis – refer to [Bia00]
§ 7y = 879 + 7m + :;<9
§ 7t = 879 + 7m + 9;<9 + =79 + 7m + 9;<9 + :>7> + 7m + 9;<9 + >=? + 7m + :;<9
9w. c%w. '!/
§ 5| = c% c%w '
.
(probability that exactly one station transmits on the channel,
If
I
conditioned on the fact that at least one station transmits)
x
§ Re-arrange 9 and substitute 7y ∗ = }1
§ 9=
k[w]
51
/
2.3!/ 4 6
x-%x1b}
2-
§ S is max when we maximize
6 is an idle slotduration
maximum achievable saturation throughput
9w. c%w. '!/
= x ∗b c%w '(c%x ∗)
/
1
.
1
%c bx ∗
w-
2.3
1
§ Differentiating this w.r.t 5_ we get 5_ ≈
Pt
c
9
ci df.fi kapmg
57∗
8
for maximum throughput
where P is collision probability
the
165
Wma
DCF RTS/CTS Analysis – refer to [Bia00]
§ +5 ≈
+
*
~• ∗
Ä
2MWo
bye
can be used to calculate the optimal transmission probability
that can be obtained through selecting the optimal backoff size and
exponential limit depending on the number of users
§ RTS – CTS advantage with increasing number of stations
166
Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Data Networking
Lecture 7: CSMA/CA and 802.11 Wireless LAN
Part d: 802.11 Operation
Wolfgang Kellerer
© 2023 Technical University of Munich
167
IEEE 802.11 Modes
Infrastructure Mode and Ad-Hoc Mode
Internet
§ Infrastructure Mode
§ Wireless host communicates
with access point (AP)
§ AP provides access to the
Internet (forwards packets)
§ Basic Service Set (BSS)
contains:
§ wireless hosts
§ AP
hub, switch
or router
BSS 1
§ Ad-Hoc Mode
§ hosts only
Note: an 802.11 Access Point runs the same distributed MAC protocol as all the wireless hosts;
it is not a central controller like a base station in cellular mobile networks such as 4G/LTE, 5G.
BSS 2
IEEE 802.11 Association
§ In infrastructure mode the host
§ must associate with an AP
§ scans channels, listening for beacon frames containing AP’s name
(SSID) and MAC address
§ selects AP to associate with
§ may perform authentication
§ will typically run DHCP to get IP address in AP’s subnet
§ Each AP communicates only on a single channel out of 11-14
channels in IEEE 802.11
§ Number of channels used is country-specific
169
IEEE 802.11Channelization
§ 802.11: 14 channels available in 2.4 ISM band
§ Total bandwidth is 85 MHz à 2.4GHz - 2.485GHz
§ The spectrum is divided into 14 channels
§ Each with 22 MHz bandwidth
§ They overlap - almost 5
§ Interference possible: a channel can be the same as the one chosen by the
neighboring AP or highly overlapping
§ See for yourself by using a WiFi Analyzer App!
ImageSource:http://www.extremetech.com/computing/179344-how-to-boost-your-wifi-speed-by-choosingthe-right-channel
170
802.11 Rate Adaptation
10-1
10-2
§ base station and mobile
BER
dynamically change
10-3
10-4
transmission rate (physical
10-5
layer modulation technique)
10-6
as mobile moves, SNR varies
10-7
§ SNR: Signal to Noise Ratio
QAM256 (8 Mbps)
QAM16 (4 Mbps)
BPSK (1 Mbps)
operating point
10
20
30
SNR(dB)
40
1. SNR decreases, BER
increases as node moves
away from base station
2. When BER becomes too
high, switch to lower
transmission rate but with
lower BER
171
IEEE 802.11 Operation
§ Carrier Sense can be easily used since every host is connected to
an AP and knows which channel it is using
§ Listen on that channel before transmitting
§ But if some other AP can use the same channel as we do, how do
we know that we are communicating with the right AP?
§ For a non-malicious AP: Addressing takes care of this
§ For a malicious AP: Security solutions are necessary
172
IEEE 802.11: Addressing
2
2
6
6
6
frame
address address address
duration
control
1
2
3
Address 1: MAC address
of wireless host or AP
to receive this frame
2
6
seq address
4
control
0 - 2312
4
payload
CRC
Address 4: used only
in ad hoc mode
Address 3: MAC address
of router interface to which
AP is attached.
Address 2: MAC address For easy integration to
of wireless host or AP
Ethernet!
transmitting this frame
Not necessary for 1 hop!
173
IEEE 802.11: Addressing
R1 router
H1
Internet
R1 MAC addr H1 MAC addr
dest. address
source address
802.3 frame
AP MAC addr H1 MAC addr R1 MAC addr
address 1
address 2
address 3
802.11 frame
174
Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Data Networking
Lecture 8: IEEE 802.3 Ethernet
Part 8a: CSMA/CD
Wolfgang Kellerer
Fidan Mehmeti
© 2023 Technical University of Munich
175
Recap
§ CSMA
§ 1-persistent CSMA with exponential backoff
§ CSMA/CA
§ ACK Mode
§ RTS/CTS Mode
§ IEEE 802.11
§ MAC implementation and operation
§ 802.11 Layer 2 frame → Ethernet 802.3 frame
176
What is covered in this lecture
§ CSMA/CD: Collision Detection
§ Ethernet IEEE 802.3
§ Switches/Bridges
§ Token Ring IEEE 802.5
§ Reading
§ [Bertsekas, Gallager] chapter 4.5
§ 4.5.2: LAN CSMA/CD and Ethernet
§ 4.5.3: LAN Token Rings
177
Collision Detection
§ Physical property of a cable enables sensing while transmitting
§ This transforms our Carrier Sensing concept by adding Collision
Detection (CD):
§ Detect the collision and backoff as soon as possible before transmitting
the whole packet
§ This decreases the collision overhead
§ Most commonly used for Ethernet IEEE 802.3 (cable-based LAN)
Carrier Sense Multiple Access / Collision Detection (CSMA/CD)
178
Collision Detection (general)
§ Discussion
§ the gain depends on the
proportion of the collision
detection W to the packet size
§ in Local Area Networks (LANs),
propagation delay )8 is small,
which enables fast detection of
collisions
Backoff
in Eth: exp. BO
179
CSMA/CD: Performance Analysis
§ The analysis is similar to 1-persistent CSMA
§ For the packet waiting time before a transmission, we had:
§ If medium is free à H
§ If medium is busy à 1 + H
§ We add:
W: ratio of the time sensed compared
to a full packet (“subslots“)
§ If a collision occurs à 2H (two colliding packets will stop being sent after
sensing the collision, at most after 2H = sense idle then sense collision)
§ Assumption: we have 2 backlogged nodes and a fixed 30 and #
§ Expected delay before transmitting is
§ = : = <.)B + 1 + < .3 + 2<.5 = (1 + .5 )< + .3 where 1 = .)B +.3 + .5
§ Since .5 = 1 − .)B + .3 = 1 − (1 + ? 2 )+ (I())
BEER pi
§ = : = 1 + 1 − 1 + ? 2 + (I()) < + ? 2 + (I())
from 1-persistent CSMA:
A B = $& + !4 B and
5| = 5tz{{ = A(B)( %a(9)
180
CSMA/CD - Analysis
§ P < = 2 − & &^(*) − M / & &^ * I + M / & &^(*)
§ Plugging this in the Drift equation <* as with CSMA we get:
§ <* ≈ %[ 2 − 1 + M / & &^(*) I + M / & &^(*) ] − M / & &^(*)
U9 = U W X[Y] arrivals during sending time
§ Thus, via derivation, we observe that <* is maximized with M / = 0.77
§ Plugging this in, we can investigate that
%<
+
+,_._+`
in order to understand the stability region for fixed /
181
CSMA/CD - Analysis
§ Tolerance increased a lot
for high number of
backlogged users
t § I is still a factor for huge
differences
> = 0.35, 8( = 0.01, 3 varied from 1 to 300
><
7 * 9 23 #
$' %37 * 9 23 # :37 * 9 23 #
is plotted
182
CSMA/CD: Collision Detection in practice
§ How does < constrain us in practical implementations?
§ Definition
§ Sending time of a packet is Ot =
Å
y
=
Å
Ç
Z
§ Propagation time is de facto detection time B = 5? = [
x:
(
§ thus H = x
-
§ if we want at least < < 0.5 to be sure that we detect a collision during
our transmission, we have to constrain the use of CSMA/CD to a
maximum range of 25? ≤ 53
§ If we assume a constant G, i.e., a constant data rate, we can fix a
minimum packet size H for a certain cable length range
L
R
2Tp
§ Example: The IEEE 802.3 standard has a minimum frame size of 64
bytes with 10 Mbps for 5 kilometers
183
CSMA/CD: Collision Detection in practice
A sends
full frame
2)8 > ).
frame
B senses
carrier free
B starts sending
B detects collision
and stops sending
A detects
collision
time
A detects collision too late
à A has to wait for higher layer process to detect a missing packet
184
CSMA/CD: Collision Detection in practice
§ If I > 1/2 we cannot differentiate a collision from a successive
transmission!
2)8 ≤ ).
* ≤ 1/2
185
Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Data Networking
Lecture 8: IEEE 802.3 Ethernet
Part 8b: Ethernet
Wolfgang Kellerer
Fidan Mehmeti
© 2023 Technical University of Munich
186
IEEE 802.3
§ How is CSMA/CD actually used?
§ In IEEE 802.3 Ethernet
§ Bob Metcalfe's (alleged) original sketch of the Ethernet system
187
What is covered in this lecture
§ CSMA/CD: Collision Detection
§ Ethernet IEEE 802.3
§ Switches/Bridges
§ Token Ring IEEE 802.5
§ Reading
§ [Bertsekas, Gallager] chapter 4.5
§ 4.5.2: LAN CSMA/CD and Ethernet
§ 4.5.3: LAN Token Rings
188
IEEE 802.3
§ Addresses and PDU lengths with CRC limit the achievable
smallest frame size to 18 bytes
§ For CD to work properly, useless bits have to be padded to reach a
minimum of 64 bytes in total
ImageSource: Foruzan, Behrouz A., Data Communication and Networking, 4th Edition
189
IEEE 802.3
§ Ethernet evolution over years
§ Increasing data rate decreases the range further
§ 10 Gbps à 5 meters maximum range with 64 byte frame size
§ Unless new measures are taken
What can be new concepts?
ImageSource: Foruzan, Behrouz A., Data Communication and Networking, 4th Edition
190
IEEE 802.3 - Bridging
§ The first simple idea to limit collisions is to create subnetworks by bridging
different LANs to each other
§ But why have 4 sub-networks when we can have N for each of the hosts?
ImageSource: Foruzan, Behrouz A., Data Communication and Networking, 4th Edition
191
IEEE 802.3 - Switching
§ A second idea is to connect all the users to a switch to create an
uplink-downlink-only collision Ethernet after a packet leaves the
switch
§ We can achieve this with an N port Layer-2 Switch
§ Collision limit is the distance to switches!
ImageSource: Foruzan, Behrouz A., Data Communication and Networking, 4th Edition
192
IEEE 802.3 – Full-Duplex
§ We can make the system collision free by adding an extra link to
support uplink and downlink simultaneously
ImageSource: Foruzan, Behrouz A., Data Communication and Networking, 4th Edition
193
IEEE 802.3 – Further Improvements
§ Increasing the capacity further requires to play with the
propagation speed of the signal which can be achieved by
migrating to Optical Fiber
ImageSource: IEEE 802 March 2011 Workshop
194
IEEE 802.5 Token Rings
§ The biggest competitor for
Ethernet was the Token Ring
protocol
§ Compared to Ethernet (bus
topology), Token Rings require
a ring topology
§ Token Ring lost the competition
due to lack of interest
195
IEEE 802.5 Token Rings
§ Token Rings use a virtual reservation token passed along to
guarantee collision-free communication
§ There were many improvements on how to increase fairness in
such a scenario
§ Passing the token is a good distributed way to deal with medium
access
§ When it comes to a centralized perspective, reservation can be
done via a central point to allocate resources depending on the
request
Reservation Based Protocols
196
Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Data Networking
Lecture 9: Centralized Scheduling: Polling each user
Part 9a: Polling Protocols
Wolfgang Kellerer
Fidan Mehmeti
© 2023 Technical University of Munich
197
Recap
§ CSMA/CD
§ Decentralized medium access without reservation
§ Ethernet IEEE 802.3
§ Switches / Bridges
§ Token Ring
§ Decentralized medium access with reservation (token)
§ IEEE 802.5
§ How can we further improve channel utilization?
§ Assumption: full knowledge over users
§ Control over the medium access through a central controller
§ Central controller polls all users
198
Polling based MAC Protocols
§ Definition
§ Controller: Central unit that controls the access to the medium
§ Polling categories
§ Fully decentralized polling: Token Ring (IEEE 802.5)
§ No Controller
§ Semi-centralized polling:
Hub Polling
§ Controller polls one user per cycle,
then each host polls the next one
§ Fully centralized polling: Roll Call Polling
§ Controller polls each host
§ We will analyze the last one in order to understand the limits
199
Polling Protocols
§ Reservation protocol for polling
is less complex than distributed
(s)
MAC protocols
§ NACK is an important part so
that the controller is aware that
a user has no packet to send
200
Central Polling (Roll Call Polling)
\] ^
Host *
\]> ^
or
\?
Controller
Polling ^
§ \] ^ = Total polling time at station ^
§ \]> ^ = \? Polling Delay, Propagation Delay
§ \]@ ^ Processing Time of station ^
§ \]A _,
\]@ ^
Transmission time for _ messages
§ \]A _, = _, \9" , if packets have same size: \9" = \9
§ \]B Processing time of controller
\]A (M)
\?
_,
\]B
§ \]C ` = ∑E,D> \](^) Poll Cycle Time with ` users
bC Mean Poll Cycle Time
§ \]
§ \]F = 2\? + \]B + \]@ Constant Waiting Times
Polling ^ + 1
§ \] ^ = \]F + _, \9 Total polling time at station i
201
Polling Protocol: Analysis
§ 5. 0 = 5.! + I, 5f , plugging this into the cycle time
§ 5.E = ∑),*"(5.! + I, 5f ) = 25.! + 5f ∑), I, , where I, is the only
parameter depending on the user 0
JE plugging this back in, we get
§ I, = #, 5.
)S2A
)S2A
=
"(SB ∑#
"(g
C 'C
g
§ Where ! = #53 specifies the utilization, also !, = #, 53 = )
JE = 25.! + 5f 5.
JE ∑), #, which gives 5.
JE =
§ 5.
§ Observations
JE = 25.! which gives us the minimum delay (if no messages
§ min 5.
are to be sent, i.e., 5fC = 0 and all send NACK)
§ Since, after a poll, the medium is fully allocated to the polled host, that
host transmits all its packets, which may cause infinite delay in case
1 < 5f ∑), #,
t
TsE hiÉ
pct
endits
202
Polling Protocols: Analysis
§ Let us assume a % for the whole bus and see how the delay varies
203
Polling Protocol: Throughput Analysis
§ Analyzing the saturation throughput can be done via
§A=
P[?/hij/Z ,)kj0+/B,j) B0/)3+,BBAZ ,) / 3ijB B,+A]
P[iA)IBl jk / 3ijB B,+A]
§ If we consider a slot as a mean cycle time, payload transmitted at that
a slot Tpe
time is ∑), I, 53
§ Then we have
RITE
b
S@ ∑#
C 'C SE(
Mi
)
∑
=
#5
if
1
>
5
#, , otherwise derivation of 5J
3
f
2( is invalid
,
b
SE(
no collision
§ As this system is reservation based, the arrival rate directly reflects
the throughput of the system
D Throughput
§ Collisions do not influence the system efficiency
§ Delay is the important parameter in this scenario. If we have infinite
delay, throughput is not that useful.
§A=
204
Polling Protocol: Delay Analysis
§ Assumptions we had
§ No new packets arrive while a packet is backlogged - not anymore
§ Assumption
§ Arrival buffer has a First In First Out (FIFO) serving characteristic
§ Two types of Delay
§ 5m" : Medium access waiting time, the delay a packet experiences
from its arrival until its host receives a poll (while other hosts are
served)
§ 5m# : Buffer waiting time, the delay a packet experiences while other
packets that previously arrived in the buffer are served
J
J
§ 5J
m = 5m" + 5m# Mean delay of a packet is the sum of mean medium
access waiting time and mean buffer waiting time
205
Polling Protocol: Delay Analysis
206
Polling Protocol: Delay Analysis
T
T
§ 8T
9 = 89+ + 89' Mean delay of a packet is the sum of mean
medium access waiting time and mean buffer waiting time
§ U$ : W5A packet arrives to the host and is placed in the buffer
§ U! : host is polled by the controller - transmission of the first packet
in the buffer starts
§ U7 : all of the W − 1 packets are served - W starts transmission
207
Polling Protocol: Delay Analysis
§ Assumption: The delay for medium access and buffer waiting is
uncorrelated!
Note: This is a very strong (idealized) assumption.
§ Medium access waiting time 8T
9+ for a packet:
`5 − )7# a+ while the minimum is 0 if it arrived just
§ max );% (*) = )7
before being polled
=
`5 >+ = >?*@
§ )7# a+ = )< )7
A
§ )`
;% =
F
*>?A(%'#)
$(%'D)
TI TB Mi
Tw
I
l
208
Polling Protocols: Delay Analysis
§ Assumptions:
§ The packets have constant size
§ Packets have random arrival time
§ We have 1 medium to serve all users
§ Thus, we have an M/D/1 system
§ Buffer waiting time in such a system is:
§ )`
;$ =
>@ D
$(%'D)
Refer to queueing video 3.
§ Thus, in total:
$
$
/8+
1
−
+ 8! $
/8+/ (1 − )
/
8! $
/
/
8T
+
=
9 =
2(1 − $)
2(1 − $)
2(1 − $)
209
Polling Protocol
=OJ(
1−S
S
=OJ( 1 −
+ Ot S
=
OR
É =
2(1 − S)
Ry =
OJ
Ry
= OJ
1−
2
S
= +
Ot S
(1 − S)
In a usual setup (Ot small), the
second addend is negligible
è The mean waiting time is
much less than the mean cycle
time which is an upper bound
on the mean waiting time.
210
Annex
Polling Based MAC: the LIN Bus
211
Vehicular Bus Systems: LIN-bus
Local Interconnect Network:
§ First introduction in 2000
§ Maximum data rate: 20 kbit/s
§ Mostly used for non-safety-critical functions in the comfort domain
§ Simple hardware design à cost-saving
§ LIN-master manages the communication by polling based on schedule tables
212
Vehicular Bus Systems: LIN-bus
Frames:
213
Vehicular Bus Systems: LIN-bus
Usage:
214
Vehicular Bus Systems: LIN-bus
215
Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Data Networking
Lecture 9: Centralized Scheduling: Polling each user
Part 9b: Channelization
Wolfgang Kellerer
Fidan Mehmeti
© 2023 Technical University of Munich
216
Recall: 5 Dimensions of Communication
§ Time: Signal strength may vary over time to propagate different
information. MAC
§ Frequency: Each frequency portion may carry different
information. MAC
§ Energy: Different energy levels may propagate different
information. MAC
§ Space: Exactly same signal can be used at different places to
carry different information. Planning
§ Polarization: Different polarization of the signal can carry different
information. PHY
217
Broadband Communication
§ Definition
§ Baseband: is the signal sent without mixing it with a carrier frequency
§ Broadband: A wide-band signal sent on a high carrier frequency
§ Narrowband: A narrow-band signal sent on a high carrier frequency
§ Channels have two important characteristics
§ Bandwidth of a channel: Defines how much data-rate it can provide
§ Carrier frequency: Important for licensing, hardware capabilities
supporting bandwidth
§ Remember: We have seen channels already with IEEE 802.11 WLAN,
e.g., at 2.4 GHz carrier frequencies
How are the channels formed?
218
Channelization
§ Let us take the ISM band as an example (around 2.4 GHz)
§ Different channels: WiFi, Bluetooth, Wireless Sensor Networks
§ Definition
§ Spectral Efficiency: by using physical layer characteristics, it determines
how many bits can be sent via one hertz of bandwidth per second
§ How are the channels defined?
§ Coherence Bandwidth à Multipath reflections in the environment!
§ Application defines the data rate a user needs
§ Use the spectral efficiency to define the channel bandwidth requirement
§ If reliability is important, enforce guard bands between channels
§ Take area of use in consideration to create non-overlapping channels
§ Hardware constraints
219
Channelization
LR WPAN/
Sensor Network
WLAN
220
Channelization
Technology
Channel BW
Data Rate
Spectral Eff.
IEEE 802.11b
20 MHz
11Mbps
0.55 bps/Hz
IEEE 802.15.4 2 MHz
250 kbps
0.125 bps/Hz
IEEE 802.15.1 2 MHz
1 Mbps
0.5 bps/Hz
§ IEEE 802.11 not expected to have more than 3 or 4 different
networks
§ Most of the channels are overlapping
§ IEEE 802.15.4 reliability is important - sacrifice spectral efficiency
against reliability
§ Only use 2 MHz in 5 MHz due to large guard bands
§ IEEE 802.15.1 designed for short range communication, no coexistence with other Bluetooth is considered, thus no guard band
§ Uses 40 channels with same bandwidth
221
Channelization: Discussion
§ Does a channel need to have a continuous bandwidth?
§ No, but it is easier for hardware design.
§ Can‘t we have a channel defined both in time and frequency?
§ Yes, this is frequently used in the LTE standard.
§ Why can‘t we have smaller chunks of channels?
§ The smallest channel size is limited by the symbol size. If we merge this
with what is asked in the first question, then we obtain OFDMA, if we
allocate only orthogonal portions of the non-continuous bandwidth.
222
Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Tanis
Data Networking
Lecture 10: Cellular Network Medium Access Concepts
Part 10a: Centralized Wireless Resource Management
iiiii
Wolfgang Kellerer
Effi
EEE
© 2023 Technical University of Munich
1
Elements of a wireless network
wireless hosts
(User Equipment - UE)
• laptop
• smartphone
maybe stationary –
wireless does not
always mean mobility
wireline network
infrastructure
wireless link
• different PHY implementations
• MAC protocols
Source: Kurose, Ross: Computer Networking, 6th Ed. Pearson, 2012.
wireless access point
• simple relay or
• control of wireless
resources
(Base Station - BS)
• connected to a
wireline network
2
Elements of a cellular wireless network
Radio Access Network (RAN)
• mobile user attachment
• base stations do centralized
radio resource management
in a cell
Cell
• covers geographical region
• cellular base station
(≠ 802.11 access point)
• mobile users
(attach to base station)
• air-interface:
PHY and MAC
Core Network (CN)
• controls access
• controls call setup &
data communication
• controls Quality of Service
• manages mobility
• manages charging
I
n
t
e
r
n
e
t
control plane functions
user plane functions
Source (largely modified): Kurose, Ross: Computer Networking, 6th Ed. Pearson, 2012.
wide area
network
infrastructure
3
Centralized Resource Management
Key concept of cellular networks:
Centralized management of the network resources (Base Station)
Base station takes care of resource reservation and access to the reserved
resources (Medium Access)
Network resources are partitions of the wireless medium
(called “channels“ or “resource blocks“) in terms of
Frequencies
Time slots
Codecs
Space
and any combination
depending on the multiplexing scheme underlying the medium access
as of numerous different approaches, multiplexing and medium access control for
wireless networks are often called “wireless network resource management“
4
uplink
downlink
Example: Channels in 5G (simplified)
Base Station (BS)
Important channels in a cell (in principle, varies among generations):
Physical Broadcast Channel (PBCH/SSB)
Physical Downlink Control Channel (PDCCH)
Physical Downlink Shared Channel (PDSCH)
wireless standards
contain a record
number of
abbreviations 😄
Physical Random Access Channel (PRACH)
Physical Uplink Control Channel (PUCCH)
Physical Uplink Shared Channel (PUSCH)
BS
UE
5
Example:
Signals and Channels in Downlink Frame Structure
uplink
downlink
Example: Channels in 5G (simplified)
Base Station (BS)
Important channels in a cell (in principle, varies among generations):
Physical Broadcast Channel (PBCH/SSB)
Physical Downlink Control Channel (PDCCH)
Physical Downlink Shared Channel (PDSCH)
wireless standards
contain a record
number of
abbreviations 😄
Physical Random Access Channel (PRACH)
Physical Uplink Control Channel (PUCCH)
Physical Uplink Shared Channel (PUSCH)
BS
UE
8
Example: What happens until a data packet can be sent?
„5G Initial Attach“
System Information Block is broadcasted regularly
Collision-based random access
(slotted Aloha like)
to get a control channel
UE gets own control channel
UE registers with the operator‘s subscription
data base etc. (in the core network)
supported features
supported slices
UE asks for a
data path to core network
(PDU Packet Data Unit,
PCO Protocol Configuration Options,
DNN Data Network Name)
UE gets data path to UPF
(User Plane Function)
source: sharetechnote.com („5G/NR initial attach sequence“)
9
The Generations (“Gs”) in Mobile Communications
TDMA/FDMA
OFDMA
Telephony and SMS
Data and Video
• 14 kbit/s
2G: GSM/GPRS
• 100 Mbit/s
• 9 Min.
• ~ 50ms
??
4G: LTE 4G
• 1 Tbit/s
• 60 Millisec.
• < 1ms
G
?
5G
5G
3G: UMTS 3G
Internet
• 1 Mbit/s
• 16 Hrs
CDMA
6G
• 10 Gbit/s
• 5 Sec.
• ~ 10ms
For comparison:
• Data rates
• Download times for a 2 hours HD movie
• Experienced latency
Machines
communicate
OFDMA / NOMA
„Network Resources“ (= channels) are different (and differently allocated) among the Generations
What is covered in lecture 10 - 12
10 Cellular networks MAC concepts
What is a cellular network
Recap wireless link
Principles for medium access in cellular networks
Multiplexing – how to separate channels (resources)?
Cellular network concept „cells“
Channel assignment
Multiple Access – from FDMA to OFDMA
Duplexing
11 Frequency planning
12 Cellular Network Generations and their features from GSM to 5G
13 Scheduling
Additional reading
[Beard, Stallings] chapter 13 wireless cellular networks
11
Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Data Networking
Lecture 10: Cellular Network Medium Access Concepts
Part 10b: Cellular Principles and Frequency Bands
Wolfgang Kellerer
© 2023 Technical University of Munich
12
Recall: Wireless Link Characteristics
path1
p2
p3
important differences from wired link …
Natural broadcast medium
Very limited spectrum
decreased signal strength: radio signal attenuates as it propagates
through matter (path loss) exponentially with distance
interference from other sources: standardized wireless network
frequencies (e.g., 2.4 GHz) shared by other devices (e.g., phone);
multipath propagation: radio signal reflects off objects, ground, etc.,
arriving at destination at slightly different times
… make communication across (even a point to point) wireless link
much more “difficult”
13
Recall: Wireless Link Characteristics
10-1
10-3
BER
SNR: signal-to-noise ratio
SNR versus BER tradeoffs
given physical layer: increase
power increase SNR
decrease BER
given SNR: choose physical
layer that meets BER
requirement, giving highest
throughput
SNR may change with mobility:
dynamically adapt physical
layer (modulation technique,
rate)
10-2
10-4
10-5
10-6
10-7
Source: Kurose, Ross: Computer Networking, 6th Ed. Pearson, 2012.
10
20
30
40
SNR(dB)
QAM256 (8 Mbps)
QAM16 (4 Mbps)
BPSK (1 Mbps)
14
Recall: Radio Propagation
Received
signal
strength
Average
pathloss
Small-scale fading
Large-scale fading
Distance between sender and receiver
Small-scale fading: due to small changes in position; the sum of
the phases of the received signal is nearly random because of the
multipath propagation. Variation of the received signal strength by
approx. 30-40 dB
Large-scale fading: on larger distances; the mean received signal
strength decreases gradually because of propagation loss
Source: D. Staehle, P. Tran-Gia, Rechnernetze und Kommunikationssysteme, 2005.
15
Simple Radio Propagation Model
𝑃𝐿(𝑑) = 𝑃𝐿(𝑑0) + 10 𝑛 log(𝑑/𝑑0) + 𝑋 (in dB)
𝑃𝐿:
𝑑:
𝑛:
𝑑0:
𝑋:
path loss as mean received signal strength
distance between sender and receiver
path loss exponent (in free space n = 2, typical n 4)
reference distance (1 km on macro cells, 100 m on micro cells)
lognormal shadowing, Gaussian RV with mean 0 dB
16
Multiplexing
Ideally only one user connected to the
base station at a time (as in Wireless LAN)
Real scenario:
Server multiple users in parallel
via channelization
High number of users connected to the same antenna, sharing the
wireless resources (frequencies, time slots,…)
Multiplexing: how to separate the channels
17
Cellular Network Concept (McDonald, AT&T, 1978)
Number of available wireless resources (e.g. frequencies) is very
limited (e.g., 124 frequency pairs in GSM)
Solution: Segmentation of service area into cells
Spatial reuse of available frequencies
(frequency reuse)
Introduction of regions concerning
the reuse of frequencies
Handover or handoff: transfer
of connection (control) crossing
the cell border
18
Radio Frequency Bands
6G: mm-Wave
2,4 – 2,5 GHz WiFi
(100 MHz Band)
5 GHz WiFi
Source: rfpage.com
ISM-Band - industrial, scientific, and medical (ISM)
19
Frequency Allocation
Source: Bundesnetzagentur 2021
20
Principles for Medium Access
Frequency planning & licensing (static)
Base station positioning
Power assignment to base station
Antenna tilt
Channel-to-base station assignment
Operation (dynamic)
Admission control
Channel-to-mobile assignment
Image source: https://www.wireless-planning.com/radioplanner
Multiple Access Schemes: FDMA/TDMA, CDMA, OFDMA
Duplexing (Up and Downlink separation)
Channel Pooling
Antenna concepts: MIMO
Adaptive power control
Link adaptation
Assignment of modulation and coding
Packet scheduling
Assignment of Resource Blocks
21
Channel-to-base station assignment
Source: Christian Hartmann, Resource Management in Wireless Networks, WS 11/12
22
Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Data Networking
Lecture 10: Cellular Network Medium Access Concepts
Part 10c: Multiple Access
Wolfgang Kellerer
© 2023 Technical University of Munich
23
Multiple Access
Predefined channelization of the radio resource
In contrast to contention-based access (wireless LAN)
Goal: divide resources into orthogonal channels, so that many
users can communicate in parallel
In most systems the channelization is fixed, that means it cannot
be changed during system operation
Typically, a user is occupying one channel for the duration of its
connection
For higher efficiency: Channels can be pooled or shared
24
Cellular networks: Multiple Access Schemes
Techniques for sharing
channel-to-mobile radio
spectrum
combined FDMA/TDMA:
divide spectrum in
frequency channels, divide
each channel into time slots
CDMA: Code Division
Multiple Access
OFDMA: Orthogonal
Frequency Division Multiple
Access
time slots
frequency
bands
Source: Kurose, Ross: Computer Networking, 6th Ed. Pearson, 2012.
25
Frequency Division Multiple Access (FDMA)
Each user transmitting all the
time with limited bandwidth
FT
Guardbands
26
Time Division Multiple Access (TDMA)
Each user transmitting limited time
with large bandwidth
FT
27
Orthogonal Frequency Division Multiplexing
OFDM: multi-carrier modulation scheme that transmits data over a
number of orthogonal subcarriers
Conventional transmission uses only a single carrier, which is
modulated with all the data to be sent (e.g., FDM)
OFDM breaks the data to be sent into small chunks, allocating
each sub-data stream to a subcarrier and the data is sent in
parallel orthogonal subcarriers.
FDM
OFDM
Source: D. Staehle, Neue Konzepte und Technologien in der Mobilkommunikation, 2010.
31
OFDM Spectral Overlap
Conventional Frequency Division Multiplex (FDM) Multi-carrier Modulation Technique
The center frequency of
each subcarrier is located on
a null point of the other
subcarriers
OFDM subcarriers have a sinc (sin(x)/x) frequency response
resulting in overlap in the frequency domain. This overlap does
however not cause any interference due to the orthogonality of
the subcarriers.
Saving of bandwidth
Orthogonal Frequency Division Multiplex (OFDM) Multi-carrier Modulation Technique
•
•
•
eliminates guard bands
saves bandwidth
increases channel efficiency
Source: D. Staehle, Neue Konzepte und Technologien in der Mobilkommunikation, 2010.
32
Orthogonal Frequency Division Multiple Access (OFDMA)
Multiple access in OFDM (OFDMA) systems can be a mixture of FDMA and
TDMA
orthogonal carrier frequencies (sub-carriers)
Example: OFDMA in LTE/4G
One “resource block”
Slot duration: 0.5 ms
for 7 symbols
Chunk bandwidth: 180 kHz
with 12 subcarriers at 15 kHz
time
frequency
Image Source: Wikipedia
33
LTE/4G Resource Block
Resource Grid
Frequency
Transmission Time
Interval (TTI) = 1ms
(Physical) Resource Block (RB)
Resource
Element (RE)
1 1slot
duration
subframe
15 kHz each
12 sub-carriers =
180 kHZ
Time
1 subframe
7 Symbols in 0.5 ms
• Smallest Scheduling Unit – 1 TTI (1 sub-frame) x 12 subcarriers = 2 RBs
• Different RBs can be allocated to different users – high granularity
35
Separation between uplink and downlink transmission:
Duplexing
receiving and transmitting at the same time in the same frequency
band is impractical
Uplink and downlink must be separated either in the time domain or
in the frequency domain
Duplexing
Frequency Division Duplexing (FDD): uplink and downlink
transmission in separate frequency bands
Example: GSM and UMTS FDD mode
Time Division Duplexing (TDD): uplink and downlink separation in
the same frequency band in different timeslots
example: UMTS TDD mode
easier to dynamically support asymmetric traffic
harder to manage inter-cell interference
Source: Christian Hartmann, Resource Management in Wireless Networks, WS 11/12
36
Principles for Medium Access
Frequency planning & licensing (static)
Base station positioning
Power assignment to base station
Antenna tilt
Channel-to-base station assignment
Operation (dynamic)
Admission control
Channel-to-mobile assignment
Image source: https://www.wireless-planning.com/radioplanner
Multiple Access Schemes: FDMA/TDMA, CDMA, OFDMA
Duplexing (Up and Downlink separation)
Channel Pooling
Antenna concepts: MIMO
Adaptive power control
Link adaptation
Assignment of modulation and coding
Packet scheduling
Assignment of Resource Blocks
LTE resource allocation example for two users
37
Multiple Access:
Channel-to-mobile assignment
in one cell
Example LTE
Channel assignment strategy
Admission control
Handover strategy
(adaptive) power control
(link adaptation)
Multiple access scheme
assign channels to users
1. grant user access
to cell (base station)
2. Select OFDMA
resource blocks
3. Select modulation &
coding scheme
4. Schedule Packet(s)
Packet scheduling
Decide on which packet to transmit
repeat for every user
every 1 ms
38
Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Data Networking
Lecture 11: Cellular Principle – Frequency Planning
Channel Assignment: Frequency Allocation and Frequency Reuse
Performance analysis: a short introduction
Wolfgang Kellerer
Additional Reading: [Beard, Stallings] chapter 13, wireless cellular networks
© 2023 Technical University of Munich
1
Cellular Network Concept (McDonald, AT&T, 1978)
Reason: Number of available frequencies is very limited
(e.g., 124 frequency pairs in GSM)
Solution: Segmentation of service area into cells
Spatial reuse of available frequencies
(frequency reuse)
Introduction of regions concerning
the reuse of frequencies
Handover or handoff: transfer
of connection (control) crossing
the cell border
2
Cellular Network Concept
Ideal cell
real cell
cell model
Image source: M. Fekih et al: A data-driven approach for
Origin-Destination matrix construction from cellular network
signalling data: a case study of Lyon region (France)
3
Cell Geometries
This slide and the following ones are based on [Beard, Stallings]
4
Frequency Reuse
F4
F4
F3
Cells with the same name
use the same set of frequencies
F2
Cells are organized into clusters
In this example, the cluster size N = 7
In order to tesselate, the geometry of
hexagons is such that N can only have
values which satisfy
N = i2 + ij + j2
with i = 0,1,2,… and j = 0,1,2,…
F3
F5
F5
F1
F2
F1
F6
F7
F6
F7
F4
F3
F5
F1
F2
F6
F7
Channel assignment strategies
Fixed: each cell is allocated a predetermined set of channels
Dynamic: each time a call request is made, the serving base station requests a
channel from the MSC
5
Frequency Reuse Pattern
Parameter for characterizing
frequency reuse
D: minimum distance between
centers of cells that use the
i=2, j=1
i=2, j=0
same frequency band
R: radius of a cell
d: distance between centers of
adjacent cells (𝑑 = 3𝑅)
N: cluster size or reuse factor;
number of cells in a repetitious
pattern (each cell in the pattern
has a unique set of frequencies)
= 3𝑁 and
= 𝑁
i=3, j=2
6
Frequency Reuse example
(a) system of 32 cells with cell radius of 1.6 km
Total frequency bandwidth supporting 336 traffic
channels
Reuse factor (or cluster size) = 7
What geographic area is covered?
Total number of supported channels?
Solution:
Cell area = 6.65 𝑘𝑚2
Covered area: 32 ∗ 6.65 = 213 𝑘𝑚2
Channels/cell = 336/7 = 48
Total channel capacity: 32 ∗ 48 = 1536 𝑐ℎ𝑎𝑛𝑛𝑒𝑙𝑠
(b) same question for a system of 128 cells with
cell radius of 0.8 km. As before:
Total frequency bandwidth supporting 336 traffic
channels
Reuse factor (or cluster size) = 7
Solution:
Cell area: 1.66 𝑘𝑚2
Covered area: 128 ∗ 1.66 = 213 𝑘𝑚2
Total channel capacity: 128 ∗ 48 = 6144
7
Cell configuration
Antenna
Omnidirectional
Sectoring 120°
8
A short introduction to
Cellular Networks Performance Analysis
Dedicated channels
Capacity (maximum utilization) of a cell is equal to the number of
channels allocated to users
Can be treated as an M/M/N loss system (similar to telephone
lines, no buffering of calls!)
Performance analysis (= system design) questions
What is the probability that a call is blocked?
What cell design is needed to achieve an upper bound on the blocking
probability?
9
Cellular Networks Performance Analysis (2)
From queuing theory
Traffic Intensity A = 𝜆ℎ [Erlang]
Stability criterion: 𝐴/𝑁 < 1
𝜆: mean call rate
ℎ: mean holding time
𝑁: number of channels
𝜌 = 𝐴/𝑁: mean utilization of one channel
𝜆ℎ = 𝜌𝑁
Blocking Probability (Erlang B Formula):
𝑃
𝐴
= 𝑃 “request denied since no channel available“ = B 𝐴, 𝑁 =
∑
𝐴
𝑖!
Each of the 𝑁 channels carries a traffic 𝐶 =
10
Cellular Networks Performance Analysis (3)
λ
h
A
11
Cellular Networks Performance Analysis (4)
Traffic Model:
new call arrival
handover arrival
λ1
1/h1
λ2
1/h2
call completion
call handoff
12
Cellular Networks Performance Analysis (5)
Exercise:
How many channels should be allocated to a cell with user traffic
of an average call rate of 20 calls per minute and an average
holding time of 3 min to reach an average utilization of 50%?
λ = 20/min
ℎ = 3 min
𝜌 = 50%
λ ℎ =𝜌 𝑁𝑁
= 20 3 2 = 120
13
Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Data Networking
Lecture 12: Cellular Networks Generations from GSM to 5G
12a: from GSM to 5G
Wolfgang Kellerer
© 2023 Technical University of Munich
1
What is covered in this lecture
2nd Generation wireless cellular networks: FDMA/TDMA based
GSM
3rd Generation: CDMA based UMTS
4th Generation: OFDMA based LTE
5th Generation: OFDMA based 5G
Additional reading
[Beard, Stallings] chapter 13, wireless cellular networks
2
Cellular Network Generations
1G: analog voice communication
2G: FDMA/TDMA: GSM
Channel pooling: HSCSD
2.5G: channel sharing for data: GPRS
Link adaptation: EDGE
3G: W-CDMA: UMTS
Channel sharing: HSPA
Link adaptation: HSPA, HSPA+
4G: OFDMA, pure IP-based: LTE
SDMA: MIMO
5G: OFDMA
eMBB, URLLC,
massiveIoT
1G
(analog voice)
• AMPS
• C-Netz
1980s
2G
(digital voice)
9.8 kbps
• GSM
• PDC
• IS-95
1990s
3G
384 kbps –
2 Mbps
• UMTS
(WCDMA)
• CDMA2000
2001
4G
~150 Mbps
• LTE
2011
5G
• Gbps
• small cells
• URLLC
• BS coordination
2020
3
Example Cellular Network Technology Map
(2G – 3G – 4G)
C-Plane
and
U-Plane
4
GSM 2G (voice) network architecture
Base station system (BSS)
BTS
MSC
G
BSC
public
telephone
network
Gateway
MSC
Legend
Base transceiver station (BTS)
Base station controller (BSC)
Mobile Switching Center (MSC)
Mobile subscribers
Source: Kurose, Ross: Computer Networking, 6th Ed. Pearson, 2012.
5
GSM: FDMA/TDMA
F/TDMA channel structure
Spectrum divided into separate 200 kHz channels
Each Radio Frequency Channel (RFCH) carries 8 TDMA channels,
time slots
Channel defined by pair of RFCH number and Time Slot Number (TSN)
Source: Christian Hartmann, Resource Management in Wireless Networks, WS 11/12.
6
Channel Pooling: HSCSD
Channel pooling for one user
Obtain higher data rates by pooling channels for one user
assigning several channels for a single user connection
Example: High Speed Circuit Switched Data (HSCSD)
Up to 8 timeslots can be assigned to a single user
All timeslots must reside on the same frequency carrier (RFCH)
Channel allocation (similar to GSM)
BS searches for n idle time slots on a single RFCH
If successful: assigns resources
Otherwise: blocks data call
higher blocking and dropping probabilities than single slot GSM
speech or data calls
7
Channel sharing: GPRS (and HSPA for UMTS)
Packet services are often of bursty nature
Statistical multiplexing
Assign channels to users on demand only for the duration of a packet burst
General Packet Radio Service (GPRS)
data service enhancement for GSM
higher rates by assigning more than one timeslot to a single user
(cf. HSCSD)
allows for channel sharing: “always on”
only when a user has data to transmit, the channels are assigned
user pays for the data transmitted
GSM
GPRS
connection setup
several seconds
< 1 second
data rate
9,6 kbit/s
ISDN-like (30…50 kbit/s)
8
UMTS 3G (voice + data) network architecture
Old circuit-switched network in the core (for voice)
MSC
G
radio
network
controller
Public
telephone
network
Gateway
MSC
New radio access network: CDMA
G
SGSN
new cellular data network
operates in parallel with
existing (unchanged)
cellular voice network
Public
Internet
GGSN
New, GPRS-based
packet data network in the core
Serving GPRS Support Node (SGSN)
Gateway GPRS Support Node (GGSN)
Source: Kurose, Ross: Computer Networking, 6th Ed. Pearson, 2012.
9
Link Adaptation: EDGE for GSM
(also used in HSPA for UMTS and in LTE)
Systems like GSM are designed on a worst-case basis to provide
each user with a minimal required signal quality
Modulation and code rate are fixed
Many users in the system will have a much better reception quality (better
C/I) than required but cannot benefit from it since the data rate is fixed
Enhanced Data Rates for GSM (EDGE)
High Speed Packet Access (HSPA for UMTS)
Allowing for adaptation of
Modulation alphabet → using different modulation schemes
Code rate → using different codes or differently punctured codes
Achieves higher data rates for user with good reception (i.e., close to
the BS) and therefore enhances the system efficiency
10
LTE 4G Architecture: Evolved Packet Core (EPC)
user information
data base
HSS
Control decisions:
handover,
authentication, session
management
S6a
MME
S1-MME
radio network
UE
RAN
S1-U
S5/
S8-C
S1
S
GW
Gx
PCRF
AF
Data Network
P
GW
S5/
S8-U
Rx
MME – Mobility Management Entity
SGW – Serving Gateway
PGW – Packet Data Network Gateway
HSS – Home Subscriber Server
PCRF – Policy and Charging Rules Function
AF – Application Function
Control Plane
Data Plane
SGi
data plane: handling of user packets
No circuit-switched network any more - VoIP
Link Adaptation: LTE
Modulation and coding schemes balance between high throughput
and robustness (bit error tolerance)
Transmitter adapt MCS (modulation and coding scheme) to
channel quality indicator (CQI) reported by receiver
Source: D. Staehle: LTE, WS13/14 @ TUM.
12
Scheduling: LTE
frequency
Physical Resource Blocks (PRB)
time
scheduler decides which
packet to transmit
resource allocator assigns
PRB to bearers
eNB
Source: D. Staehle: LTE, WS13/14 @ TUM.
13
Opportunistic Frequency-selective Scheduling
Channel varies in time and
frequency
Frequency-selective:
users can be scheduled
individually per subframe
and resource block (PRB)
Opportunistic: frequency
and time selectivity
exploited by scheduling
users when they have the
best channel (multi-user
diversity)
Source: D. Staehle: LTE, WS13/14 @ TUM.
14
Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Data Networking
Lecture 12: Cellular Networks Generations from GSM to 5G
Part 12b: 5G
Wolfgang Kellerer
Source: Dahlman, Erik, Stefan Parkvall, and Johan Skold. 5G NR: The next generation wireless access technology.
Academic Press, 2020.
© 2023 Technical University of Munich
15
Recap: 4G Architecture: Evolved Packet Core (EPC)
user information
data base
HSS
Control decisions:
handover,
authentication, session
management
S6a
MME
S1-MME
radio network
UE
RAN
S1-U
4G base station:
eNB
(evolved NodeB)
S5/
S8-C
S1
S
GW
Gx
PCRF
AF
Data Network
P
GW
S5/
S8-U
Rx
MME – Mobility Management Entity
SGW – Serving Gateway
PGW – Packet Data Network Gateway
HSS – Home Subscriber Server
PCRF – Policy and Charging Rules Function
AF – Application Function
Control Plane
Data Plane
SGi
data plane: handling of user packets
5G Architecture
AUSF
Control decisions:
handover,
authentication, session
management
N12
N13
N8
N10
N11
•
N7
PCF
control/data
plane split
(SDN like)
N5
AF
Data Network
N2
(R)AN
N3
5G base station:
gNB
(next generation NodeB)
•
SMF
N4
N1
UE
user information
data base
UDM
N15
AMF
radio network
AF – Application Function
AMF – Access and Mobility Function
AUSF – Authentication Server Function
PCF – Policy Control Function
SMFF – Session Management Function
UDM – Unified Data Management
UPF – User Plane Function
Control Plane
Data Plane
UPF
UPF
Multiple user plane nodes (for slicing)
N6
data plane: handling of user packets
Separation of control and data plane
(according to the concept of Software-defined Networking, SDN)
Control Plane: Network Functions (Service-oriented Architecture, SOA)
Initial rollout: 5G Non-Standalone (NSA)
4G/LTE
Standalone (SA)
other options for interworking of 4G and 5G
Non-standalone (NSA)
In NSA, LTE is used for control-plane functionality such as initial
access, paging, and mobility
In SA operation, the gNB is connected directly to the 5G core
18
5G Use Cases
4G LTE evolution
eMBB
mMTC/
mIoT
enhanced Mobile
BroadBand
URLLC
massive
Machine-Type Communication /
massive Internet of Things
Ultra Reliable
Low Latency
Communication
Source: 3gpp.org
new traffic classes / use cases
19
Matching applications to the 3 main 5G services
eMBB
mMTC
URLLC
Not all aspects are needed for all services
Source: ITU-R (2015): Recommendation ITU-R M.2083-0 IMT Vision – Framework and overall objectives of the future development of IMT for 2020 and beyond (09/2015)
20
Radio Resource Management in 5G: NR (New Radio)
What is new in NR? (Release 15 – the first 3GPP 5G release)
Compared to LTE, NR provides many benefits:
o Usage of much higher frequency bands -> smaller cells
o Ultra-lean design
o Forward compatibility
o Low latency
o Beam centric design enabling beamforming and massive number of
antennas (not only for data, but also for control)
21
Higher frequency operation
NR supports licensed-spectrum operation
below 1 GHz up to 52 GHz (even higher
frequencies in further releases)
Very high traffic
capacity and
extreme data rates
FR 1: 0.45 - 7.125 GHz
(sub 6 GHz Band)
FR 2: 24.25 - 71 GHz
FR = Frequency Range
High radio-channel
attenuation
(pathloss and blockages)
Joint operation in
lower and higher
frequencies
Advanced
multi-antenna
transmission/
reception
22
Ultra-lean design and forward compatibility
"Always-on" signals
o Signals for base station detection
o Broadcast of system information
o Reference signals for channel estimation
Ultra-lean design principle
o Minimize "always-on" transmissions
e.g. Reduced Capability Set (RedCap)
for low energy consumption in UEs
(sensors, wearables)
3GPP Release 17
Radio interface design that allows for substantial future evolution
23
Frame structure
As in LTE, OFDM is the
transmission scheme in NR
(also in uplink)
Flexible numerology* with
subcarrier spacing
from 15 kHz (as in LTE)
up to 240 kHz
lower slot sizes higher rate
LTE: all devices must support the maximum carrier bandwidth of 20 MHz
NR: device-side bandwidth adaptation to reduce device energy
consumption
5G „numerology“ = sub carrier spacing (SCS)
24
Beam-centric design and multi-antenna transmission
Supports many steerable antennas for
both transmission and reception
Control and sync channels in NR also
support beamforming
Procedures:
o Beam sweeping
o Beam selection
o Beam recovery
30
Evolution of NR (Release 16)
Enhancements of already existing features
o multi-antenna
o carrier aggregation
o mobility
o power-saving
Rel. 15 focused mainly on eMBB and
URLLC (to some extent)
New features addressing new deployment scenarios and verticals
o integrated access and backhaul
o support for unlicensed spectra
o intelligent transportation systems
o industrial IoT
31
Bandwidth Parts
To support UEs that cannot support the whole Carrier Bandwidth
To support bandwidth adaptation (reduced UE energy
consumption)
Up to 4 Bandwidth Parts per Carrier, of which one is active
A UE must not send or receive outside the active Bandwidth Part
The configuration of a Bandwidth Part involves many different
parameters
BWP #1 active
frequency
BWP #2 active
BWP #1 active
Switch of active bandwidth part
time
Havish Koorapaty (3GPP): NR Physical Layer Design, Workshop on 3GPP submission towards IMT-2020, Brussels, Oct. 24-25, 2018.
32
5G Architecture revisited
AUSF
Control decisions:
handover,
authentication, session
management
N12
N10
N11
SMF
N7
PCF
control/data
plane split
(SDN like)
N4
N1
UE
N8
user information
data base
UDM
N15
AMF
radio network
N13
AF – Application Function
AMF – Access and Mobility Function
AUSF – Authentication Server Function
PCF – Policy Control Function
SMFF – Session Management Function
UDM – Unified Data Management
UPF – User Plane Function
Control Plane
Data Plane
N5
AF
Data Network
N2
(R)AN
N3
UPF
UPF
Multiple user plane nodes (for slicing)
N6
data plane: handling of user packets
•
•
•
Separation of control and data plane
(according to the concept of Software-defined Networking, SDN) see Chapter 17
Control Plane: Network Functions (Service-oriented Architecture, SOA)
Function split between RAN and core
Function-oriented (Core) Network Architecture
Functional split between Radio Access Network (RAN) and core
User Plane Function (UPF): packet routing, forwarding, packet inspection, QoS
handling, packet filtering, traffic measurements
Session Management Function (SMF): IP address allocation for the User Equipment
(UE) and general session management functions
Access and Mobility Management Function (AMF): control signaling between core and
UE, security for the user data, idle state mobility, authentication
34
5G Core Network Technologies
Core Network Functions: Orchestration and Virtualization –
Decoupling of logical functions from the hardware
Edge Computing – Resources where they are needed: close to RAN
Network Virtualization: Slicing – Logical end-to-end networks tailored
to the customer
35
5G Core Network Technologies in a nutshell
Network Function Virtualization
Edge Computing
Network Virtualization
Internet
Radio Access
Network (RAN)
Kernnetz
(Core Network)
Cloud
Cloud
5G Network schematic: RAN, Core, Cloud
36
Network Function Virtulization
(Virtualized) Network Functions (VNF) e.g., AMF, SMF run on
distributed Cloud Servers better resource efficiency
Also other functions can be placed in clouds, e.g. firewall
Firewall
Internet
Radio Access
Network (RAN)
VNF
Kernnetz
(Core Network)
V-Firewall
Cloud
Cloud
37
Edge Computing
Cloud computing at the network edge = RAN
Computing close to the UE for low latency applications
Move VNFs to the edge clouds
Edge Cloud
Internet
Edge Cloud
Radio Access
Network (RAN)
Kernnetz
(Core Network)
Cloud
Cloud
38
Network Virtualization: Towards Network Slicing
Virtualization technologies support logical end-to-end networks,
which can be tailored to the customer
Tenant SDN
Controller
Tenant SDN
Controller
Network Hypervisor
v
v
v
v
v
Internet
v
v
Cloud Node
Cloud Node
Network slices run on the same (shared) physical hardware
39
5G Core Network Technologies summary
Network Function Virtualization, Edge Computing, Network
Virtualization/Slicing
Tenant SDN
Controller
Tenant SDN
Controller
Network Hypervisor
Software Defined Networking
Controller (SDN-C)
See Chapter 17
SDNC
Control Plane
v
VNF
v
v
v
v
Internet
VNF
v
v
Edge Cloud
VNF
VNF
VNF
Cloud Node
Cloud Node
5G core support adaptation to emerging service and application
requirements and new customers (verticals), e.g. industry , IoT,
healthcare, vehicles,…
40
5G Network Slicing example
Source: Andreas Müller, Edge Computing and Network Slicing for the Factories of the Future, IEEE Brooklyn 5G Summit,
New York, USA, 24.-26. Apr. 18
41
Standardization (overview – Japanese operator viewpoint)
3GPP standardization (expected)
6G projects @ TUM
6G testbeds @ TUM
today
Source: NTT DOCOMO's Initiatives on 5G evolution & 6G
NTT technical Review, Vol. 19, No. 11, pp. 18–25, Nov. 2021. https://doi.org/10.53829/ntr202111fa1
42
Standardization 3GPP Releases
First 6G release
today
43
Private 5G – 5G Campus Networks
Several countries define part of the spectrum for „local networks“
Limited, local coverage only
For company sites, communities, research institutes/universities
5G national
5G local
Freq.
3GPP Standardisierung für „Non-Public Networks“
Private Network ID
Closed access groups
How to connect to public networks – under discussion
44
TUM 5G CampusNetwork
operated by Chair of Communication Networks
45
Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Data Networking
Lecture 13: Scheduling
Part 13a: Scheduling Overview
Wolfgang Kellerer
© 2023 Technical University of Munich
1
What is covered in this lecture
Wireless Resources
Spectrum
Granularity
Utilization
Scheduling Basics
Overview
Optimization Problem
Fairness
Example Schedulers
Scheduling Aspects
2
Recap: Wireless Resources – Granularity in LTE
Resource Grid
Frequency
Transmission Time
Interval (TTI) = 1ms
(Physical) Resource Block (RB)
Resource
Element (RE)
1 1slot
duration
subframe
15 kHz each
12 sub-carriers =
180 kHZ
Time
1 subframe
7 Symbols in 0.5 ms
• Smallest Scheduling Unit – 1 TTI (1 sub-frame) x 12 subcarriers = 2 RBs
• Different RBs can be allocated to different users – high granularity
3
Recap: Scheduling: LTE
frequency
Physical Resource Blocks (PRB)
time
scheduler decides which
packet to transmit
resource allocator assigns
PRB to bearers
eNB
Source: D. Staehle: LTE, WS13/14 @ TUM.
4
Opportunistic Frequency-selective Scheduling
Channel varies in time and
frequency
Frequency-selective:
users can be scheduled
individually per subframe
and resource block (PRB)
Opportunistic: frequency
and time selectivity
exploited by scheduling
users when they have the
best channel (multi-user
diversity) COZ awareness
per RB per 1 ms
Source: D. Staehle: LTE, WS13/14 @ TUM.
5
Wireless Resources - Utilization
Information per RE depends on link quality
Theoretical bound – Shannon limit
𝐶 = 𝐵 log (1 + 𝛾)
where 𝐵 – Bandwidth, γ – Signal-to-Noise-to-Interference ratio for a link
LTE - Adaptive Modulation and Coding (AMC)
Change modulation based on measured channel quality indicator (CQI)
RE carries 2, 4 or 6 bits
Bandwidth can be under-utilized, if UEs have bad link quality
6
Scheduling - Overview
Queues
Multiple queues
Scheduler
UEs
Traffic classes
Wireless
Link
Traffic flows (e.g., TCP)
…
One server (wireless link)
Scheduling information:
Queue demand – buffer status reports from UE
UE-BS link quality: CQI reports
If different traffic classes: higher layer information (network to application)
Serving time: CQI-dependent
7
Scheduling – Optimization Problem
Allocating the resources to maximize the utility function U:
max 𝑈
𝑠. 𝑡.
𝑟 ≤𝑅
subject to resource constraint 𝑅, with 𝑟𝑖 – resources allocated to UE 𝑖
N – number of UEs
Utility function choices:
Operator perspective – link utilization
User perspective – Quality of Service (QoS), Quality of Experience (QoE)
8
Scheduling – Trade-off
If demands of UEs are less than available resources, scheduling
does not bring anything limited resource conditions
Fairness
Feasible
region
Operating
point
Desired
Fairness
Bandwidth
Utilization
Opportunistic scheduling – allocate resource to the best CQI user
Inherently unfair
Best possible utilization
Fair scheduling – equal data rates
9
Outlook
Which scheduling disciplines do you know already?
Which algorithms are behind the following basic concepts?
FIFO
Round Robin
Priority scheduling
10
Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Data Networking
Lecture 13: Scheduling
Part 13b: Scheduling Algorithms
Wolfgang Kellerer
© 2023 Technical University of Munich
11
Round Robin
Simplest approach:
UEs are allocated resources in equal turns
Fair?
But:
Agnostic to channel quality of UEs
Agnostic to UEs requirements No Quality of Service
Possible improvement: Weighted Round Robin
12
Maximum Channel Quality (1/2)
Assign a resource block to the best SINR user
Also called: Max C/I – Channel / Interference
Example from: http://calcolatori.iet.unipi.it/seminari/2012-04-02/MAC_Scheduling_in_LTE.pdf
13
Maximum Channel Quality (2/2)
Queue of the highest CQI user is served first
10 RBs available
Optimal in terms of bandwidth utilization
Unfairness: UEs at cell borders may starve
Example from: http://calcolatori.iet.unipi.it/seminari/2012-04-02/MAC_Scheduling_in_LTE.pdf
14
Proportional Fair (1/2)
Advantages: fairness + channel awareness higher utilization
Instead of strict fairness, use proportional fairness
Given 𝑅 - average data rate of the user x, optimization goal:
max
Assignment to highest weight: 𝑤 =
𝑅
( )
( )
given 𝑅 𝑡 and 𝑅 (𝑡) - instantaneous and moving average of data
rate
Update the average data rate as:
𝑅 𝑡+1 =𝑓 𝑥 =
𝛽𝑅 𝑡 + 1 − 𝛽 𝑅 𝑡 ,
(1 − 𝛽)𝑅 (𝑡),
if scheduled
otherwise
15
Proportional Fair (2/2)
Assumption:
saturation condition,
users always have
packets to sent
Parameters:
10 RBs, β=0.1
t=1
t=2
t=3
CQI 1 13
CQI 1 14
CQI 1 14
R1 80 bytes / RB
R1 93 bytes / RB
R1 93 bytes / RB
R1 1
R1 8 .9
R1 8 .01
Score 80
Score 10 .44
Score 11.61
11 .48
Ei
CQI 2 9
CQI 2 12
CQI 2 11
R 2 39 bytes / RB
R 2 72 bytes / RB
R 2 63 bytes / RB
R 2 1
R 2 0 .9
R 2 8 .01
Score 39
Score 80
Score 7.86
80
CQI 3 7
RE
CQI 1 6
CQI 3 10
R3 25 bytes / RB
R1 20 bytes / RB
R3 50 bytes / RB
R3 1
R1 0 .9
R3 0 .81
Score 25
Score 22 .2
Score 61 .72
Ra 0 9 1 0.9
W
I
IT
Time22 2
Example from: http://calcolatori.iet.unipi.it/seminari/2012-04-02/MAC_Scheduling_in_LTE.pdf
16
Queue Aware Scheduler
Previous scheduler assumes UEs always have data to send
full buffer assumption
Alternative: queue-aware scheduler
Example: Modified Largest Weighted Delay First
𝑅 (𝑡)
𝑤 = 𝛼𝑊(𝑡)
𝑅 (𝑡)
𝛼 - parameter based on delay threshold and probability of its
violation
𝑊(𝑡) – current delay for the head-of-line packet
Variation: Largest Weighted Queue First with 𝑊(𝑡) – queue length
17
Other examples
Earliest Deadline
Least Laxity First (from processor sharing): shortest time to
process completion
Quality of Service aware
And many more…
Scheduling is a popular research topic
18
Scheduler Design
frequency
Physical Resource Blocks (PRB)
time
eNB
Challenges and requirements
Computationally efficient: run
every subframe
Opportunistic: exploit multiuser
diversity in time and frequency
domain
Consider QoS parameters
(packet delay budget, priority,
guaranteed bitrate)
Achieve certain degree of
fairness
Do not overload control
channels (semi-persistent
scheduling)
19
Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Data Networking
Lecture 14: Layer 2 Switching
Part 14a: Layer 2 Tasks Overview
Wolfgang Kellerer
© 2023 Technical University of Munich
315
Recap
§ Lecture 8 (Ethernet): in a full duplex
LAN all collisions can be avoided
through switching
§ How does switching work in detail?
§ How to forward a packet to the right receiver?
§ How to learn all these addresses?
§ How do multiple switches interact to forward packets?
§ Switches work on Layer 2 – as all the MAC protocol mechanisms
we have learned so far
§ Do you remember the protocol stack?
316
What is covered in this lecture
§ Recall of the protocol stack
§ Layer 2 Switching
§ Layer 2 addresses in ethernet: MAC addresses
§ Address Resolution Protocol
§ Learning Switch
§ Spanning Tree Protocol
317
Protocol Stack
Application
Presentation
Session
Application
L5/L7
Transport
Transport
L4
Network
Network
L3
Link
Link
L2
Physical
Physical
L1
OSI reference model (1970s)
Internet TCP/IP model
318
Protocol Stack
Each layer, combined with the layers below,
provides some functionality, i.e., service
End applications exchange messages (e.g., HTTP)
Application
Transports messages between application processes (e.g., TCP)
Transport
Moves packets in the network from one host to another (e.g., IP)
Network
Moves packets from one node to the next one (e.g., Ethernet, WiFi)
Link
Moves individual bits on a physical link
Physical
319
Each networking device implements some
or all the layers
End applications exchange messages (e.g., HTTP)
Application
Transports messages between application processes (e.g., TCP)
Transport
Moves packets in the network from one host to another (e.g., IP)
Network
Moves packets from one node to the next one (e.g., Ethernet, WiFi)
Link
Moves individual bits on a physical link
Each layer usually adds a header
to the initial application message
Physical
H
H
H
H
Message
320
Application
Transport
L3 topology
Network
L2 topology
Link
Physical topology
Physical
A given layer only communicates with its peer layer in another node and is
hence unaware of devices implementing only lower layers,
they are transparent to it!
321
Let’s do something useful…
Fetch the homepage of LKN
322
Application
Based on the work I did, this message should
be sent to port 80 of IP 129.187.39.10
Transport
Based on the work I did, this message should
be sent now to IP 129.187.39.10
H
Network
Based on the work I did, this message should
be sent to IP 10.180.15.254 on eth0
H
H
Link
Based on the work I did, this message should
be sent now on the physical link of eth0
H
H
H
01010110111101011000111…
H
H
H
Physical
Message
Message
Message
Message
H
Message
323
Network
Link
Based on the work I did,
this message is for you
H
H
Physical
Based on the work I did,
this message is for you
H
H
01010110111101011000111…
Message
H
Message
324
Network
Based on the work I did, this message should
be sent to IP 192.168.18.18 on eth1
H’
H
Link
Based on the work I did, this message should
be sent now on the physical link of eth1
H’
H’
H
10011110101101010110001…
H’
H’
H’
Physical
Message
Message
H
Message
325
And so on for routers
Switches do not implement L3
326
Link
Physical
11111001011101011111101…
Based on the work I did,
this message is for you
H
H
H
Message
327
Link
Physical
Based on the work I did, this message should
be sent now on the physical link of eth0
H’
H
H
10011110101101010110001…
H’
H’
H
Message
H
Message
328
And so on for switches
329
Application
LKN server received the request from our laptop and can now
answer, with a similar process, the request for the LKN homepage!
Transport
Based on the work I did,
this message is for you
Network
Based on the work I did,
this message is for you
H
Link
Based on the work I did,
this message is for you
H
H
Physical
Based on the work I did,
this message is for you
H
H
00100111100110101110111…
Message
Message
Message
H
Message
330
Network
Link
Based on the work I did… Next lecture!
Based on the work I did… Today!
331
Link
Role: send packets across the individual links
But what functionalities
should I have for this?
Let’s see what my neighbors
might ask me…
Physical
and
Network
332
Physical
Link
Network
Link
#
Based on the work I did,
this message is for you
Physical
Link
Physical
Based on the work I did,
H
H
Message
Knowiswhen
this message
for you a message is for us
#
H
H
H
Message
Based on the work I did, this message should
be sentKnow
now on where
the physical
of eth0 a
tolink
forward
H’
H
H
Message
whenH not
for
usMessage
Basedmessage
on the work I did,
H
H
this message is for you
333
Network
Link
Network
#
Based on the work I did, this message should
when to send
(shared
be sentKnow
to XXX.XXX.XXX.XXX
on ethY
H
H
Based on the work I did, this message should
be sent now on the physical link of ethY
H
H
Message
medium)
Link
#
Physical
H
Message
Know how to address the L2
corresponding to a L3 (i.e., IP)
334
Link
Role: send packets across the individual links
But what functionalities
should I have for this?
#
Know when a message is for us
à Addressing MACaddress
#
Know where to forward a
message when not for us
à Forwarding learning
#
Know when to send (shared
medium)
à MAC
#
Know how to address the L2
corresponding to a L3 (i.e., IP)
à L3/L2 addressing translation
✔
switch
335
Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Data Networking
Lecture 14: Layer 2 Switching
Part 14b: Layer 2 Addressing and Address Resolution Protocol (ARP)
Wolfgang Kellerer
© 2023 Technical University of Munich
336
Addressing...
A device is connected to a communication medium using a
network adapter
WiFi
Ethernet
Optic fiber
337
Addressing...
Each adapter in the world is uniquely identified by a…
MAC address
aka link-layer, physical, LAN or hardware address
98:90:96:dc:e0:80 48 bits – written in hex notation
Chosen by manufacturer
Allocated to manufacturers
by IEEE
Hard-coded when built
http://standards-oui.ieee.org/oui/oui.txt
(wait for the file to load entirely…)
Dell Inc.
One Dell Way
Round Rock TX 78682
US
338
src
dst
L2 Header
L3 Header
L4 Header
Message
Source and destination MAC addresses are included in the L2 header!
ff:ff:ff:ff:ff:ff
Is for everyone: broadcast address
339
✔
#
Know when a message is for us
#
Know where to forward a
message when not for us
✔
#
Know when to send (shared
medium)
#
Know how to address the L2
corresponding to a L3 (i.e., IP)
340
Wait! Aren’t IP and MAC addresses redundant?
What if we identify adapters with IPs?
§ The L2 would be restricted to work with IP
§ Adapters must be identified during bootstrap (need to talk to an
adapter to give it an IP address – DHCP)
§ If IP not stored in the adapter, the host would be interrupted by
each packet on the communication medium
§ If IP stored in the adapter, it would have to be reconfigured at each
IP address change
à Keeps the layers independent
341
OK! I know the IP I want to reach,
how to get the corresponding MAC?
Answer from LKN server,
destined for 192.168.1.10
192.168.1.11
needs the destination MAC…
ff:ff:ff:ff:ff:ff would bother everyone…
we don’t want this
192.168.1.10
Address Resolution Protocol
342
10.180.8.14
d8:67:d9:6e:a2:42
ff:ff:ff:ff:ff:ff
10.180.8.37
Who has 10.180.8.37?
Tell 10.180.15.254
(d8:67:d9:6e:a2:42)
ARP request
343
10.180.8.14
ARP reply
98:90:96:dc:e0:80
10.180.8.37
d8:67:d9:6e:a2:42
10.180.8.37 is at
98:90:96:dc:e0:80
344
10.180.8.14
d8:67:d9:6e:a2:42
L3 Header
L4 Header
Message
98:90:96:dc:e0:80
10.180.8.37
345
Each host maintains an ARP table caching IP-to-MAC mappings,
avoiding to issue an ARP request for each and every packet!
Here is how the ARP table of the router would look like now
IP address
MAC address
10.180.8.37
98:90:96:dc:e0:80
Old entries are removed after a configurable timeout
With IPv6, another but similar protocol is used: Neighbor Discovery
Protocol (NDP)
346
✔
#
Know when a message is for us
#
Know where to forward a
message when not for us
✔
✔
#
Know when to send (shared
medium)
#
Know how to address the L2
corresponding to a L3 (i.e., IP)
MAC address
Switch learningswitch
MAC
ARP
347
Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Data Networking
Lecture 14: Layer 2 Switching
Part 14c: Learning Switch
Wolfgang Kellerer
© 2023 Technical University of Munich
348
WAN
There, the next hop is chosen by
Network
See next lecture
349
LAN
Here, the next hop has to be chosen by
Link
350
L2 forwarding devices are only used in LANs
for interconnecting local devices without the
need of a complex L3…
Historically, they copied bits on all their output ports
router
web
Hub
Actually, no L2 – Not part of L2 topology
351
Great it’s a cheap solution!
Yes but:
ØInefficient
ØLimited to one LAN technology (since no L2)
ØWhat if we have a loop in the hub topology?
ØCould lead to collisions
Hubs are OBSOLETE since early 2000s
352
Let’s do this smartly…
OK, I don’t know where web is, let’s
flood like a hub
forwarding table
router
Well, now I know that router
is on my interface 1!
1
router
web
353
But if later…
Okay, I know where router
is, let’s forward on interface 1!
Note: if the packet comes
from its intended destination
port, it is dropped.
forwarding table
router
web
1
2
Well, now I know that web
is on my interface 3!
Note: a timer is introduced to
eventually forget the entry in
case a host is moved around
web
router
Learning switch
354
That’s good!
ØAvoid useless load on some links (table miss only with new hosts)
ØAllows different segments with different physical layer
technologies/speeds
ØNo possibility of collisions
No worries about maximum distance and minimum packet size for
CSMA/CD
ØPlug-and-Play!
ØAggregate bandwidth not limited by port speed
Possibility of simultaneous conversations at full link speed
355
WAIT!
What happens if we have a loop?
router
web
router
web
router
web
router
routerweb
web
router
router
web
web
router
web
router
router
web
web
router
web
router
web
router
web
router
router
web
web
Broadcast storm
router
router
web
web
router
web
router
web
Ø Huge load on the network
Ø Generation of duplicates
Though eventually stopped by web’s answer
356
What can we do to solve this?
357
Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Data Networking
Lecture 14: Layer 2 Switching
Part 14d: Spanning Tree Protocol (STP)
Wolfgang Kellerer
© 2023 Technical University of Munich
358
Let’s remove the loops!
Well, for redundancy, loops are useful!
Then, let’s logically remove the loops!
Spanning Tree Protocol (STP)
+ Logically remove loops from the topology, i.e., construct a logical
spanning tree
+ Only broadcast in this spanning tree, thereby avoiding storms
+ In case of failure, rebuild the spanning tree
359
How to construct a spanning tree?
Note: In the STP context,
- a LAN corresponds to a communication medium
separating a group of nodes
- a bridge corresponds to a L2 switch
Ø Elect a root (lowest ID)
Ø Compute distances to root
✔
✔
1
✔
✔
✔
✔
✔
2
✖
✔
✔
3
✔
Ø Elect the designated bridge
on each LAN (lowest
distance, then ID)
Ø Choose root ports, giving
best paths to the root bridge
Ø Block all ports which are not
root nor designated bridge’s
ports
360
This is done exchanging configuration
Bridge Protocol Data Units (BPDUs)
BPDU (R, d, X)
My ID
… and other things
Best distance from R to X
I am aware of
ID of who I think is the root
BPDUs (R, d, X) are ordered per increasing R, d, X and then sending port #
361
> Each switch initially thinks it is the root
2
1
3
362
>> A switch periodically sends BPDUs on LANs on which it thinks
it is the designated switch (i.e., all LANs if it thinks it is root)
(2, 0, 2)
(2, 0, 2)
2
(2, 0, 2)
(2, 0, 2)
(1, 0, 1)
1
(1, 0, 1)
(1, 0, 1)
(3, 0, 3)
(3, 0, 3)
(3, 0, 3)
3
(3, 0, 3)
363
>>> Once a switch receives a better BPDU than what it would
transmit on a LAN, it assumes it is not the designated bridge on
this LAN (and the root) anymore and updates the BPDUs it sends
on other LANs
(1, 1, 2)
(2, 0, 2)
✖
(2, 0, 2)
2
(1, 1, 2)
(2, 0, 2)
(2, 0, 2)
(1, 1, 2)
(1, 0, 1)
1
(1, 0, 1)
(1, 0, 1)
✖
(3, 0, 3)
✖
(3, 0, 3)
3
(3, 0, 3)
(1, 1, 3)
(3, 0, 3)
(1, 1, 3)
364
>>>> Once only one switch transmits on a LAN, STP is stabilized
(1, 1, 2)
2
(1, 1, 2)
(1, 0, 1)
(1, 0, 1)
1
(1, 1, 2)
(1, 0, 1)
3
(1, 1, 3)
(1, 1, 3)
365
>>>>> Ports from which a switch received the best BPDU and on
which they are still sending are forwarding, others are blocked
(1, 1, 2)
✔
✔
2
(1, 1, 2)
✔
(1, 1, 2)
(1, 0, 1)
✔
✔
(1, 0, 1)
✔
1
(1, 0, 1)
✖
✔
✔
✔
(1, 1, 3)
3
✔
(1, 1, 3)
Note: A port that is in the blocking state, can receive (process) BPDUs, but
cannot transmit. All frames that are received on that port are discarded.
366
We said STP is needed for having redundancy in the topology…
Well then, what happens if a link or node fails?
367
>>>>> If the age of a BPDU received on a port exceeds a given
threshold, it is discarded, and the switch recalculates the best BPDU
for each port
(1, 1, 2)
✔
2
✔
(1, 1, 2)
✔
(1, 1, 2)
(1, 0, 1)
✔
✔
(1, 0, 1)
1
✔
will timeout at 3
becomes root port
(1, 0, 1)
✖
✔
✔
✔
(1, 1, 3)
3
✔
(1, 1, 3)
368
>>>>> If the age of a BPDU received on a port exceeds a given
threshold, it is discarded, and the switch recalculates the best BPDU
for each port
(1, 1, 2)
✔
✔
2
(1, 1, 2)
✔
(1, 1, 2)
(1, 0, 1)
✔
✔
(1, 0, 1)
✔
1
✔
✔
(1, 2, 3)
3
✔
(1, 2, 3)
369
For failure detection to be faster, when a BPDU is
transmitted, its age is included
370
Nowadays, enhanced versions of STP are used
RSTP, eRSTP, MSTP, per VLAN RSTP, etc.
Indeed, STP can take up to 1 minute to recover from a
topology change
The basic idea is nevertheless the same!
371
Note: this might also require to know to
which of our network layers the message
has to be passed. This is called
demultiplexing and is done by using a
special field in the L2 header.
✔
✔
✔
✔
#
Know when a message is for us
#
Know where to forward a
message when not for us
#
Know when to send (shared
medium)
#
Know how to address the L2
corresponding to a L3 (i.e., IP)
372
Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Data Networking
Lecture 15: Routing
Part 15a: Layer 2 Addressing – IP Addresses
Wolfgang Kellerer
© 2023 Technical University of Munich
373
Recap
§ Switches work on Layer 2
§ Forward packets on one link/
within one physical domain
§ as all the MAC protocol mechanisms
we have learned so far
§ Routers work on Layer 3
§ the network layer moves packets over the whole Internet –
from host to host
374
What is covered in this lecture
§ Layer 3 Routing
– a short introduction or recap (you should know this from
Bachelor)
§ Layer 3 addresses: IP addresses
§ Link State Routing
§ Distance Vector Routing
375
Each networking device implements some
or all the layers
End applications exchange messages (e.g., HTTP)
Application
Transports messages between application processes (e.g., TCP)
Transport
Moves packets in the network from one host to another (e.g., IP)
Network
Moves packets from one node to the next one (e.g., Ethernet, WiFi)
Link
Moves individual bits on a physical link
Physical
376
Network
Link
Based on the work I did… Today!
Based on the work I did… Previous lecture!
377
Link
Role: send packets across the individual links
But what functionalities
should I have for this?
#
Know when a message is for us
à Addressing
#
Know where to forward a
message when not for us
à Forwarding
#
Know when to send (shared
medium)
à MAC
#
Know how to address the L2
corresponding to a L3 (i.e., IP)
à L3/L2 addressing translation
378
Network
Role: moves packets through the network
from a source to a destination
But what functionalities
should I have for this?
Let’s see what my neighbors
might ask me…
Transport
and
Link
379
Link
Network
Network
#
Link
Network
Link
#
Based on the work I did,
this message is for you
H
Based on the work I did,
this message is for you
H
Message
Know when a message is for us
H
Message
Based on the work I did, this message should
be sent
to XXX.XXX.XXX.XXX
on ethY a
Know
where to forward
H’
H
Message
message
notH for us
Based
on the work Iwhen
did,
H
Message
this message is for you
380
Transport
Network
Transport
Network
#
Based on the work I did, this message should
be sent now to IP XXX.XXX.XXX.XXX
Know where to forward a
Based
on the work Inot
did, this
should
message
for message
us
be sent to YYY.YYY.YYY.YYY on ethZ
H
H
Message
H
Message
381
Network
Role: moves packets through the network
But what functionalities
should I have for this?
#
Know when a message is for us
à Addressing
#
Know where to forward a
message when not for us
à Forwarding and routing
data plane
control plane
382
Addressing...
A device is connected to a communication medium using a
network adapter
WiFi
Ethernet
Optic fiber
383
Addressing...
IPv4 addresses
are associated to adapters (not to hosts – see later)
129.187.223.10
10000001
10111011
1101111
32 bits – written in
dotted-quad notation
00001010
384
src
dst
L3 Header
L4 Header
Message
Source and destination IP addresses are included in the L3 header!
385
Internet routers forward packets based on
their destination IP address
If IP addresses were assigned arbitrarily, routers would require
forwarding entries for all of them
That is 3.400.000.000 users as of 2016…
That is, routers should not know where any IP address is
à Hierarchical address allocation!
386
129.187.223.10/22 prefix length
10000001.10111011.11011111.00001010
prefix
identifies the network
suffix
identifies the host
in the network
sometimes a mask
is used
11111111.11111111.11111100.00000000
A host can have different interfaces belonging to different networks
That’s why IP addresses are associated to interfaces and not hosts
387
Routers outside 129.0.0.0/8 know how to reach 129.0.0.0/8… but do not know the
internal structure
/8
129.0.0.0
Routers in 129.0.0.0/8 know how to reach 129.187.0.0/16… but do not know the
internal structure
/16
129.187.0.0
Routers in 129.187.0.0/16 know how to reach 129.187.223.0/24… but do not know
the internal structure
/24
129.187.223.0
Routers in 129.187.223.0/24 know how to reach 129.187.223.10!
Host
129.187.223.10
à Forwarding table entries can be aggregated by sub-networks
E.g., 129.187.223.0/24 can add a host 129.187.223.11 without routers
outside the network having to know about it
388
IP addresses are then allocated hierarchically
0.0.0.0/0
129.187.0.0/16
162.0.0.0/8
37.0.0.0/8
37.4.0.0/15
162.159.0.0/16
129.187.0.0/16
Curious? Visit:
http://ftp.ripe.net/ripe/stats/membership/alloclist.txt
http://www.iana.org/assignments/ipv4-address-space/ipv4-address-space.xhtml
http://whois.arin.net
https://apps.db.ripe.net
129.187.223.10
389
Network
Role: moves packets through the network
But what functionalities
should I have for this?
✔
#
Know when a message is for us
à Addressing
#
Know where to forward a
message when not for us
à Forwarding and routing
data plane
control plane
390
Do you remember how routing works in the Internet?
391
Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Data Networking
Lecture 15: Routing
Part 15b: Routing
Wolfgang Kellerer
© 2023 Technical University of Munich
392
FORWARDING
ROUTING
goal
directing packets to an
outgoing link
computing the paths
packets will follow
scope
local
network-wide
implementation
hardware (usually)
software (always)
timescale
ns
~ 10 ms (hopefully)
plane
data plane
control plane
393
ROUTING
Three ways
#1
Tree-like topologies
Spanning Tree
#2
Rely on global network view
Link-State
computing the paths
packets will follow
network-wide
software (always)
#3
Rely on distributed computations Distance-Vector
~ 10 ms (hopefully)
control plane
394
#1
Tree-like topologies
Spanning Tree
L2: OK – L3: X à Does not scale
#2
Rely on global network view
Link-State
Let’s see how to build global view!
#3
Rely on distributed computations Distance-Vector
Let’s see how this is possible!
395
The network is abstracted into a graph with costs
e.g., length, €, speed, prop. to link load, etc.
For a packet from A to B, we want to route through the least-cost path
10
1
3
3
1
2
1
2
4
2
A 1
3
4
3
B
2
1
1
2
2
2
8
3
2
4
2
1
1
Contains information
learned from control traffic
To know where to forward, routers have to exchange control messages
Based on this control traffic, each node builds its Routing Information Base (RIB)
Based on its stable RIB, each node then builds its Forwarding Information Base (FIB)
396
OK easy!
Let’s exchange control messages to
build full knowledge of the network at each node and then run Dijkstra
Everyone broadcasts his connectivity to all other routers in the network
10
1
3
1
2
1
2
4
A 1
3
2
3
B
2
1
Link-State (LS) Routing
4
3
1
2
2
2
8
3
2
4
2
1
1
397
OK let’s do it different…
Let’s exchange control messages to directly compute least cost paths!
RIB
RIB
10
1
RIB
3
3
1
2
1
2
4
2
A 1
3
4
d(B) = 0
1
1
2
3
2
2
8
3
1
2
B
2
RIB
RIB
I am B
d(B) = 0
4
2
1
RIB
RIB
Note: The animations of this process are included in the slide set on Moodle. For saving resources, not all steps are
included in these printed lecture slides.
398
OK let’s do it different…
Let’s exchange control messages to directly compute least cost paths!
RIB
RIB
Ifc. 1 reaches B at a cost of 1
10
1
RIB
3
3
1
2
1
2
4
2
A 1
3
4
1
1
2
3
8
3
1
2
RIB
RIB
RIB
I am B
2
2
B
2
d(B) = 0
d(B) = 0
4
2
1
RIB
Ifc. 1 reaches B at a cost of 2
399
OK let’s do it different…
Let’s exchange control messages to directly compute least cost paths!
RIB
RIB
Ifc. 1 reaches B at a cost of 1
Ifc. 1 reaches B at a cost of 11
Ifc. 3 reaches B at a cost of 16
Ifc. 2 reaches B at a cost of 6
10
1
RIB
Ifc. 1 reaches B at a cost of 15
3
1
2
1
2
Ifc. 2 reaches B at a cost of 15
Ifc. 1 reaches B at a cost of 10
3
4
2
A 1
3
4
1
1
2
3
2
d(B) = 10
2
3
8
RIB
1
Ifc. 2 reaches B at a cost of 6
Ifc. 4 reaches B at a cost of 13
RIB
Ifc. 1 reaches B at a cost of 12
RIB
I am B
4
Ifc. 1 reaches B at a cost of 4
2
B
2
2
1
RIB
Ifc. 1 reaches B at a cost of 2
Ifc. 2 reaches B at a cost of 8
Ifc. 2 reaches B at a cost of 18
Ifc. 2 reaches B at a cost of 13
400
OK let’s do it different…
Let’s exchange control messages to directly compute least cost paths!
RIB
RIB
Ifc. 1 reaches B at a cost of 1
Ifc. 1 reaches B at a cost of 11
Ifc. 3 reaches B at a cost of 16
Ifc. 2 reaches B at a cost of 6
FIB
FIB
Packets for B : interface 1
Packets for B : interface 2
10
Distance-Vector (DV) Routing
1
RIB
Ifc. 1 reaches B at a cost of 15
3
1
2
1
2
Ifc. 2 reaches B at a cost of 15
Ifc. 1 reaches B at a cost of 10
3
4
2
FIB
3
4
1
Packets for B : interface 1
A 1
2
8
3
RIB
RIB
1
2
3
2
B
2
4
I am B
FIB
Packets for B : for me!
2
1
Ifc. 1 reaches B at a cost of 4
Note: this exchange
takes place for each
Ifc.
2
reaches
B
at a cost of 6
1
2
router in the network
and nodes henceRIB
FIB
Ifc. 1 reaches B at a cost of 2
exchange
distance
vectors
RIB
Packets for
B : interface 1 to all other routers
Ifc. 1 reaches B at a cost of 12
Ifc. 2 reaches B at a cost of 18
Ifc. 2 reaches B at a cost of 13
Ifc. 2 reaches B at a cost of 8
FIB
Packets for B : interface 1
FIB
Packets for B : interface 1
401
OK this is fine for relatively small networks.
But is it reasonable to assume that this is done
by all routers in a big network such as the Internet?
NO!
#
Not scalable.
#
Administrative reasons.
Interior Gateway Protocol (IGP): e.g., RIP (DV), OSPF, IS-IS (LS)
Exterior Gateway Protocol (EGP): e.g., BGP
How many ASs do you think there are in the Internet?
~ 55000 !!!
> http://www.cidr-report.org/as2.0
> http://www.iana.org/assignments/as-numbers/as-numbers.xhtml
402
Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Data Networking
Lecture 16: Multi Protocol Label Switching (MPLS)
Part 16a: Virtual Circuits
Wolfgang Kellerer
© 2023 Technical University of Munich
403
What is covered in this lecture
§ Virtual Circuit vs. Datagram networks
§ Multi Protocol Label Switching – a sub-layer between Layers 2 and
3 to extend Layer 2 over the whole Internet
§ Basis of the slides and additional reading
§ [Kurose, Ross] chapter 5.5.1 MPLS
Note: Some of the slides are adapted from the lecture „Computer Network Architectures and Multimedia” of Guy Leduc,
Université de Liège, Belgium
404
Connection-oriented vs. connection-less
§ datagram network provides network-layer connectionless service
§ virtual-circuit network provides network-layer connection service
§ analogous to TCP/UDP connection-oriented/connectionless
transport-layer services,
but on a lower layer:
§ service is host-to-host (not process to process)
§ no selection: network provides one or the other
§ implementation in network core
405
Virtual Circuits (VC)
§ Source to destination path behaves like a telephone circuit
§ performance-wise
§ network actions along source to destination path
§ call setup, teardown for each call before data can flow
§ each packet carries VC identifier (not destination host address)
§ every router on source to destination path maintains state for each
passing connection
§ link, router resources (bandwidth, buffers) may be allocated to VC
(dedicated resources = predictable service)
§ Recall: we also have dedicated resources in cellular networks
406
VC implementation
a Virtual Circuit consists of
1. path from source to destination
2. VC numbers, one number for each link along path
3. entries in forwarding tables in routers along path
§ packet belonging to VC carries VC number
(rather than destination address)
§ VC number can be changed on each link
§ new VC number comes from forwarding table
407
VC forwarding table
22
12
1
VC number
interface
number
forwarding table in
northwest router:
2
32
3
Incoming interface
Incoming VC #
Outgoing interface
Outgoing VC #
1
2
3
1
…
12
63
7
97
…
3
1
2
3
22
18
17
87
…
…
VC routers maintain connection state information!
408
Virtual circuits: signaling protocols
§ used to setup, maintain, and teardown VC
§ used in Asynchronous Transfer Mode (ATM), frame-relay, X.25
§ not used in today’s Internet
application
transport
network
data link
physical
5. data flow begins
4. call connected
1. initiate call
6. receive data
3. accept call
2. incoming call
application
transport
network
data link
physical
409
In contrast: Datagram networks
§ no call setup at network layer
§ routers: no state about end-to-end connections
§ no network-level concept of “connection”
§ packets forwarded using destination host address
application
transport
network 1. send datagrams
data link
physical
application
transport
2. receive datagrams network
data link
physical
410
Datagram Forwarding Table
routing algorithm
local forwarding table
dest address output link
address-range 1
address-range 2
address-range 3
address-range 4
4 billion IP addresses, so
rather than list individual
destination address
list range of addresses
(aggregate table entries)
3
2
2
1
IP destination address in
arriving packet‘s header
1
3 2
411
Datagram Forwarding Table
Destination Address Range
Link Interface
11001000 00010111 00010000 00000000
through
11001000 00010111 00010111 11111111
0
11001000 00010111 00011000 00000000
through
11001000 00010111 00011000 11111111
1
11001000 00010111 00011001 00000000
through
11001000 00010111 00011111 11111111
2
otherwise
3
But what happens if ranges don’t divide up so nicely?
412
Longest prefix matching
longest prefix matching
when looking for forwarding table entry for given destination
address, use longest address prefix that matches destination
address.
Destination Address Range
Link interface
11001000 00010111 00010*** ********
0
11001000 00010111 00011000 ********
1
11001000 00010111 00011*** ********
2
otherwise
3
examples:
DA: 11001000 00010111 00010110 10100001
DA: 11001000 00010111 00011000 10101010
which interface?
which interface?
413
Datagram or VC network: why?
Internet (datagram)
§ data exchange among
computers
§ “elastic” service, no strict
timing required
§ many link types
§ different characteristics
§ uniform service difficult
§ “smart” end systems
(computers)
§ can adapt, perform control,
error recovery
§ simple inside network,
complexity at “edge”
ATM (VC)
§ evolved from telephony
§ human conversation:
§ strict timing, reliability
requirements
§ need for guaranteed service
§ “dumb” end systems
§ complexity inside network
§ VC is a useful concept to
provide guaranteed service
in the Internet: MPLS
414
Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Data Networking
Lecture 16: Multi Protocol Label Switching (MPLS)
Part 16b: MPLS
Wolfgang Kellerer
© 2023 Technical University of Munich
415
Multiprotocol Label Switching (MPLS)
§ initial goal: high-speed IP forwarding using fixed length label
(instead of IP address)
§ fast lookup using fixed length identifier (rather than shortest prefix
matching)
§ borrowing ideas from Virtual Circuit (VC) approach
§ but IP datagram still keeps IP address!
PPP or Ethernet
header
MPLS header
label
20
IP header
remainder of link-layer frame
Exp S TTL
3
1
5
416
IP over MPLS
417
MPLS capable routers
§ a.k.a. label-switched router
§ forward packets to outgoing interface based only on label value
(don’t inspect IP address)
§ MPLS forwarding table distinct from IP forwarding tables
§ flexibility: MPLS forwarding decisions can differ from those of IP
§ use destination and source addresses and TOS Byte, so that flows can
be routed to same destination differently (traffic engineering)
§ re-route flows quickly if link fails: precomputed backup paths (useful for
VoIP)
§ Signaling protocol is needed to set up forwarding state based on
labels in nodes
418
MPLS versus IP paths
R6
D
R4
R3
R5
A
R2
IP routing: path to destination determined by
destination address alone
IP router
419
MPLS versus IP paths
entry router (R4) can use different MPLS
routes to A based, e.g., on source address
R6
D
R4
R3
R5
A
R2
IP routing: path to destination determined by
destination address alone
MPLS routing: path to destination can be based on
source and destination address
fast re-route: precompute backup routes in case of
link failure
IP-only
router
MPLS and
IP router
420
MPLS signaling for traffic engineering
§ Extend the intra-domain routing protocol
§ OSPF link-state flooding packets can carry additional link information
used by MPLS routing, e.g., amount of “reserved” link bandwidth
§ Establish MPLS paths (i.e., forwarding state based on labels)
§ Done by ingress MPLS router, typically by RSVP-TE (see later)
RSVP-TE
R6
D
R4
R5
modified
link state
flooding
A
421
MPLS forwarding tables
in
label
out
label dest
out
interface
10
12
8
0
0
1
A
D
A
R6
R4
R5
in
label
out
label dest
out
interface
10
6
A
1
12
9
D
0
0
0
1
1
R3
D
0
A
outR1
label dest
out
interface
0
R2
in
label
8
out
label dest
6
A
out
interface
in
label
6
-
A
0
0
422
Multiprotocol: Above and Below
§ Label switching is not specific to any particular network layer
§ Label switching can operate over any link layer protocol
§ MPLS = Multiprotocol Label Switching
423
LDP: Label Distribution Protocol
§ LDP is a signaling protocol to distribute FEC-to-label bindings
among LSRs
§ FEC (Forwarding Equivalence Class): Defines a certain forwarding
behavior, e.g., priorities
§ The routing protocol (e.g., OSPF) is still useful to distribute FECto-NextHop bindings
§ That is the network topology information
§ Possibly extended with QoS-related link metrics (link delay, link capacity,
etc.)
424
Establishing LSPs using RSVP
§ RSVP = Resource ReserVation Protocol
§ Source sends PATH message to destination
§ Route taken by PATH is dictated by IP routing!
§ Destination replies using RESV message
§ Following the same route (backward) as the PATH message
§ Here RESV also used to piggyback MPLS labels!
425
Chair of Communication Networks
TUM School of Computation, Information and Technology (CIT)
Technical University of Munich
Data Networking
Lecture 17: Programming the Network
Wolfgang Kellerer
New adapted lecture content
Several slides are adapted from thre lecture „Programmable Networks“ by Prof. Mina Tahmasbi Arashloo, Univ. of Waterloo, CA
© 2024 Technical University of Munich
1
The Networking Mantra
internet
“the network is stupid” = the network is simple
Adapted from Holger Karl, SDN lecture
Is this reflected in the real world?
… we have lost our way
Many complex functions baked into the infrastructure
OSPF, BGP, multicast, differentiated Traffic Engineering, NAT, firewalls,
MPLS, redundant layers, …
It may be stupid, but it surely isn’t simple
One example … to adapt your network
ssh to each router on the path,
enter command line commands, for
each protocol,…
• Configure a pre-defined set of distributed protocols (e.g.,
OSPF, BGP, etc.) to pick your desired forwarding paths
4
Possible ways forward …
• Write a program that decides the forwarding paths
• Have a runtime configure the underlying protocols or
directly communicate forwarding rules to network devices
• Write a program that specifies
how packets are parsed and
processed
• Have a compiler implement it
across user-space, the Kernel,
and hardware accelerators
• Write a program that specifies
how packets are parsed and
processed
• Have a compiler translate that
into instructions for switch
hardware
5
Program your network!
We have entered the era of network programming:
network softwarization
Programmable
Networks
6
Possible ways forward …
• Write a program that decides the forwarding paths
• Software
Have a runtime
configure Networking
the underlying protocols
Defined
(SDN)or
directly communicate forwarding rules to network devices
• Write a program that specifies
how packets are parsed and
Smart
Network Interface
processed
•Cards
Have a(Smart
compiler implement
NICs) it
across user-space, the Kernel,
and hardware accelerators
• Write a program that specifies
Programming
Protocol
how packets are parsed
and
processed
Independent
Packet
• Have a compiler translate that
Processors (P4)
into instructions for switch
hardware
7
Software Defined Networking (SDN)
• Write a program that decides the forwarding paths
• Have a runtime configure the underlying protocols or
directly communicate forwarding rules to network devices
8
Recap: Legacy networking
Recap: Legacy networking
B
B
Recap: Legacy networking
B
B
?
Recap: Legacy networking
Solution: routing algorithms (e.g. OSPF, IS-IS)
B
B
?
Recap: Legacy networking
Solution: routing algorithms (e.g. OSPF, RIP)
Nodes exchange information about the network
I am B
I am B
B
Recap: Legacy networking
Solution: routing algorithms (e.g. OSPF, IS-IS)
Nodes exchange information about the network
I can reach B in 1 hop
I can reach B in 1 hop
I can reach B in 1 hop
B
Recap: Legacy networking
Solution: routing algorithms (e.g. OSPF, IS-IS)
Nodes exchange information about the network
I can reach B in 2 hops
I can reach B in 2 hops
I can reach B in 2 hops
I can reach B in 2 hops
B
Recap: Legacy networking
Solution: routing algorithms (e.g. OSPF, IS-IS)
Nodes exchange information about the network
B
I can reach B in 3 hops
Recap: Legacy networking
Solution: routing algorithms (e.g. OSPF, IS-IS)
Nodes exchange information about the network
B
Based on this control traffic, each node builds its Routing Information Base (RIB)
Recap: Legacy networking
Solution: routing algorithms (e.g. OSPF, IS-IS)
Nodes exchange information about the network
RIB
Interface 1 reaches B in 3 hops
Interface 2 reaches B in 4 hops
1
B
2
Based on this control traffic, each node builds its Routing Information Base (RIB)
Recap: Legacy networking
Solution: routing algorithms (e.g. OSPF, IS-IS)
Nodes exchange information about the network
RIB
Interface 1 reaches B in 3 hops
Interface 2 reaches B in 4 hops
FIB
Packets for B : interface 1
1
B
2
Based on this control traffic, each node builds its Routing Information Base (RIB)
Based on its stable RIB, each node then builds its Forwarding Information Base (FIB)
Recap: Legacy networking
RIB
Interface 1 reaches B in 3 hops
Interface 2 reaches B in 4 hops
FIB
Packets for B : interface 1
1
B
2
Each node runs a control plane (the brain) and a data plane (switching fabric).
Recap: Legacy networking
Control plane
Data plane
1
B
2
Each node runs a control plane (the brain) and a data plane (switching fabric).
Recap: Legacy networking
Control plane
Control plane
Data plane
Data plane
Control plane
Control plane
Control plane
Data plane
Data plane
Data plane
Control plane
1
B
Control plane
2
Data plane
Data plane
Each node runs a control plane (the brain) and a data plane (switching fabric).
Recap: Legacy networking
Control plane
Control plane
Data plane
Data plane
Control plane
Control plane
Control plane
Data plane
Data plane
Data plane
Control plane
1
B
Control plane
2
Data plane
Data plane
Each node runs a control plane (the brain) and a data plane (switching fabric).
Data plane is an easy forwarding task based on the FIB.
Control plane requires more intelligence to process and generate control packets.
Legacy networking
Drawbacks of this legacy solution:
• complex distributed routing protocols
• slow convergence
• requires intelligent switches knowing those routing protocols (high price)
• hard to develop a new networking protocol as each device should be upgraded
• difficult to configure the network globally (traffic engineering)
• not flexible
Software-Defined Networking (SDN)
From…
Control plane
Control plane
Data plane
Data plane
Control plane
Control plane
Control plane
Data plane
Data plane
Data plane
Control plane
1
Control plane
2
Data plane
Data plane
B
Software-Defined Networking (SDN)
Control plane
… to this
Data plane
Data plane
Data plane
Data plane
Data plane
B
1
2
Data plane
Data plane
Software-Defined Networking (SDN)
SDN Controller
Control plane
Data plane
Data plane
Data plane
Data plane
Data plane
B
1
2
Data plane
Data plane
Separation of the control and data planes.
Switches now only run the data plane.
The control plane is now centralized, running on a so-called SDN controller.
Software-Defined Networking (SDN)
SDN Controller
Control plane
Data plane
Data plane
Data plane
Data plane
Data plane
B
1
2
Data plane
Data plane
Between the switches and the controller: open interface (e.g.
).
Software-Defined Networking (SDN)
SDN Controller
Control plane
Data plane
Data plane
Data plane
Data plane
Data plane
B
1
2
Data plane
Data plane
Between the switches and the controller: open interface (e.g.
The controller
• Gets state information from forwarding elements
• Give control directives to forwarding elements
using this interface.
).
Software-Defined Networking (SDN)
SDN Controller
Control plane
Data plane
Data plane
Data plane
Data plane
FIB
Empty
B
1
B
2
Data plane
Data plane
Software-Defined Networking (SDN)
SDN Controller
Control plane
I have a packet for B
Data plane
Data plane
Data plane
Data plane
FIB
Empty
B
1
B
2
Data plane
Data plane
Software-Defined Networking (SDN)
SDN Controller
Control plane
Programming FIB
using e.g. OpenFlow
Data plane
Data plane
Data plane
Data plane
FIB
Empty
B
1
B
2
Data plane
Data plane
Software-Defined Networking (SDN)
SDN Controller
Control plane
FIB
FIB
B on ifc 1 through ifc 2
B on ifc 1 through ifc 2
1
2
2
1
Data plane
Data plane
FIB
B through interface 1
B
1
B
Data plane
Data plane
Software-Defined Networking (SDN)
SDN Controller
Control plane
FIB
FIB
B on ifc 1 through ifc 2
B on ifc 1 through ifc 2
1
2
2
1
Data plane
Data plane
FIB
B through interface 1
1
B
B
2
Data plane
Data plane
Software-Defined Networking (SDN)
Advantages of SDN versus the legacy solution:
• complex distributed routing protocols
• centralized thinking based on a consistent, up-to-date global network view
• slow convergence
• Faster convergence thanks to global knowledge
• requires intelligent switches knowing those routing protocols (high price)
• switches can now be commodity hardware (low price)
• hard to develop a new networking protocol as each device should be upgraded
• easy innovation: easier implementation and testing of software on the controller
• difficult to configure the network globally (traffic engineering)
• network can now be centrally configured, traffic engineering easier
• not flexible
• easy to develop new features (firewall) – more flexible
There are also drawbacks…
Software-Defined Networking (SDN)
Advantages of SDN versus the legacy solution:
• complex distributed routing protocols
• centralized thinking based on a consistent, up-to-date global network view
• slow convergence
• Faster convergence thanks to global knowledge
• requires intelligent switches knowing those routing protocols (high price)
• switches can now be commodity hardware (low price)
• hard to develop a new networking protocol as each device should be upgraded
• easy innovation: easier implementation and testing of software on the controller
• difficult to configure the network globally (traffic engineering)
• network can now be centrally configured, traffic engineering easier
• not flexible
• easy to develop new features (firewall) – more flexible
There are also drawbacks…
• single point of failure
• switch-controller latency
• scalability
Software-Defined Networking (SDN) - Firewall
SDN Controller
Control plane
Data plane
Data plane
Data plane
Data plane
Data plane
B
1
2
Data plane
Data plane
Software-Defined Networking (SDN) - Firewall
SDN Controller
Control plane
Data plane
Data plane
Data plane
Data plane
Data plane
B
1
ĸInternet
2
Data plane
Data plane
Software-Defined Networking (SDN) - Firewall
SDN Controller
Control plane
Configuration
of the switch
to refuse SSH
inwards
Data plane
Data plane
Data plane
Data plane
Data plane
B
1
ĸInternet
2
Data plane
Data plane
Software-Defined Networking (SDN) - Firewall
SDN Controller
Control plane
Data plane
Data plane
Data plane
Data plane
FIB
drop traffic from 3 to port 22
3
ĸInternet
B
1
2
Data plane
Data plane
SDN – Interfaces: A Compass for SDN*
Application
Control
Module
Application
Control
Module
Application
Control
Module
Application Control Plane
Northbound API
Network
Control
Module
SDN Network
Control Plane
Network
Control
Module
Application
Control Interface
SDN Network Control
Plane
Legacy Network
Control Plane
Eastbound API
Westbound API
Example: OpenFlow protocol
Southbound API
User
Hypervisor
Hypervisor
Hypervisor
vSwitc
h
vSwitc
h
vSwitch
Switch
Switch
User
Switch
User
Cloud
SDN WAN
Legacy WAN
* Michael Jarschel, Thomas Zinner, Tobias Hoßfeld, Phuoc Tran-Gia, and Wolfgang Kellerer, Interfaces,
Attributes, and Use Cases: A Compass for SDN, IEEE Communications Magazine, 52, 2014.
Remember: 5G Core Architecture
AUSF
control plane
N12
N13
N8
AF – Application Function
AMF – Access and Mobility Function
AUSF – Authentication Server Function
PCF – Policy Control Function
SMFF – Session Management Function
UDM – Unified Data Management
UPF – User Plane Function
Control Plane
Data Plane
UDM
N10
N15
AMF
N11
SMF
N4
N1
N2
UE
(R)AN
N3
5G base station:
gNB
(next generation NodeB)
•
•
UPF
UPF
N7
PCF
N5
control/data
plane split
(SDN like)
AF
Data Network
N6
data plane: handling of user packets
Separation of control and data plane
(according to the concept of Software-defined Networking, SDN)
Control Plane: Network Functions (Service-oriented Architecture, SOA)
OpenFlow Protocol - Example
OpenFlow
Protocol
(SSL/TCP)
Software
Layer
PC
OpenFlow Client
Controller
Flow Table
Hardware
Layer
MAC
src
MAC
dst
IP
Src
IP
Dst
TCP
TCP
Action
sport dport
*
*
*
5.6.7.8
*
*
port 1
Switch to Controller
ż connect
ż disconnect
ż status of ports
ż packet (e.g., if it matches no rules)
ż traffic statistics
Match – Action Table
port 1
5.6.7.8
port 2
port 3
Controller to Switch
ż add/remove/modify table entries
ż packet
ż request traffic statistics
port 4
1.2.3.4
OpenFlow Basics: Match – Action Table
Flow Table Entries
Rule
Action
Stats
Packet + byte counters
1. Forward packet to zero or more ports
2. Encapsulate and forward to controller
3. Send to normal processing pipeline
4. Modify Fields
5. Any extensions you add!
Switch MAC
Port src
MAC Eth
dst
type
port3 00:20.. 00:1f.. 0800
VLAN IP
ID
Src
IP
Dst
vlan1 1.2.3.4 5.6.7.8
IP
Prot
4
TCP
TCP
Action
sport dport
17264 80
port6
Examples of flow tables
Switch MAC
src
MAC Eth
dst
type
VLAN IP
ID
Src
IP
Dst
IP
Prot
TCP
TCP
Action
sport dport
*
00:1f:.. *
*
*
*
*
MAC Eth
dst
type
VLAN IP
ID
Src
IP
Dst
IP
Prot
TCP
TCP
Action
sport dport
*
5.6.7.8 *
*
TCP
TCP
Action
sport dport
port6,
port7,
*
*
port9
Switching Port
Routing
Switch MAC
Port src
*
VLAN
Switching
Firewall
*
*
*
*
*
*
*
*
port6
port6
Switch MAC
Port src
MAC Eth
dst
type
VLAN IP
ID
Src
IP
Dst
IP
Prot
*
00:1f.. *
vlan1 *
*
*
MAC Eth
dst
type
VLAN IP
ID
Src
IP
Dst
IP
Prot
TCP
TCP
Action
sport dport
*
*
*
*
*
Switch MAC
Port src
*
*
*
*
*
22
drop
OpenFlow protocol
Open Flow - the early days (2012 - )
OpenFlow became quite popular
It was simple
Yet, it captured the essence of how many network devices process packets
MAC learning, IP forwarding, Access control (ACL), NAT, …
OpenFlow - today
It has become a lot more complicated
Multiple tables
More headers, actions, etc.
Bundled communication messages
…
It is still a popular abstraction for configuring different components of
switches, routers, network interface cards (NICs), middleboxes, etc.
46
Programming the Data Plane with P4
(a data plane programming language introduced in 2014)
Programming Protocol
Independent Packet
Processors (P4)
• Write a program that specifies
how packets are parsed and
processed
• Have a compiler translate that
into instructions for switch
hardware
47
P4 in a nutshell
Not restricted to certain
protocols Æ protocol
independent
Much more flexibility in
specifying packet
processing
P4 programs specify
Headers and parsing
Match-action tables
How packets are processed in the data plane using those tables
48
Example: Destination-based IP forwarding
Decide which port to forward the packet to
based on the destination IP address
Destination IP is a field supported by
OpenFlow
So, a program on the controller can
implement destination-based forwarding by
installing rules into OpenFlow-based
network devices
49
Example: Destination-based IP forwarding in OpenFlow
50
Example: Destination-based IP forwarding in P4
1. Define the headers that we need for
processing incoming packets.
The Ethernet and IP header
Don't need anything else beyond that
2. Define how they should be parsed from
the packet
51
Defining the Ethernet header
52
Defining the IPv4 header
53
Instantiating the headers
Next, we need to instantiate the headers. In this case, we expect our
packets to have one Ethernet header and one IP header
54
Parsing headers
P4 parsers are state machines
The parser starts from the "start" state and transitions to user-defined
states as it parses bits from the packet and puts them into headers
Metadata are extra variables that accompany the packet as it is processed in
the switch
You can read from and write to them in different parts of a P4 program
You can define your own metadata or use special ones that the underlying
target makes available to you
55
Parser States
extract takes bits out of
the packet and put them in
the header instances
With select, we can pick
which state to transition
to next based on the other
"variables" in the program
56
Example: Destination-based IP forwarding in P4
We have extracted bits from the packet
into headers
We can read from and write to these
headers in control blocks
57
P4 can do much more …
Controls
Tables
Actions
more in our lab
„Programmable Networks Lab“
58
P4 Architecture(s)
Data planes can have very different architectures and/or allow varying
levels of programmability
59
P4
Since 2014, the community around P4 has only grown
It has seen widespread adoption by industry and academia
Many papers that either use P4 for various new applications or
improving the language itself and its compilers
It has found applications in many places
Prototyping new hardware features
Offloading all sorts of functionality to the switch
Being used as a specification language for fixed-function switches
…
60
Smart Network Interface Cards (Smart NICs)
• Write a program that specifies
how packets are parsed and
processed
• Have a compiler implement it
across user-space, the Kernel,
and hardware accelerators
Smart Network Interface
Cards (Smart NICs)
61
SmartNICs in a nutshell
general-purpose
processor
running software
fixed-function
hardware
• Complicated
• Changes frequently
• Simple
• Does not change often
A great division of labor, but
CPU cannot keep up with the NIC,
i.e., process packets at line rate
62
SmartNICs in a nutshell
What can we do?
• move the border btw. CPU and NIC
• optimize the movement of packets
btw. CPU and NIC
general-purpose
processor
running software
fixed-function
hardware
Solution:
programmable hardware processor
on the NIC
a regular NIC +
a programmable domain-specific
hardware
63
Network Programs
• Write a program that decides the forwarding paths
• Have a runtime configure the underlying protocols or
directly communicate forwarding rules to network devices
• Write a program that specifies
how packets are parsed and
processed
• Have a compiler implement it
across user-space, the Kernel,
and hardware accelerators
• Write a program that specifies
how packets are parsed and
processed
• Have a compiler translate that
into instructions for switch
hardware
64
Network Programs = Network Functions
Where to
run?
• Write a program that decides the forwarding paths
• Have a runtime configure the underlying protocols or
directly communicate forwarding rules to network devices
• Write a program that specifies
how packets are parsed and
processed
• Have a compiler implement it
across user-space, the Kernel,
and hardware accelerators
• Write a program that specifies
how packets are parsed and
processed
• Have a compiler translate that
into instructions for switch
hardware
65
Network Functions
Recap: Server
Virtualization
Virtual Machines (VM)
run on the same host
VMs need to share
network resources and
connect to the network
66
Network Functions
Virtual Network Function (VNF)
Virtual Switch: Software
Switch + resource
management betw. VMs
Realization: SDN, P4,…
VMs can run network
programs = network
functions
New concept: Network
Function Virtualization
(NFV) Æ network
functions can run almost
anwhere in the network
(in VMs on servers)
67
What is a Network Function?
Traditionally: switches and routers do packet processing only on layer 2
and 3 (forwarding)
Soon, more was needed in the middle of the network (look into higher
layers)
Network address translation (NAT), stateful firewalls, load balancers, proxies,
intrusion detection and prevention
Middleboxes: specialized devices
proprietary hardware implementing server + switch + software
Network function: generic term to describe network processing
Network function virtualization (NFV), network functions are as software
inside VMs instead of each having a separate (specialized) physical device
Directly program those functionalities onto network devices
68
Remember: 5G Core Architecture
AUSF
control plane: network
functions
N12
N13
N8
AF – Application Function
AMF – Access and Mobility Function
AUSF – Authentication Server Function
PCF – Policy Control Function
SMFF – Session Management Function
UDM – Unified Data Management
UPF – User Plane Function
Control Plane
Data Plane
UDM
N10
N15
AMF
N11
SMF
N7
N4
N1
PCF
N5
AF
Data Network
N2
UE
(R)AN
N3
UPF
UPF
N6
5G base station:
gNB
(next generation NodeB)
•
•
Separation of control and data plane
(according to the concept of Software-defined Networking, SDN)
Control Plane: Network Functions (Service-oriented Architecture, SOA)
Programmable Networks - Summary
SDN and OpenFlow
(traditional) distributed indirect control is challenging and error-prone!
A top-down approach: make control decisions (e.g., paths) centrally and
directly install rules in the switches to implement it
5G core architecture
Programming the Data Plane with P4
Don’t stop at just installing rules - make the data plane pipeline programmable
Programmable parsing, specifying match-action tables and layouts, etc.
“Smart" Network Interface Cards
End-points do network processing too, and that may become the overhead
Can we program network interface cards to accelerate all of a part of it?
What is the right hardware architecture and programming model?
70
0
You can add this document to your study collection(s)
Sign in Available only to authorized usersYou can add this document to your saved list
Sign in Available only to authorized users(For complaints, use another form )