0% found this document useful (0 votes)
42 views93 pages

Week 13 Review

Slides form lecture

Uploaded by

fakejadelee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views93 pages

Week 13 Review

Slides form lecture

Uploaded by

fakejadelee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 93

COMP5416/4416:

Advanced
Network
Technologies
Week 13 Review
Wei Bao
School of Computer Science

The University of Sydney Page 1


Outline of Today

– Lecture
– MQTT and Multipath TPC (Week 11)
– Review
– Final exam schedule
– Q&A
– Tutorial
– Sample questions
– Q&A
The University of Sydney Page 2
Unit of Study Survey is available!

– COMP4416
– https://student-surveys.sydney.edu.au/s/uss901930

– COMP5416
– https://student-surveys.sydney.edu.au/s/uss901963

The University of Sydney Page 3


MQTT

Message Queuing Telemetry Transport


ISO/IEC 20922

The University of Sydney Page 4


MQTT

MQTT: Lightweight, publish-subscribe network protocol that transports


messages between devices.
Runs over TCP/IP
For IoT networks

Two types of entities:


Broker: server receives and forwards messages.
Client: device connected to broker

Purpose: publish-subscribe information.

The University of Sydney Page 5


https://mqtt.org/ Page
5
MQTT Topics

Information is organized as topics.

Publish
Subscriber subscribes topics.
Publisher has a new item of data to distribute.
Publisher sends to broker.
Broker distributes to clients subscribed to the topic.

Publisher does not need to know number/location of the


subscribers.
Subscriber does not need to configure publishers.

The University of Sydney Page 6


MQTT Topics
Topics are structured in hierarchy, using / as delimiter

e.g.,house/room1/maindoor

Wildcard for multiple topics


# multiple-level topics must be in the end
house/#
house/room1/maindoor
house/room1/window
house/room2/maindoor
house/room2/window
house/maindoor
+ single-level topics
house/+/maindoor
house/room1/maindoor
house/room2/maindoor

The University of Sydney Page 7


MQTT Packet

Fixed header

The University of Sydney Page 8


MQTT Packet
Type:
CONNECT: connection request
CONNACK: connection ACK
PUBLISH: publish message
SUBCRIBE: subscribe request
SUBACK: subscribe ACK
UNSUBSCRIBE: unsubscribe request
UNSUBSCRIBEACK: unsubscribe ACK
others

Flag: mostly reserved.


For PUBLISH packets, it contains duplicate transmission flag and QoS level.

Remaining length:
Length of the packet (variable header + payload)

Variable Header

The University of Sydney Page 9


MQTT QoS level

Data loss can sill occur if TCP connection is down and messages in
transit is lost.

QoS 0: At most once - the message is sent only once and the client
and broker take no additional steps to acknowledge delivery (fire and
forget).
e.g., temperature sensor
QoS 1: At least once - the message is re-tried by the sender multiple
times until acknowledgement is received (acknowledged delivery).
e.g., door sensor (status of door)
QoS 2: Exactly once - the sender and receiver engage in a two-level
handshake to ensure only one copy of the message is received
(assured delivery).
e.g., smoke sensor (alarm signal)

The University of Sydney Page 10


MQTT QoS level

QoS 0: At most once - the message is sent only once and the client
and broker take no additional steps to acknowledge delivery (fire and
forget).

https://www.hivemq.com/blog/mqtt-essentials-part-6-mqtt-quality-of-service-levels/

The University of Sydney Page 11


MQTT QoS level

QoS 1: At least once - the message is re-tried by the sender multiple


times until acknowledgement is received (acknowledged delivery).

https://www.hivemq.com/blog/mqtt-essentials-part-6-mqtt-quality-of-service-levels/

The University of Sydney Page 12


MQTT QoS level

QoS 2: Exactly once - the sender and receiver engage in a two-level


handshake to ensure only one copy of the message is received.

PUBREC: publication received.


PUBREL: publication released.
PUBCOM: publication completed.
(Other MQTT packet types. )

https://www.hivemq.com/blog/mqtt-essentials-part-6-mqtt-quality-of-service-levels/
The University of Sydney Page 13
MPTCP

Multi-path TCP
IETF RFC 6824 (older version)
IETF RFC 8684 (latest version)

The University of Sydney Page 14


MPTCP in Stack

Application

MPTCP

Subflow Subflow
(TCP) (TCP)

