计算机代考程序代写 dns DHCP Real-time Conversational Applications

Real-time Conversational Applications

Advanced Network Technologies
Multimedia 2/2
School of Computer Science

Dr. | Lecturer

1

SIP: Session Initiation Protocol [RFC 3261]
long-term vision:
all telephone calls, video conference calls take place over Internet
people identified by names or e-mail addresses, rather than by phone numbers
can reach callee (if callee so desires), no matter where callee roams, no matter what IP device callee is currently using

2

SIP services
SIP provides mechanisms for call setup:
for caller to let callee know she wants to establish a call
so caller, callee can agree on media type, encoding
to end call

determine current IP address of callee:
maps mnemonic identifier to current IP address
call management:
add new media streams during call
change encoding during call
invite others
transfer, hold calls

3
SIP solves the dynamic IP address thing by retrieving IP address based on user.

Alice’s SIP invite message indicates her port number, IP address, encoding she prefers to receive (PCM mlaw)
Bob’s 200 OK message indicates his port number, IP address, preferred encoding (GSM)
SIP messages can be sent over TCP or UDP; here sent over RTP/UDP
Default SIP port # is 5060
Actually, Bob and Alice talks simultaneoulsy
SIP is out-of-band

Example: setting up call to known IP address

4
AVP0 indicates the encoding at which Alice would like to receive (= PCM encoded mu-law)
38060 is the port Alice would like to receive on.
SIP port 5060 is used for the handshake (Bob request a different format: GSM) before they can talk.
SIP is out-of-band (like FTP): different sockets used for SIP msgs and sending/receiving media data.

Setting up a call (cont’d)
codec negotiation:
suppose Bob doesn’t have PCM mlaw encoder
Bob will instead reply with 606 Not Acceptable Reply, listing his encoders. Alice can then send new INVITE message, advertising different encoder
rejecting a call
Bob can reject with replies “busy,” “gone,” “payment required,” “forbidden”
media can be sent over RTP or some other protocol

5

Name translation, user location
caller wants to call callee, but only has callee’s name or e-mail address.
need to get IP address of callee’s current host:
user moves around
Dynamic Host Configuration Protocol (DHCP) (dynamically assign IP address)
user has different IP devices (PC, smartphone, car device)

result can be based on:
time of day (work, home)
caller (don’t want boss to call you at home)
status of callee (calls sent to voicemail when callee is already talking to someone)

6

SIP registrar
REGISTER sip:domain.com SIP/2.0
Via: SIP/2.0/UDP 193.64.210.89
From:
To:
Expires: 3600
one function of SIP server: registrar
when Bob starts SIP client, client sends SIP REGISTER message to Bob’s registrar server
register message:

7
Every 3600 seconds (1 hour) the registration should be renewed.

SIP proxy
another function of SIP server: proxy
Alice sends invite message to her proxy server
contains address
proxy responsible for routing SIP messages to callee, possibly through multiple proxies
Bob sends response back through same set of SIP proxies
proxy returns Bob’s SIP response message to Alice
contains Bob’s IP address
SIP proxy analogous to local DNS server

8

1
1. Alice sends INVITE
message to UMass SIP proxy.

2. UMass proxy forwards request
to Poly registrar server

2
3. Poly server returns redirect response,
indicating that it should try

3

5. eurecom registrar forwards INVITE to 197.87.54.21, which is running Bob’s SIP client

5

4
4. Umass proxy forwards request
to Eurecom registrar server

8

6

7
6-8. SIP response returned to Alice

9
9. Data flows between clients
UMass SIP proxy
Poly SIP
registrar
Eurecom SIP
registrar
Bob
197.87.54.21
Alice
128.119.40.186
SIP example: calls

9

Network support for Multimedia

20min
10

Network support for multimedia
Approach Granularity Guarantee Mechanisms Complex Deployed?
1. Making best of best effort service All traffic treated equally None No network support(all at app) low everywhere
2. Differentiated service Traffic class None or soft
Packet mark, scheduling, policing medium some
3. Per-connection QoS Per-connection flow Soft or hard after flow admitted Packet mark, scheduling policing high Little to none

Three broad approaches towards providing network-level support for multimedia apps

11
Can the network itself can support multimedia content delivery? Yes, but such mechanisms must be deployed as internet provides a single best-effort class of service.

Providing multiple classes of services
thus far: making the best of best effort service
one-size fits all service model
alternative: multiple classes of service
partition traffic into classes
network treats different classes of traffic differently (analogy: VIP service versus regular service)