https://pocketnow.com/multipath-tcp
IP
Different IP addresses for different subflows.
The University of Sydney Page 15
Option Field

SYN+Option
SYN+ACK+Option
ACK

SYN+OtherOption
SYN+ACK+OtherOption
ACK
The University of Sydney Page 16
Token


The University of Sydney Page 17
Initiation and Join

SYN
LE
AB
MP_CAP

The University of Sydney Page 18


Initiation and Join

SYN/A
MP_C CK
APAB
LE

The University of Sydney Page 19


Initiation and Join

The University of Sydney Page 20


Initiation and Join

SYN
JOIN

The University of Sydney Page 21


Initiation and Join

CK
SYN/A
JOIN

The University of Sydney Page 22


Initiation and Join

The University of Sydney Page 23


MPTCP sequence numbers

• MPTCP uses a Data Sequence Number (DSN) to


number all data sent over the MPTCP connection.

• Each subflow has its own sequence number space.

The University of Sydney Page 24


MPTCP sequence numbers
DSN 19600 19601 19602 19603 19604
DSN 19600 19601 19602 19603 19604
subflow1 1400 1401 1402
subflow1 1400 1401 1402
subflow2 7001 7002
subflow2 7001 7002
Host A Host B
Address A1 Address A2 Address B1

SEQ: 1400, DSN: 19600


ACK: 1401, DA: 19601 If one subflow fails, the other
subflow can be used for
SEQ: 1401, DSN: 19601 retransmission.
ACK: 1402, DA: 19602
SEQ: 7001, DSN: 19602
ACK: 7002, DA: 19603
SEQ: 1402, DSN: 19603
ACK: 1403, DA: 19604
SEQ: 7002, DSN: 19604
ACK: 7003, DA: 19605
The University of Sydney http://www.cis.udel.edu/~amer/856/mptcp.12f.pptx Page 25
MPTCP sequence numbers

source port # dest port # Subflow source port # Subflow dest port #

sequence number Subflow sequence number


acknowledgement number Subflow acknowledgement number
head not head not
len used
Code receive window len used Code receive window
checksum Urg data pointer checksum Urg data pointer
Data sequence number
options (variable length) Data acknowledge number
Other options

application application
data data
(variable length) (variable length)

The University of Sydney Page 26


Flow Control

Receive Window: The receive window in the TCP header


indicates the amount of free buffer space for the whole data-level
connection (as opposed to the amount of space for this subflow)
that is available at the receiver.

The University of Sydney Page 27


Congestion Control

Can we run regular TCP congestion control on each subflow?

No. Not fair.

MPTCP should take as much capacity as TCP at a bottleneck link,


no matter how many subflows MPTCP is using.

A MPTCP with
two subflows

A regular TCP

The University of Sydney Page 28


Congestion Control

For each ACK received on subflow i, increase cwnd_i by

𝑚𝑖𝑛
( 𝛼 ∙𝑏𝑦𝑡𝑒𝑠 _ 𝑎𝑐𝑘𝑒𝑑 ∙ 𝑀𝑆𝑆 𝑖 𝑏𝑦𝑡𝑒𝑠 _ 𝑎𝑐𝑘𝑒𝑑 ∙ 𝑀𝑆𝑆 𝑖
𝑐𝑤𝑛𝑑𝑡𝑜𝑡𝑎𝑙
,
𝑐𝑤𝑛𝑑 𝑖 )
𝛼=𝑐𝑤𝑛𝑑 𝑡𝑜𝑡𝑎𝑙 ∙ ¿ ¿
For each packet loss, halve the window size cwnd_i

ggressiveness of the multipath flow


s_acked: number of bytes newly acknowledged
d_total: sum of the congestion windows of all subflows
(need to use ssthresh_i instead of cwnd_i if subflow is in fast retransm
i: round-trip time (smoothed round-trip time estimate used by TCP) of subflow i.
_i: maximum segment size on subflow i
d_i: congestion windows of subflow i More details: see RFC 6356
The University of Sydney Page 29
COMP4416/5416 Review

The University of Sydney Page 30


Protocol Stack

› application: supporting network application


applications
- FTP, SMTP, HTTP
transport
› transport: process-process data transfer
- TCP, UDP
network
› network: routing of datagrams from
source to destination
- IP, routing protocols link
› link: data transfer between neighboring
network elements physical
- Ethernet, 802.11 (WiFi)
› physical: bits “on the wire”

The University of Sydney Page 31


Internet Protocol Stack: Practice

HTTP, FTP, SMTP, DNS, P2P,


application SIP, RTP, MQTT, CoAP, QUIC Video/Audio
Socket
TCP, UDP, Transport Protocol Over TCP/UDP
transport MPTCP

network Multimedia network network Support

Wireless
network link

physical

The University of Sydney Page 32


Internet Protocol Stack: Theory

application Web with cache Page rank

transport Max min fairness


Network
Optimization
network Queueing Theory
Erlang B
Erlang C
Example of
link Principles Game Theory Linear Block Code
SNR vs. BER of CRC Code
CDMA Convolutional Code
physical

The University of Sydney Page 33


Internet Protocol Stack:
Programming/Experiment

application CoAP experiment


Wireshark Socket Socket programming
transport

network Queue simulator

link Handoff simulator

physical

The University of Sydney Page 34


Internet Protocol Stack

application HTTP, FTP, SMTP, DNS, P2P

transport

network

link

physical

The University of Sydney Page 35


HTTP

HTTP: hypertext
transfer protocol
– Web’s application HT
TP
req
layer protocol PC running ues
t
HT
– client/server model Firefox browser TPr
esp
– client: browser ons
e
that requests,
receives, (using u es
t
HTTP protocol) req server
T P nse
and “displays” HT s po running
re Apache Web
Web objects HT
T P
server
– server: Web
server sends
(using HTTP iPhone running
Safari browser
protocol) objects
in response to
requests
The University of Sydney Page 36
FTP: the file transfer protocol

TCP control connection,


server port 21

TCP data connection,


FTP server port 20 FTP
client server

The University of Sydney Page 37


Email

user
mail user
SMTP SMTP access
agent agent
protocol
(e.g., POP,
IMAP)

sender’s mail receiver’s mail


server server

– SMTP: delivery/storage to receiver’s server


– mail access protocol: retrieval from server
– POP: Post Office Protocol [RFC 1939]: authorization, download
– IMAP: Internet Mail Access Protocol [RFC 1730]: more features,
including manipulation of stored msgs on server
– HTTP: Using a browser to access a webmail
https://webmail.sydney.edu.au

The University of Sydney Page 38


DNS
root DNS server

– host at cis.poly.edu
2
wants IP address 3 TLD DNS server
.edu DNS server
for 4
gaia.cs.umass.edu
5
iterated query:
 contacted server local DNS server
replies with name dns.poly.edu
of server to 1 8
7 6
contact
 “I don’t know this authoritative DNS server
name, but ask this dns.cs.umass.edu
server” requesting host
cis.poly.edu

The University of Sydney gaia.cs.umass.edu


Page 39
DNS
root DNS server

recursive query: 2 3
 puts burden of 7
6 TLD DNS server
name resolution .edu DNS server

on contacted
name server
 heavy load at local DNS server
dns.poly.edu 5 4
upper levels of
1 8
hierarchy?
authoritative DNS server
dns.cs.umass.edu
requesting host
cis.poly.edu

The University of Sydney


gaia.cs.umass.edu
Page 40
P2P Principle

3.5
P2P
Minimum Distribution Time

3
Client-Server
2.5

1.5

0.5

0
0 5 10 15 20 25 30 35

N
The University of Sydney Page 41
4
BitTorrent: tit-for-tat
e sends chunks to those four peers currently sending her chunks at high
2) Alice randomly unchokes Bob
Alice becomes one of Bob’s top-four providers;
Bob becomes one of Alice’s top-four providers

higher upload rate: find


better trading partners,
get file faster !
The University of Sydney Page 42
4
Circular DHT with shortcuts

1 Who’s responsible
for key 1110 (14) ?
3
15

4
12
5
10
8

– each peer keeps track of predecessor, successor,


short cuts.

The University of Sydney Page 43


43
Internet Protocol Stack

application CoAP, MQTT, QUIC

transport

network

link

physical

The University of Sydney Page 44


CoAP

• CoAP provides a request/response interaction like HTTP.


• Over UDP.
• GET, PUT, observe

Battery powered device providing CoAP.


CoAP Communication uses UDP over a
Gateway Personal area network (PAN) protocol.

HTTP

Client

The University of Sydney Page 45


MQTT