0111

granularity: differential service among multiple classes, not among individual connections

How: ToS bits

ToS: Type of Service, a field in IPv4 header
12

R1
R2
H1
H2
H3
H4
1.5 Mbps link

R1 output
interface
queue

Multiple classes of services: scenarios

13

Scenario 1: mixed HTTP and VoIP
example: 1 IP (Video and Voice), HTTP share 1.5 Mbps link.
HTTP bursts can congest router, cause video/audio loss
want to give priority to audio over HTTP
packet marking needed for router to distinguish between different classes; and new router policy to treat packets accordingly

Principle 1

R1
R2

14

Principles for QOS guarantees
what if applications misbehave (VoIP sends higher than declared rate)
policing: force source adherence to bandwidth allocations
marking, policing
provide protection for one class from others

Principle 2

R1
R2

1.5 Mbps link
1 Mbps
phone
packet marking and policing

15

Principles for QOS guarantees (con’t)
allocating fixed (non-sharable) bandwidth to flow: inefficient use of bandwidth if flows doesn’t use its allocation
while providing protection, it is desirable to use
resources as efficiently as possible

Principle 3

R1
R2

1.5 Mbps link
1 Mbps
phone

1 Mbps logical link

0.5 Mbps logical link

16

Scheduling and policing mechanisms
scheduling: choose next packet to send on link
FIFO (first in first out) scheduling: send in order of arrival to queue
real-world example?
discard policy: if packet arrives to full queue: who to discard?
tail drop: drop arriving packet
priority: drop/remove on priority basis
random: drop/remove randomly

queue
(waiting area)
packet
arrivals
packet
departures
link
(server)

17

Scheduling policies: priority
priority scheduling: send highest priority queued packet
non-preemptive

multiple classes, with different priorities
class may depend on marking or other header info, e.g. IP source/dest, port numbers, etc.
real world example?

high priority queue
(waiting area)
low priority queue
(waiting area)
arrivals
classify
departures
link
(server)

1

3

2

4

5

5

5

2

2

1

1

3

3

4

4
arrivals
departures
packet in service

18

Scheduling policies: priority

low priority queue
(waiting area)
arrivals
classify
departures
link
(server)

19

Scheduling policies: priority

low priority queue
(waiting area)
arrivals
classify
departures
link
(server)

20

Scheduling policies: priority

low priority queue
(waiting area)
arrivals
classify
departures
link
(server)

21

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

1

2

3

4

5

5

5

2

3

1

1

3

3

4

4
arrivals
departures
packet in service

22

Scheduling policies: RR

low priority queue
(waiting area)
arrivals
classify
departures
link
(server)

23

Scheduling policies: RR

low priority queue
(waiting area)
arrivals
classify
departures
link
(server)

24

Scheduling policies: RR

low priority queue
(waiting area)
arrivals
classify
departures
link
(server)

25

Scheduling policies: RR

low priority queue
(waiting area)
arrivals
classify
departures
link
(server)

26

Scheduling policies (con’t)
Weighted Fair Queuing (WFQ):
generalized Round Robin
each class gets weighted amount of service in each cycle

27

Scheduling policies (con’t)
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 )
WFQ is part of routers QoS [Cisco 2012]

2
1
3

28
[Cisco 2012] Advanced QoS Services for the Intelligent Internet

Scheduling policies (con’t)
Example:
One link has capacity 1 Mbps. Three flows: Flow 1 is ensured with 0.5 Mbps data rate; Flow 2 is ensured with 0.25 Mbps; Flow 3 is ensured with 0.25 Mbps.
Weighted queue: w1=2, w2=1, w3=1
Efficiency:
When flow 3 has nothing to transmit, but flow 1 and flow 2 have many packets to send
Flow 1: 2/3 Mbps
Flow 2: 1/3 Mbps

29
[Cisco 2012] Advanced QoS Services for the Intelligent Internet

Marking and Policing

20min
30

Policing mechanisms
goal: to limit traffic to not exceed declared parameters (the rate at which a class or flow is allowed to inject packets into the network)
Three important policing criteria (differing on the time scale):
1. (long term) average rate: how many pkts can be sent per unit of time (in the long run)
e.g., 6000 packets per min
2.peak rate: limit the number of packets can be sent over a relatively shorter period of time, e.g., 6000 pkts per minute (ppm) in average but 3000 packets per 5 second peak rate max.
3. (max.) burst size: max number of pkts sent “instantaneously” into the networks, e.g., 1500 packets.

31

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