• MQTT: Lightweight, publish-subscribe network protocol


that transports messages between devices.
• Runs over TCP
• Two types of entities:
• Broker: server receives and forwards messages.
• Client: device connected to broker

https://mqtt.org/
The University of Sydney Page 46
46
QUIC

Over UDP
Avoid head-of-line blocking.

UDP does not care about


ordering of packet and if
packet get lost.

QUIC is solving this issue


and it will take care of
packet lost in particular
stream.

https://medium.com/faun/http-2-spdy-and-
http-3-quic-bae7d9a3d484
The University of Sydney Page 47
Protocol Stack

application
Socket
transport TCP, UDP, Transport Protocol

network

link

physical

The University of Sydney Page 48


Multiplexing/demultiplexing

multiplexing at sender:
handle data from demultiplexing at receiver:
multiple use header info to deliver
sockets, add transport received segments to corre
header (later used for socket
demultiplexing)
application

application P1 P2 application socket


P3 transport P4
process
transport network transport
network link network
link physical link
physical physical

The University of Sydney Page 49


49
UDP

length, in bytes of
32 bits UDP segment,
source port # dest port # including header

length checksum
why is there a UDP?
– no connection
application establishment (which
data can add delay)
(payload) – simple: no connection
state at sender, receiver
– small header size
– no congestion control:
UDP segment format
UDP can blast away as
fast as desired

The University of Sydney Page 50


50
Stop and wait

sender receiver sender receiver


send pkt0 pkt0 send pkt0 pkt0
rcv pkt0 rcv pkt0
ack0 send ack0 ack0 send ack0
rcv ack0 rcv ack0
send pkt1 pkt1 send pkt1 pkt1
rcv pkt1 X
ack1 send ack1 loss
rcv ack1
send pkt0 pkt2
rcv pkt0 timeout
ack2 send ack0 resend pkt1 pkt1
rcv pkt1
ack1 send ack1
rcv ack1
send pkt0 pkt2
(a) no loss rcv pkt0
ack2 send ack0

(b) packet loss


The University of Sydney Page 51
6-
51
GBN
sender window (N=4) sender receiver
012345678 send pkt0
012345678 send pkt1
send pkt2 receive pkt0, send ack0
012345678
send pkt3 Xloss receive pkt1, send ack1
012345678
(wait)
receive pkt3, discard,
012345678 rcv ack0, send pkt4 (re)send ack1
012345678 rcv ack1, send pkt5 receive pkt4, discard,
(re)send ack1
ignore duplicate ACK receive pkt5, discard,
(re)send ack1
pkt 2 timeout
012345678 send pkt2
012345678 send pkt3
012345678 send pkt4 rcv pkt2, deliver, send ack2
012345678 send pkt5 rcv pkt3, deliver, send ack3
rcv pkt4, deliver, send ack4
rcv pkt5, deliver, send ack5

The University of Sydney Page 52


6-
52
Selective repeat
sender window (N=4) sender receiver
012345678 send pkt0
012345678 send pkt1
send pkt2 receive pkt0, send ack0
012345678
send pkt3 Xloss receive pkt1, send ack1
012345678
(wait)
receive pkt3, buffer,
012345678 rcv ack0, send pkt4 send ack3
012345678 rcv ack1, send pkt5 receive pkt4, buffer,
send ack4
012345678 record ack3 arrived receive pkt5, buffer,
send ack5
pkt 2 timeout
012345678 send pkt2
012345678 record ack4 arrived
012345678 rcv pkt2; deliver pkt2,
record ack5 arrived
pkt3, pkt4, pkt5; send ack2

012345678
0123456789
The University of Sydney Page 53
6-
53
TCP flow control

› receiver “advertises” free


buffer space by including to application process
rwnd value in TCP header
of receiver-to-sender buffered data
RcvBuffer
segments
- RcvBuffer size set via
socket options (typical
rwnd free buffer space
default is 4096 bytes)
- many operating systems
autoadjust RcvBuffer TCP segment payloads
› sender limits amount of
unacked (“in-flight”) data receiver-side buffering
to receiver’s rwnd value
› guarantees receive buffer
will not overflow
The University of Sydney Page 54
54
TCP Congestion Control

sender sequence number space


cwnd TCP sending rate:
› roughly: send cwnd
bytes, wait RTT for
last byte last byte ACKS, then send
ACKed sent, not-
yet
sent
more bytes
ACKed
(“in-
flight”)
› sender limits transmission:
LastByteSent- LastByteAcked< cwnd

› cwnd is dynamic, function of


cwnd
perceived network congestion rate ~ bytes/sec
RTT

The University of Sydney Page 55


55
TCP Congestion Control
New
ACK!
duplicate ACK
dupACKcount++
New
newACK!
ACK
new ACK
.
cwnd = cwnd + MSS (MSS/cwnd)
dupACKcount = 0
cwnd = cwnd+MSS transmit new segment(s), as allowed
dupACKcount = 0
L transmit new segment(s), as allowed
cwnd = 1 MSS
ssthresh = 64 KB slow cwnd > ssthresh
dupACKcount = 0 congestion
start/ L
avoidance/
exponential additive
timeout
increase ssthresh = cwnd/2 increase
cwnd = 1 MSS duplicate ACK
timeout dupACKcount = 0 dupACKcount++
ssthresh = cwnd/2 retransmit missing segment
cwnd = 1 MSS
dupACKcount = 0
retransmit missing segment
timeout
ssthresh = cwnd/2
New
cwnd = 1 ACK!
New ACK
dupACKcount = 0
retransmit missing segment cwnd = ssthresh dupACKcount == 3
dupACKcount == 3 dupACKcount = 0
ssthresh= cwnd/2 ssthresh= cwnd/2
cwnd = ssthresh + 3 cwnd = ssthresh + 3
retransmit missing segment retransmit missing segment
fast
recovery/
multiplicative
decrease
duplicate ACK
cwnd = cwnd + MSS
transmit new segment(s), as allowed

The University of Sydney Page 56


56
Protocol Stack

application
Socket
transport MPTCP

network

link

physical

The University of Sydney Page 57


MPTCP in Stack

Application

MPTCP

Subflow Subflow
(TCP) (TCP)

https://pocketnow.com/multipath-tcp
IP

The University of Sydney Page 58


Internet Protocol Stack

application Video/Audio
SIP, RTP

transport Over TCP/UDP

network Network Support

link

physical

The University of Sydney Page 59


6-
59
Multimedia networking

constant bit
rate video client video
constant bit
Cumulative data

transmission reception
rate video
Cannot be played on time playout at client
variable
network Buffer underflow!

buffered
video
delay

client playout time


delay

The University of Sydney Page 60


Streaming multimedia: DASH

Chunk Chunk Chunk Chunk


High quality …
1 2 3 N
Chunk Chunk Chunk Chunk

1 2 3 N
Chunk Chunk Chunk Chunk
Low quality …
1 2 3 N

Bandwidth

Chunk Chunk Chunk



1 2 3
The University of Sydney Page 61
Adaptive playout delay
– goal: low playout delay, low delay loss rate
– approach: adaptive playout delay adjustment:
– estimate network delay, adjust playout delay at
beginning of each talk spurt
– silent periods compressed and elongated
– adaptively estimate packet delay: (EWMA -
exponentially weighted moving average):

di = (1-a)di-1 + a (ri – ti)

delay estimate small constant, time received - time sent


after ith packet (timestamp)
measured delay of ith packet
The University of Sydney Page 62
Adaptive playout delay

also useful to estimate average deviation of delay,


vi = (1-b)vi-1 + b |ri – ti – di|
– estimates di, vi calculated for every received
packet, but used only at start of talk spurt

– for first packet in talk spurt, playout time is:

playout-timei = ti + di + Kvi

The University of Sydney Page 63


Delay jitter


Cumulative data

talk spurt 2

talk spurt 1

di + Kvi adjust
ri – t i Determine di + Kvi
delay

time

The University of Sydney Page 64


SIP

Poly SIP
2. UMass proxy forwards request registrar
to Poly registrar server
2 3 3. Poly server returns redirect response,
indicating that it should try [email protected]

UMass 4. Umass proxy forwards request Eurecom SIP


SIP proxy to Eurecom registrar server 4 registrar
7
1. Alice sends INVITE 6-8. SIP response returned to 5. eurecom
message to UMass SIP 8 5 registrar
Alice 6
proxy. 1 forwards INVITE
to 197.87.54.21,
which is running
Bob’s SIP client
9
Alice
9. Data flows between clients
128.119.40.186 Bob
The University of Sydney
197.87.54.21
Page 65
RTP
payload sequence Synchronization Miscellaneou
time stamp
type number type Source ID (SSRC) s fields