t->0, b packets
t->∞, (rt+b)/t = r packets/second

32

Policing and QoS guarantees
Combining token bucket and WFQ to provide guaranteed upper bound on delay, i.e., QoS guarantee!

WFQ

token rate, r1

bucket size, b1
per-flow
rate, R
D = Lb1 / (Rw1 / ( ∑wj ))
max

arriving
traffic
arriving
traffic

Packets arrive while the bucket is full (b1). The last packet has a maximum delay of Dmax. L packet size.

33
Packets arrive at rate R while the bucket is full. The last packet has a maximum delay of dmax = b1 / (R w1/(Sum wj))

Differentiated services in reality
want “qualitative” service classes
relative service distinction: Platinum (VIP), Gold, Silver

scalability: simple functions in network core, relatively complex functions at edge routers (or hosts)

34

Diffserv architecture
edge router:
per-flow traffic management
marks packets as differently
E.g. Alice’ traffic: high
Bob’s traffic: high
Chris’s traffic: low
core router:
per class traffic management
buffering and scheduling based on marking at edge
Red packets vs green packets

r
b
marking

scheduling

.
.
.

35

class-based marking: packets of different classes marked differently
intra-class marking: conforming portion of flow marked differently compared with non-conforming one
Bob agrees to transmit at 1Mbps, but he is transmitting at 2Mbps
Half of them (conforming) are marked green.
Others (non-conforming) are marked red (lower priority) or dropped.
profile: pre-negotiated rate r, burst (bucket) size b
packet marking at edge based on per-flow profile
Example:
user packets

rate r

b

Edge-router packet marking

36

green > yellow >red .
2Mbps link, Bob, telephone traffic, declare 1 Mbps
Green if conforming, red if not conforming
Chris, web browsing traffic
Yellow
Priority queue in the core network
Bob can guarantee 1Mbps data rate
If Bob transmits >1Mbps
If Chris transmits at 1Mbps, all red will be dropped. Bob gets 1Mbps
If Chris transmits at <1Mbps, some red will still get through. Example Edge-router packet marking 37 Classification, conditioning user declares traffic profile (e.g., rate, burst size) traffic metered, shaped if non-conforming the meter compares the incoming flow to the negociated traffic profile. Network administrator can decide whether to remark, forward, delay, or drop a non- conforming packet 38 Per-connection QoS guarantees basic fact of life: cannot support traffic demands beyond link capacity call admission: flow declares its needs, network may block call (e.g., busy signal) if it cannot meet needs Principle 4 R1 R2 1.5 Mbps link 1 Mbps phone 1 Mbps phone Reject! 39 Wireless and mobile networks 20min 40 Elements of a wireless network Wireless and Mobile Networks: 7- 41 wired network infrastructure 41 Elements of a wireless network Wireless and Mobile Networks: 7- 42 wired network infrastructure wireless hosts laptop, smartphone, IoT run applications may be stationary (non-mobile) or mobile wireless does not always mean mobility! 42 Elements of a wireless network Wireless and Mobile Networks: 7- 43 wired network infrastructure base station typically connected to wired network relay - responsible for sending packets between wired network and wireless host(s) in its “area” e.g., cell towers, 802.11 access points 43 Elements of a wireless network Wireless and Mobile Networks: 7- 44 wired network infrastructure wireless link typically used to connect mobile(s) to base station, also used as backbone link multiple access protocol coordinates link access various transmission rates and distances, frequency bands 44 Characteristics of selected wireless links Wireless and Mobile Networks: 7- 45 Indoor Outdoor Midrange outdoor Long range outdoor 10-30m 50-200m 200m-4Km 4Km-15Km 2 Mbps 4G LTE 802.11ac 802.11n 802.11g 802.11b 3.5 Gbps 600 Mbps 54 Mbps 11 Mbps Bluetooth 802.11ax 14 Gbps 5G 10 Gbps 802.11 af,ah 45 IEEE 802.11 WiFi Wireless and Mobile Networks: 7- 46 IEEE 802.11 standard Year Max data rate Range Frequency 802.11b 1999 11 Mbps 30m 2.4 Ghz 802.11a 1999 54 Mbps 30m 5 Ghz 802.11g 2003 54 Mbps 30m 2.4 Ghz 802.11n (WiFi 4) 2009 600 Mbps 70m 2.4, 5 Ghz 802.11ac (WiFi 5) 2013 3.47Gpbs 70m 5 Ghz 802.11ax (WiFi 6) 2020 14 Gbps 70m 2.4, 5 Ghz 802.11af 2014 35 – 560 Mbps 1 Km unused TV bands (54-790 MHz) 802.11ah 2017 347Mbps 1 Km 900 Mhz all use CSMA/CA for multiple access, and have base-station and ad-hoc network versions 46 Elements of a wireless network Wireless and Mobile Networks: 7- 47 wired network infrastructure infrastructure mode base station connects mobiles into wired network handoff: mobile changes base station providing connection into wired network 47 Elements of a wireless network Wireless and Mobile Networks: 7- 48 ad hoc mode no base stations nodes can only transmit to other nodes within link coverage nodes organize themselves into a network: route among themselves 48 Wireless network taxonomy Wireless and Mobile Networks: 7- 49 single hop multiple hops infrastructure (e.g., APs) no infrastructure host connects to base station (WiFi, cellular) which connects to larger Internet no base station, no connection to larger Internet (Bluetooth, ad hoc nets) host may have to relay through several wireless nodes to connect to larger Internet: mesh net no base station, no connection to larger Internet. May have to relay to reach other a given wireless node MANET, VANET 49 Wireless link characteristics Wireless Link Characteristics (1) important differences from wired link …. decreased signal strength: radio signal attenuates as it propagates through matter (path loss) 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, arriving at destination at slightly different times …. make communication across (even a point to point) wireless link much more “difficult” 51 dB decibel logarithmic unit used to express the ratio of two (power) values 10*log10(PS/PN) PS/PN=10 10 dB PS/PN=100 20 dB PS/PN=1000 30 dB PS/PN=10000 40 dB … 52 BER: Bit error rate QAM256, 16, BPSK different physical-layer modulation with varying transmission rate: the right modulation technique can be adapted to channel condition. Wireless Link Characteristics (2) SNR: signal-to-noise ratio larger SNR – easier to extract signal from noise (a “good thing”) BER: bit error rate SNR versus BER tradeoffs given physical layer modulation: increase power -> increase SNR -> decrease BER
Different physical layer modulation:

10
20
30
40

QAM256 (8 Mbps)
QAM16 (4 Mbps)
BPSK (1 Mbps)
SNR(dB)
BER
10-1
10-2
10-3
10-5
10-6
10-7
10-4
Quadrature amplitude modulation
Binary Phase-shift keying
Higher data rate -> Higher BER

53
BER: Bit error rate
QAM256, 16, BPSK different physical-layer modulation with varying transmission rate: the right modulation technique can be adapted to channel condition.

Wireless Link Characteristics (2)
SNR: signal-to-noise ratio
larger SNR – easier to extract signal from noise (a “good thing”)
BER: bit error rate
SNR versus BER tradeoffs
given SNR, BER requirement: choose modulation to achieve highest throughput
15 dB, require 10-3 BER
Which modulation?
QAM16

BPSK (1 Mbps)

10
20
30
40

QAM256 (8 Mbps)
QAM16 (4 Mbps)
SNR(dB)
BER
10-1
10-2
10-3
10-5
10-6
10-7
10-4

54
BER: Bit error rate
QAM256, 16, BPSK different physical-layer modulation with varying transmission rate: the right modulation technique can be adapted to channel condition.

Wireless network characteristics (3)
Multiple wireless senders and receivers create additional problems (beyond multiple access):

A
B
C
Hidden terminal problem
B, A hear each other
B, C hear each other
A, C can not hear each other means A, C unaware of their interference at B

A
B
C
A’s signal
strength

space

C’s signal
strength

Signal attenuation:
B, A hear each other
B, C hear each other
A, C can not hear each other interfering at B

55

CDMA

Code Division Multiple Access (CDMA)
unique “code” (chipping sequence) assigned to each user;
all users share same frequency, but each user has own “chipping” sequence (i.e., code) to encode data
length of sequence: M
allows multiple users to “coexist” and transmit simultaneously with minimal interference (if codes are “orthogonal”)
orthogonal:
inner product of ci,1 ci,2 …ci,M and cj,1 cj,2 …cj,M is Sm ci,m.cj,m
inner product(user i’s chipping sequence, user j’s chipping sequence) =0
inner product(user i’s chipping sequence, user i’s chipping sequence) =M
encoded signal = (original data) X (chipping sequence)
decoding: inner-product of encoded signal and chipping sequence

57

CDMA encode/decode

slot 1
slot 0

d1 = -1
1

1
1
1
1

1

1

1

Zi,m= di.cm

d0 = 1
1

1
1
1
1

1

1