• payload type (7 bits): indicates type of encoding


currently being used.
• sequence # (16 bits): increment by one for each
RTP packet sent
• timestamp field (32 bits long): sampling instant of first byte
in this RTP data packet

• Sequence + timestamp : packet loss or new talk spurt.

The University of Sydney Page 66


Scheduling policies
high priority queue
priority scheduling: send (waiting area)
highest priority queued
arrivals departures
packet
non-preemptive
classify link
(server)
low priority queue
– multiple classes, with (waiting area)
different priorities 2
– class may depend on 1 3 4 5
marking or other header arrivals
info, e.g. IP source/dest,
packet
port numbers, etc. in 1 3 2 4 5
service
– real world example?
departures
1 3 2 4 5

The University of Sydney Page 67


Scheduling policies
Round Robin (RR) scheduling:
› multiple classes, with equal priority
› cyclically scan class queues, sending one
complete packet from each class (if available)

2
1 3 4 5
arrivals

packet
in 1 3 2 4 5
service

departures
1 3 3 4 5

The University of Sydney Page 68


Scheduling policies

Weighted Fair Queuing (WFQ):


– Each class i is assigned a weight wi
– Guarantee: if there are class i packets to send (during some interval) then
class i receives a fraction of service which is
wi / ( ∑wj )
– On a link with transmission rate R, class i achieves throughput
Rwi / ( ∑wj )

The University of Sydney Page 69


Policing mechanisms: implementation

token bucket: limit input to specified burst size and average rate (useful
to police the flow)

– bucket can hold b tokens


– a packet must remove a token from bucket to be transmitted into the
network
– tokens generated at rate r token/sec unless bucket full (token
ignored)
– over interval of length t: number of packets admitted less than or
equal to (rt + b)
– Token-generation rate r limits the rate at which packets enter the
network
The University of Sydney Page 70
Internet Protocol Stack

application

transport

network
Wireless
link network Principles Linear Block Code
SNR vs. BER of CRC Code
CDMA Convolutional Code
physical

The University of Sydney Page 71


Wireless Physical layer
10-1

– SNR versus BER 10-2


tradeoffs
– Different physical layer 10-3

modulation:

BER
10-4

What is the meaning of dB? 10-5

Normal/Gaussian distribution, Q fucntion 10-6

10-7
10 20 30 40
SNR(dB)

QAM256 (8 Mbps)

QAM16 (4 Mbps)

BPSK (1 Mbps)

The University of Sydney Page 72


CDMA

Inner product(received
Sender 1 x 1’s chipping
sequence
signal, 1’s chipping
sequence)
Inner product(received
Sender 2 x 2’s chipping
sequence
signal, 2’s chipping
sequence)
+
… … …

Inner product(received
Sender N x N’s chipping
sequence
signal, N’s chipping
sequence)

The University of Sydney Page 73


Hidden terminal and exposed
terminal

B
A

Hidden terminal problem Exposed terminal


problem

The University of Sydney Page 74


Mobility via indirect routing
foreign agent
receives packets,
home agent intercepts forwards to mobile
packets, forwards to visited
foreign agent network
home
network
3
wide area
network
2
1
correspondent 4
addresses packets
mobile replies
using home address of
directly to
mobile
correspondent

The University of Sydney Page 75


Mobility via direct routing

foreign agent
receives packets,
correspondent forwards forwards to mobile
to foreign agent visited
network
home
network
3
1 2
4
mobile replies
correspondent
directly to
requests, receives
correspondent
foreign address of
mobile

The University of Sydney Page 76


2G

cell MSC
 covers
geographical
Mobile
region Switching
 base station Center
Public telephone
(BS) network
 mobile users
 air-interface:
Mobile
Switching
Center

wired network

The University of Sydney Page 77


4G LTE

Mobility
Management Home Subscriber Service
Mobile device Entity (MME) (HSS)
(UE)
Base station
(eNode-B)

to
Internet
PDN gateway (P-GW)

Serving Gateway (S-GW)


The University of Sydney Page 78


2G Handoff
1. old BSS informs MSC of impending
handoff, provides list of 1+ new BSSs
2. MSC sets up path (allocates resources)
to new BSS
VLR Mobile 3. new BSS allocates radio channel for
Switching
Center 2
use by mobile
4 4. new BSS signals MSC, old BSS: ready
1
7
8 5. old BSS tells mobile: perform handoff to
3
new BSS
old BSS 5 6
new BSS 6. mobile, new BSS signal to activate new
channel
7. mobile signals via new BSS to MSC:
handoff complete. MSC reroutes call
8 MSC-old BSS resources released

The University of Sydney Page 79


4G Handoff

data path before handover


source BS
1 current (source) BS selects
S-GW 3 target BS, sends Handover
1 4 Request message to target
2
P-GW BS
2 target BS pre-allocates
data path after
radio time slots, responds
handover MME target BS with HR ACK with info for
mobile
3 source BS informs mobile of new BS
 mobile can now send via new BS -
handover looks complete to mobile
4 source BS stops sending datagrams to mobile, instead forwards to
new BS (who forwards to mobile over radio channel)

The University of Sydney Page 80


4G Handoff

source BS

S-GW 3
1 4 5 target BS informs MME that it
2 6
P-GW is new BS for mobile
5 7  MME instructs S-GW to
5 change tunnel endpoint to
MME target BS be (new) target BS

6 target BS ACKs back to source BS: handover complete, source BS


can release resources
7 mobile’s datagrams now flow through new tunnel from target BS to
S-GW

The University of Sydney Page 81


Internet Protocol Stack: Theory

application Web with cache performance

transport Max min fairness

network Queueing Theory


Erlang B
Erlang C
Example of
link Game Theory

physical

The University of Sydney Page 82


Example of Game Theory

User 1

User 2

The University of Sydney Page 83


Max-min fairness

How to judge if max-min fairness is satisfied.


How to find max-min fairness: Bottleneck approach

Each link between two routes with capacity 1


2/3 A 2/3

B 1/3
Bottleneck!

1/3
C 1/3
1/3
1/3 D 1/3
Bottleneck!

The University of Sydney Page 84


Queueing System

NQ + ρ = N Number
W + X = T Time
• W: average waiting time in queue
• X: average service time
• T: average time spent in system (T = W + X)
• NQ = average number of customers in queue
• ρ = utilization = average number of customers in service
• N = average number of customer in system (N = NQ + ρ)
• Want to show later: N = λT (Little’s theorem)
• λ Average arrival rate

The University of Sydney Page 85


Stationary Distribution Derivation

Transition diagram and balanced equations


Stationary distribution
Average # of users
Average waiting time

The University of Sydney Page 86


M/M/m/m Queue Model (Erlang B)

λ λ λ λ λ

M/M/ … …
m/m
(m=S)
μ 2μ 3 k (S −1) μ
μ
μ Sμ
Q: What is the probability if a new arrival is dropped?

PS

Poisson arrival sees time average.

The University of Sydney Page 87


Erlang B chart
Number of Channels

Traffice Intensity in Erlangs log-log chart


The University of Sydney Page 88
M/M/m model (Erlang C)

An arriving unit will need to wait if all servers are busy


(it is not blocked)
Examples: Call centers
M/M/m queue

λ λ λ λ λ λ λ λ
M/M/m
… … S+1 S+2 …
(m=S)
μ 2μ 3 k (S −1) μ Sμ Sμ Sμ
μ
μ Sμ

The University of Sydney Page 89


Erlang C Chart

The University of Sydney Page 90


Final exam

– The marks of final exam sum up to 100 and


it is worth 60% of your overall mark.
– Paper based exam
– Closed book, only non-programmable
calculator is allowed.
– 120 minutes + reading time (10 minute)
– Double-pass policy.
– Fill blanks: 20 points
– Short answers: 10 points each 2
questions.
– Calculation: 15 points each 4 questions.
The University of Sydney Page 91
Final exam

– No programming questions

– No Wireshark questions

The University of Sydney Page 92


92
Assignment 2 and Q&A

– Assignment 2 answers will be released before final


exam.
– If you submit on time (no extension), we can also
release your mark before final exam.
– Individual Q&A, by appointment
[email protected]
– Drop-in Q&A
– 11-Nov (Monday), 5-6 pm in office (J12-425)
– 5-Nov (Wednesday), 4-5 pm by Zoom, 5-6 pm in office (J12-
425)
– Please send us an email to schedule an appointment
if these timeslots are not suitable for you

The University of Sydney Page 93


93

You might also like