1

1

1
1
1
1

1

1

1

1

1
1

1

1

1

1

1

slot 0
channel
output
slot 1
channel
output

channel output Zi,m
sender
code
data
bits

slot 1
slot 0

d1 = -1

d0 = 1
1

1
1
1
1

1

1

1

1

1
1
1
1

1

1

1

1

1
1
1
1

1

1

1

1

1
1

1

1

1

1

1

slot 0
channel
output
slot 1
channel
output

receiver
code
received
input

Di = S Zi,m.cm
m=1
M
M

58

di
cm
-1 -1 -1 1 -1 1 1 1
-1
1
-1 -1 -1 1 -1 1 1 1
Zi,m
-1 -1 -1 1 -1 1 1 1
1 1 1 -1 1 -1 -1 -1
sender
receiver
-1 -1 -1 1 -1 1 1 1
1 1 1 -1 1 -1 -1 -1
Inner product
-1 -1 -1 1 -1 1 1 1
-1 -1 -1 1 -1 1 1 1
Di = S Zi,m.cm
m=1
M
M

8/8=1
-8/8=-1
Di
1+1+1+1+1+1+1+1
uses its chipping sequence to send and to receive: receive the correct bits
User i receives user i‘s signals

59

di
cm
-1 -1 -1 1 -1 1 1 1
-1
1
-1 -1 -1 1 -1 1 1 1
Zi,m
-1 -1 -1 1 -1 1 1 1
1 1 1 -1 1 -1 -1 -1
sender 1’s
bits
receiver 2
-1 -1 -1 1 -1 1 1 1
1 1 1 -1 1 -1 -1 -1
Inner product
1 1 -1 1 1 1-1 1
Di = S Zi,m.c’m
m=1
M
M

0/8=0
0/8=0
Di
-1-1+1+1-1+1-1+1=0!
1 1-1 1 1 1 -1 1
Use 1’s chipping sequence to send and use 2’s chipping sequence to receive:
receive nothing!
Reason: 1’s chipping sequence is orthogonal to 2’s chipping sequence.
User 2 receives user 1‘s signals

60

Sender 1
Sender 2

Sender N
1’s chipping sequence
+
2’s chipping sequence
N’s chipping sequence

1’s chipping sequence
inner product (
1’s bit * 1’s chipping sequence
+2’s bit * 2’s chipping sequence
+…
+N’s bit * N’s chipping sequence,
1’s chipping sequence)/M

1’s bit * 1’s chipping sequence
+2’s bit * 2’s chipping sequence
+…
+N’s bit * N’s chipping sequence,
x
x
x

61

+
1’s chipping sequence
= 1’s bit * inner product (
1’s chipping sequence,
1’s chipping sequence)/M
+ 2’s bit * inner product (
2’s chipping sequence,
1’s chipping sequence)/M
+…
+ N’s bit * inner product (
N’s chipping sequence,
1’s chipping sequence)/M

0
0
Sender 1
Sender 2

Sender N
1’s chipping sequence
2’s chipping sequence
N’s chipping sequence

x
x
x

62

+
1’s chipping sequence
= 1’s bit * inner product (
1’s chipping sequence,
1’s chipping sequence)/M
=1’s bit

Sender 1
Sender 2

Sender N
1’s chipping sequence
2’s chipping sequence
N’s chipping sequence

x
x
x

63

CDMA: two-sender interference

using same code as sender 1, receiver recovers sender 1’s original data from summed channel data!
Sender 1
Sender 2
channel sums together transmissions by sender 1 and 2

64
Z* is the sum of all z^1 and z^2
Note that the CDMA codes must be carefully chosen for this to work in practice.

time time
Bob’s
terminal rings
Alice
167.180.112.24
Bob
193.64.210.89
port 5060
port 38060
Law audio
GSM
port 48753
INVITE
c=IN IP4 167.180.112.24
m=audio 38060 RTP/AVP 0
port 5060
200 OK
c=IN IP4 193.64.210.89
m=audio 48753 RTP/AVP 3
ACK
port 5060

Alice�
Bob�
167.180.112.24�
193.64.210.89�
INVITE
c=IN IP4 167.180.112.24
m=audio 38060 RTP/AVP 0

Bob’s
terminal rings�
time�
port 38060�
Law audio�
200 OK
c=IN IP4 193.64.210.89
m=audio 48753 RTP/AVP 3�
GSM�
port 48753�
ACK�
time�
port 5060�
port 5060�
port 5060�

/docProps/thumbnail.jpeg