WELCOME

Unit-IV: Link Layer: Introduction, Services, Error detection & correction techniques, Multiple Access Protocols, LAN address & ARP, CSMA/CD, PPP details, Multimedia details networking and RTSP protocol, RTP details.

Unit - 4

Some terms:
Ì hosts and routers are nodes Ì communication channels that

connect adjacent nodes along communication path are links
r r r

“link”

wired links wireless links LANs

Ì layer-2 packet is a frame,

encapsulates datagram

data-link layer has responsibility of transferring datagram from one node to adjacent node over a link

Message Datagram Segment Packet Frame

Unit - 4

Data Link Layer Services
DLL is responsible for moving frames DLL is responsible for moving frames from one hop (node) to the next. from one hop (node) to the next.
Other responsibilities of DLL are: Other responsibilities of DLL are:

       

tourist = datagram tourist = datagram transport segment = communication link transport segment = communication link transportation mode = link layer protocol transportation mode = link layer protocol travel agent = routing algorithm travel agent = routing algorithm

Framing: DLL provides the stream of Framing: DLL provides the stream of bits received from n/w layer into bits received from n/w layer into manageable data unit called frames. manageable data unit called frames. Physical Addressing: DLL adds a Physical Addressing: DLL adds a header to the frame to define the sender header to the frame to define the sender or receiver of the frame. or receiver of the frame. Flow Control: Rate at which receiver is Flow Control: Rate at which receiver is absorbing data is less than produced by absorbing data is less than produced by the sender. DLL imposes the FC to the sender. DLL imposes the FC to prevent overwhelming the receiver. prevent overwhelming the receiver. Error Control: DLL adds reliability to Error Control: DLL adds reliability to PLL by adding mechanism to detect and PLL by adding mechanism to detect and transmit damaged frames or lost frames. transmit damaged frames or lost frames.
Error control is achieved through aatrailer added to Error control is achieved through trailer added to end of the fame end of the fame

Access Control: When two or more Access Control: When two or more devices are connected to the same devices are connected to the same link, DLL protocols are necessary to link, DLL protocols are necessary to determine which device has control determine which device has control over the link at any given time. over the link at any given time. Hop to hop delivery

Unit - 4

Link Layer Services
Ì Framing, link access:
r r r

encapsulate datagram into frame, adding header, trailer channel access if shared medium “MAC” addresses used in frame headers to identify MAC source, dest 48 bit address • different from IP address!

Ì Reliable delivery between adjacent nodes r we learned how to do this already (chapter 3)! r seldom used on low bit error link (fiber, some twisted pair) r wireless links: high error rates • Q: why both link-level and end-end reliability?

Unit - 4

Ì Flow Control:
r

pacing between adjacent sending and receiving nodes

Ì Error Detection:

errors caused by signal attenuation, noise. r receiver detects presence of errors: • signals sender for retransmission or drops frame
r

Ì Error Correction:
r

receiver identifies and corrects bit error(s) without resorting to retransmission

Ì Half-duplex and full-duplex r with half duplex, nodes at both ends of link can transmit, but not at same time
Unit - 4

Adaptors Communicating
datagram sending node link layer protocol frame adapter rcving node

frame adapter

Ì link layer implemented in

Ì receiving side “adaptor” (aka NIC) NIC r looks for errors, rdt, flow r Ethernet card, PCMCI card, control, etc 802.11 card r extracts datagram, passes to Ì sending side: rcving node r encapsulates datagram in a Ì adapter is semi-autonomous frame Ì link & physical layers r adds error checking bits, rdt, flow control, etc.
Unit - 4

Error Detection
EDC= Error Detection and Correction bits (redundancy) D = Data protected by error checking, may include header fields • Error detection not 100% reliable! • protocol may miss some errors, but rarely • larger EDC field yields better detection and correction

Unit - 4

Parity Checking
Single Bit Parity:
Detect single bit errors

Two Dimensional Bit Parity:
Detect and correct single bit errors

0

0

Unit - 4

Internet checksum
Goal: detect “errors” (e.g., flipped bits) in transmitted segment (note: used at transport layer only)

Unit - 4

Checksumming: Cyclic Redundancy Check
Ì view data bits, D, as a binary number Ì choose r+1 bit pattern (generator), G Ì goal: choose r CRC bits, R, such that

<D,R> exactly divisible by G (modulo 2) r receiver knows G, divides <D,R> by G. If non-zero remainder: error detected! r can detect all burst errors less than r+1 bits Ì widely used in practice (ATM, HDCL)
r

Unit - 4

CRC Example
Want: D.2r XOR R = nG equivalently: D.2r = nG XOR R equivalently: if we divide D.2r by G, want remainder R

D.2r R = remainder[ G

]

Unit - 4

Multiple Access Links and Protocols
Two types of “links”: Ì point-to-point r PPP for dial-up access r point-to-point link between Ethernet switch and host Ì broadcast (shared wire or medium) r traditional Ethernet r upstream HFC r 802.11 wireless LAN

Transmission freq is different from receiving frequency.

Unit - 4

Slotted ALOHA
Assumptions Ì all frames same size Ì time is divided into equal size slots, time to transmit 1 frame Ì nodes start to transmit frames only at beginning of slots Ì nodes are synchronized Ì if 2 or more nodes transmit in slot, all nodes detect collision

Operation Ì when node obtains fresh frame, it transmits in next slot Ì no collision, node can send new frame in next slot Ì if collision, node retransmits frame in each subsequent slot with prob. p until success

Unit - 4

Slotted ALOHA

Pros Ì single active node can continuously transmit at full rate of channel Ì highly decentralized: only slots in nodes need to be in sync Ì simple

Cons Ì collisions, wasting slots Ì idle slots Ì nodes may be able to detect collision in less than time to transmit packet Ì clock synchronization
Unit - 4

Slotted Aloha efficiency
Efficiency is the long-run fraction of successful slots when there are many nodes, each with many frames to send
Ì Suppose N nodes with many

Ì For max efficiency

frames to send, each transmits in slot with probability p Ì prob that node 1 has success -1 in a slot = p(1-p)N Ì prob that any node has a -1 success = Np(1-p)N

with N nodes, find p* that maximizes Np(1-p)N-1 Ì For many nodes, take limit of Np*(1p*)N-1 as N goes to infinity, gives 1/e = . 37 At best: channel used for useful transmissions 37% of time!
Unit - 4

Pure (unslotted) ALOHA
Ì unslotted Aloha: simpler, no synchronization Ì when frame first arrives

transmit immediately Ì collision probability increases: r frame sent at t0 collides with other frames sent in [t0-1,t0+1]
r

Unit - 4

CSMA (Carrier Sense Multiple Access)
CSMA: listen before transmit: If channel sensed idle: transmit entire frame
Ì If channel sensed busy, defer transmission Ì Human analogy: don’t interrupt others!

Unit - 4

CSMA (Carrier Sense Multiple Access)
Medium (channel) is shared by all stations. And Only one station at a time can use it. All stations receive a frame frame sent by a station (broadcast) The real destination keeps it while others DROP it.

Minimum frame length / Transmission rate is proportional to collision domain / propagation speed Exponential back off policy
Unit - 4

CSMA collisions
collisions can still occur:
propagation delay means two nodes may not hear each other’s transmission

spatial layout of nodes

collision:
entire packet transmission time wasted

note:
role of distance & propagation delay in determining collision probability

Unit - 4

CSMA/CD (Collision Detection)
CSMA/CD: carrier sensing, deferral as in CSMA
collisions detected within short time r colliding transmissions aborted, reducing channel wastage
r

Ì collision detection: r easy in wired LANs: measure signal strengths, compare transmitted, received signals r difficult in wireless LANs: receiver shut off while LANs transmitting Ì human analogy: the polite conversationalist
Unit - 4

“Taking Turns” MAC protocols
Polling: Ì master node “invites” slave nodes to transmit in turn Ì concerns:
r r r

Token passing: Ì control token passed from one node to next sequentially. Ì token message Ì concerns:
r r r

polling overhead latency single point of failure (master)

token overhead latency single point of failure (token)

Unit - 4

Summary of MAC protocols
Ì What do you do with a shared media?

Channel Partitioning, by time, frequency or code • Time Division, Frequency Division r Random partitioning (dynamic), • ALOHA, S-ALOHA, CSMA, CSMA/CD • carrier sensing: easy in some technologies (wire), hard in others (wireless) • CSMA/CD used in Ethernet • CSMA/CA used in 802.11 r Taking Turns • polling from a central site, token passing
r
Unit - 4

What Is a MAC Address?

The MAC address is a unique value associated with a network adapter.

MAC addresses are also known as hardware addresses or physical addresses. addresses They uniquely identify an adapter on a LAN.
MAC addresses are 12-digit hexadecimal numbers (48 bits in length).

MAC addresses are usually written in one of the following two formats:

MM:MM:MM:SS:SS:SS or MM-MM-MM-SS-SS-SS

C:>ipconfig $ifconfig

The first half of a MAC address contains the ID number of the adapter manufacturer. (vendor) The second half of a MAC address represents the serial number assigned to the adapter by the manufacturer.
Unit - 4

MAC Addresses and ARP
Ì 32-bit IP address:
network-layer address r used to get datagram to destination IP subnet
r

Logical Address Physical Address

Ì 48-bit MAC address:

(or LAN or physical or Ethernet)
used to get datagram from one interface to another physicallyconnected interface (same network) r 48 bit MAC address (for most LANs) burned in the adapter ROM
r

Unit - 4

Learn about Commands arp netstat route ipconfig etc…

Unit - 4

LAN Addresses and ARP
Each adapter on LAN has unique LAN address

1A-2F-BB-76-09-AD

Broadcast address = FF-FF-FF-FF-FF-FF

71-65-F7-2B-08-53

LAN (wired or wireless)
58-23-D7-FA-20-B0

= adapter

0C-C4-11-6F-E3-98

Hexadecimal

Unit - 4

LAN Addresses
Ì MAC address allocation administered by IEEE Ì manufacturer buys portion of MAC address space

(to assure uniqueness) Ì Analogy: (a) MAC address: like Social Security Number (b) IP address: like postal address Ì MAC flat address ➜ portability
r

can move LAN card from one LAN to another

Ì IP hierarchical address NOT portable r depends on IP subnet to which node is attached

Unit - 4

Address Resolution Protocol

ARP

Ì Each IP node (Host,

Question: how to determine MAC address of B knowing B’s IP address?
237.196.7.78 1A-2F-BB-76-09-AD 237.196.7.23 237.196.7.14

Router) on LAN has ARP table

Ì ARP Table: IP/MAC

address mappings for some LAN nodes
r

< IP address; MAC address; TTL>

LAN
71-65-F7-2B-08-53 58-23-D7-FA-20-B0

TTL (Time To Live): time after which address mapping will be forgotten (typically 20 min)

237.196.7.88

0C-C4-11-6F-E3-98

Unit - 4

Address Resolution Protocol

ARP

Ì A wants to send datagram to

B, and B’s MAC address not in A’s ARP table. Ì A broadcasts ARP query packet, containing B's IP address r Dest MAC address = FFFF-FF-FF-FF-FF r all machines on LAN receive ARP query Ì B receives ARP packet, replies to A with its (B's) MAC address r frame sent to A’s MAC address (unicast)

Ì A caches (saves) IP-to-

MAC address pair in its ARP table until information becomes old (times out) r soft state: information that times out (goes away) unless refreshed Ì ARP is “plug-and-play”: r nodes create their ARP tables without intervention from net administrator

Unit - 4

Routing to another LAN

A

R

B

Unit - 4

Ì A creates datagram with source A, destination B Ì A uses ARP to get R’s MAC address for 111.111.111.110 Ì A creates link-layer frame with R's MAC address as dest, Ì Ì Ì Ì Ì

frame contains A-to-B IP datagram A’s adapter sends frame R’s adapter receives frame R removes IP datagram from Ethernet frame, sees its destined to B R uses ARP to get B’s MAC address R creates frame containing A-to-B IP datagram sends to B

A R

B
Unit - 4

Ethernet

“dominant” wired LAN technology: Ì cheap $20 for 100Mbs! Ì first widely used LAN technology Ì Simpler, cheaper than token LANs and ATM Ì Kept up with speed race: 10 Mbps – 10 Gbps

Metcalfe’s Ethernet sketch

Read his inspiring Interview At the end of chapter
Unit - 4

Ethernet

The Preamble consists of seven bytes all of the form 10101010, and is used by the receiver to allow it to establish bit synchronisation (there is no clocking information on the Ether when nothing is being sent). The Start frame delimiter is a single byte, 10101011, which is a frame flag, indicating the start of a frame. The MAC addresses are always 48 bits long The Length/EtherType field is the only one which differs between 802.3 and Ethernet II. In 802.3 it indicates the number of bytes of data in the frames payload, and can be anything from 0 to 1500 bytes. Frames must be at least 64 bytes long, not including the preamble, so, if the data field is shorter than 46 bytes, it must be compensated by the Pad field. The reason for specifying a minimum length lies with the collision-detect mechanism. In CSMA/CD a station must never be allowed to believe it has transmitted a frame successfully if that frame has, in fact, Unit - 4 experienced a collision.

Ethernet uses CSMA/CD
Ì No slots Ì adapter doesn’t transmit if Ì Before attempting a

it senses that some other adapter is transmitting, that is, carrier sense
Ì transmitting adapter aborts

retransmission, adapter waits a random time, that is, random access

when it senses that another adapter is transmitting, that is, collision detection
Unit - 4

CSMA/CD efficiency
Ì Tprop = max prop between 2 nodes in LAN Ì ttrans = time to transmit max-size frame

efficiency =

1 1 + 5t prop / ttrans

Ì Efficiency goes to 1 as tprop goes to 0 Ì Goes to 1 as ttrans goes to infinity Ì Much better than ALOHA, but still decentralized, simple,

and cheap

Unit - 4

10BaseT and 100BaseT
Ì 10/100 Mbps rate; latter called “fast ethernet” Ì T stands for Twisted Pair Ì Nodes connect to a hub: “star topology”; 100

m max distance between nodes and hub

twisted pair

hub

Unit - 4

Hubs
Hubs are essentially physical-layer repeaters: r bits coming from one link go out all other links r at the same rate r no frame buffering r no CSMA/CD at hub: adapters detect collisions r provides net management functionality

twisted pair

hub

Unit - 4

Manchester encoding

Ì Used in 10BaseT Ì Each bit has a transition

RLL ?

Ì Allows clocks in sending and receiving nodes to synchronize encoding to each other ? r no need for a centralized, global clock among nodes! Ì Hey, this is physical-layer stuff!

Unit - 4

Gbit Ethernet
Ì uses standard Ethernet frame format Ì allows for point-to-point links and shared broadcast Ì Ì Ì Ì

channels in shared mode, CSMA/CD is used; short distances between nodes required for efficiency uses hubs, called here “Buffered Distributors” Full-Duplex at 1 Gbps for point-to-point links 10 Gbps now !

Unit - 4

Interconnecting with hubs
Ì Backbone hub interconnects LAN segments Ì Extends max distance between nodes Ì But individual segment collision domains become one large

collision domain Ì Can’t interconnect 10BaseT & 100BaseT

hub

hub

hub

hub

Unit - 4

Switch
Ì Link layer device

and forwards Ethernet frames r examines frame header and selectively forwards frame based on MAC dest address r when frame is to be forwarded on segment, uses CSMA/CD to access segment Ì transparent r hosts are unaware of presence of switches Ì plug-and-play, self-learning r switches do not need to be configured
Unit - 4

r stores

Forwarding
1 2 switch 3

hub

hub

hub

• How do determine onto which LAN segment to forward frame? • Looks like a routing problem...
Unit - 4

Self learning
Ì A switch has a switch table Ì entry in switch table:

(MAC Address, Interface, Time Stamp) r stale entries in table dropped (TTL can be 60 min) Ì switch learns which hosts can be reached through which interfaces r when frame received, switch “learns” location of sender: incoming LAN segment r records sender/location pair in switch table
r

Unit - 4

Filtering/Forwarding
When switch receives a frame: index switch table using MAC dest address if entry found for destination then{ if dest on segment from which frame arrived then drop the frame else forward the frame on interface indicated } else flood

forward on all but the interface on which the frame arrived
Unit - 4

Switch example
Suppose C sends frame to D
1 switch 2 3 hub D F G hub I E H address interface A B E G 1 1 2 3

A B C

hub

Ì Switch receives frame from from C r notes in bridge table that C is on interface 1 r because D is not in table, switch forwards frame into interfaces 2 and 3 Ì frame received by D
Unit - 4

Switch example
Suppose D replies back with frame to C.
switch address interface A B E G C 1 1 2 3 1

A B C

hub D

hub F G

hub I

E

H

Ì Switch receives frame from from D r notes in bridge table that D is on interface 2 r because C is in table, switch forwards frame only to interface 1 Ì frame received by C
Unit - 4

Switch: traffic isolation
Ì switch installation breaks subnet into LAN segments Ì switch filters packets:

same-LAN-segment frames not usually forwarded onto other LAN segments r segments become separate collision domains
r switch collision domain hub hub hub

collision domain

collision domain

Unit - 4

Institutional network
to external network mail server router switch web server

IP subnet
hub

hub

hub

Unit - 4

n e t l a b
BSNL TOWER SHEGAON SSGMCE

INFRASTRUCTURE
BSNL KHAMGAON OFC (FIBER OPTIC CABLE) Distance 20 KM

NetLink G.703/G.704 2701 PATTON Modem

Atire WireSpan 5000 Atire WireSpan 5000 Modem V.35

SERVER ROOM DATA CENTER WAN LAN
T&P EPABX DIAL IN SERVICE

RAS CISCO 5300 CISCO 7500

42U Switch & Server Racks

SSGMCE CAMPUS

CISCO 2620 ROUTER

1

2

3

4

5

6

1] Traffic Monitoring Server 2] DNS (Secondary NS2) Server 3] Proxy & Dial-in Server 4] WWW & POP Server Unit 5] DNS (Primary NS1) 4& Mail 6] DHCP+FTP Server

GMS ENGLIS H SCHOO L

NetLink G.703/G.704 2701 PATTON Modem

BSNL KHAMGAON OFC
RAS CISCO 5300 CISCO 7500

n e t l a b

INFRASTRUCTURE
E N

Layer II/III switch 6 CORE FIBER UTP
SWITCH/ SERVER RACK

BSNL TOWER SHEGAON SSGMCE CENTRAL LIBRARY BUILDING

GMS ENG SCHOOL

2000 MTRS FIBER
COVERS EACH CORNER OF SSGMCE

MBA DEPARTMENT

Atire WireSpan 5000 Atire WireSpan 5000 Modem V.35 MECH EXTC

SAP-LAB

ELECT

SM1 LADIES HOSTEL

SV BOYS HOSTEL

SGIRC NEW ADMIN BUILDING
T&P EPABX DIAL IN SERVICE

DWL-2100AP D-Link

Wi-Fi Facility
DWL-2100AP Unit - 4 D-Link

SERVER ROOM
DATA CENTER

CENTRAL LIBRARY 9U-Rack

SV BOYS HOSTEL

GMS SHCOOL

12U-Rack
3300SM (24) D-Link 1024D (24) DES 1016D (16)

12U-Rack

DETAILED VIEW
6 Core OFC 1000BASE-SX CAT-5

ELECTRICAL DEPARTMENT 9U-Rack

42U- RACK 3COM 4050 (12)
192.168.254.1 0 192.168.254.13 192.168.254.16 192.168.254.14 192.168.254.12 192.168.254.17

3300TM (24)

3300TM (24)

3COM3300XM (24)

ELECTRONICS DEPARTMENT 12U-Rack

4226 (24) 4226 (24) 4226 (24) Cisco 2950 (12)

3COM3300XM (24) 3COM3300MM (24)

3COM3300TM (24)

3COM3300XM (24)

MECHANICAL & GEN ENGG DEPARTMENT 12U-Rack

4226 4226 4226 4228T

192.168.254.18 192.168.254.14 192.168.254.47

3COM3300XM (24)

3COM3300MM (24) 4226 (24)

GIRLS HOSTEL

12U-Rack

MBA DEPT

12U-Rack
CISCO 2620

SERVER ROOM 42U-Rack Unit - 4

Motorola Canopy (Dish) RF Point to Point Access Point

Arial Distance 3 +/- KM
GMS/SSGMCE

INTRANET LAN-2

THREE SYSTEM SAP R/3 LANDSCAPE

SSGMCE Campus Building roof

EXTERNAL WORLD

INTERNE T

GMS Building Complex

GMS Building roof

N E T L A B data center
SSGMCE WAN

SAP ROUTER

DEV

QAS

PRD

All Rack Mounted Servers

SSGMCE INTRANET LAN-1

Unit - 4

3 KM

NEXT PHASE PROJECT EXPANSION PLAN GMS

INTE RNET

SSGMCE Campus Building roof
SSGMC EWAN

SAP ROUTER DEV QAS PRD
SSGMCE INTRANE T

Remote Branches

ALANDI
Remote Branches

All Rack Mounted Servers

PANDHARPUR
Remote Branches

TRAMBK’WAR
Remote Branches

OMKARESHWAR

OTHER SCHOOLS

ANAND SAGAR OFFICE

ANAND SAGAR

Unit - 4

Switches vs. Routers
Ì both store-and-forward devices r routers: network layer devices (examine network layer headers) r switches are link layer devices Ì routers maintain routing tables, implement routing algorithms Ì switches maintain switch tables, implement filtering, learning algorithms

Unit - 4

Summary comparison

Unit - 4

Point to Point Data Link Control
Ì one sender, one receiver, one link: easier than

broadcast link: r no Media Access Control r no need for explicit MAC addressing r e.g., dialup link, ISDN line Ì popular point-to-point DLC protocols: r PPP (point-to-point protocol) r HDLC: High level data link control (Data link used HDLC to be considered “high layer” in protocol stack! High-Level Data Link Control
Unit - 4

PPP Design Requirements [RFC 1557]
Ì packet framing: encapsulation of network-layer

Ì Ì Ì Ì

datagram in data link frame r carry network layer data of any network layer protocol (not just IP) at same time r ability to demultiplex upwards bit transparency: must carry any bit pattern in the data field error detection (no correction) connection liveness: detect, signal link failure to network layer network layer address negotiation: endpoint can learn/configure each other’s network address
Unit - 4

PPP non-requirements
Ì no error correction/recovery Ì no flow control Ì out of order delivery OK Ì no need to support multipoint links (e.g., polling)

Error recovery, flow control, data re-ordering all relegated to higher layers!

Unit - 4

PPP Data Frame
Ì Flag: delimiter (framing) Ì Address: does nothing (only one option) Ì Control: does nothing; in the future possible multiple

control fields Ì Protocol: upper layer protocol to which frame delivered (eg, PPP-LCP, IP, IPCP, etc)

Unit - 4

PPP Data Frame
Ì info: upper layer data being carried Ì check: cyclic redundancy check for error detection

Unit - 4

Byte Stuffing
Ì “data transparency” requirement: data field must be allowed to include flag pattern <01111110> r Q: is received <01111110> data or flag?

Ì Sender: adds (“stuffs”) extra < 01111110> byte after

each < 01111110> data byte Ì Receiver: r two 01111110 bytes in a row: discard first byte, continue data reception r single 01111110: flag byte
Unit - 4

Byte Stuffing
flag byte pattern in data to send

flag byte pattern plus stuffed byte in transmitted data
Unit - 4

PPP Data Control Protocol
Before exchanging networklayer data, data link peers must Ì configure PPP link (max. frame length, authentication) authentication Ì learn/configure network layer information r for IP: carry IP Control Protocol (IPCP) msgs (protocol field: 8021) to configure/learn IP address

Unit - 4

Unit - 4

Multimedia In past, we listened to audio/video broadcast through a radio or TV transmission. But now time has changed Audio and Video services are divided into 3 categories 1. Streaming stored audio/video 2. Streaming live audio/video and Streaming – Means a user can listen (or 3. Interactive stored audio/video watch) the file after downloading has stored.

Unit - 4

Multimedia, Quality of Service: What is it?
Multimedia applications: network audio and video (“continuous media”)

QoS
network provides application with level of performance needed for application to function.
Unit - 4

MM Networking Applications
Fundamental Classes of MM characteristics: applications: Ì Typically delay sensitive 1) Streaming stored audio r end-to-end delay r delay jitter and video Ì But loss tolerant: 2) Streaming live audio infrequent losses cause and video minor glitches 3) Real-time interactive Ì Antithesis of data, which audio and video are loss intolerant but Jitter is the variability of packet delays within the same packet stream delay tolerant.

Unit - 4

Streaming Stored Multimedia

Streaming: Ì media stored at source Ì transmitted to client Ì streaming: client playout begins streaming before all data has arrived
Ì timing constraint for still-to-be transmitted

data: in time for playout

Unit - 4

Streaming Stored Multimedia: What is it?

Cumulative data

1. video recorded

2. video sent

network delay

3. video received, played out at client time

streaming: at this time, client playing out early part of video, while server still sending later part of video
Unit - 4

Streaming Stored Multimedia: Interactivity

Ì VCR-like functionality: client can

pause, rewind, FF, push slider bar r 10 sec initial delay OK r 1-2 sec until command effect OK r RTSP often used (more later)
Ì timing constraint for still-to-be transmitted

data: in time for playout
Unit - 4

Streaming Live Multimedia
Examples: Ì Internet radio talk show Ì Live sporting event Streaming Ì playback buffer Ì playback can lag tens of seconds after transmission Ì still have timing constraint Interactivity Ì fast forward impossible Ì rewind, pause possible!
Unit - 4

Multimedia Over Today’s Internet

TCP/UDP/IP: “best-effort service”
Ì no guarantees on delay, loss

But you said multimedia apps requires ? QoS and level of performance to be ? ? effective! ?

?

?

?

?

?

?

?

Today’s Internet multimedia applications use application-level techniques to mitigate (as best possible) effects of delay, loss
Unit - 4

about audio compression
Ì Analog signal sampled
Ì Example: 8,000

at constant rate
r r

telephone: 8,000 samples/sec CD music: 44,100 samples/sec

samples/sec, 256 quantized values --> 64,000 bps Ì Receiver converts it back to analog signal:
r

some quality reduction

Ì Each sample quantized,

i.e., rounded
r

e.g., 28=256 possible quantized values

Ì Each quantized value

represented by bits
r

Example rates Ì CD: 1.411 Mbps Ì MP3: 96, 128, 160 kbps Ì Internet telephony: 5.3 - 13 kbps

8 bits for 256 values
Unit - 4

about video compression
Ì Video is sequence of

images displayed at constant rate
r

e.g. 24 images/sec

Ì Digital image is array

of pixels Ì Each pixel represented by bits Ì Redundancy
spatial r temporal
r

Examples: Ì MPEG 1 (CD-ROM) 1.5 Mbps Ì MPEG2 (DVD) 3-6 Mbps Ì MPEG4 (often used in Internet, < 1 Mbps)

Unit - 4

Streaming Multimedia: UDP or TCP?
UDP
server sends at rate appropriate for client (oblivious to network congestion !) r often send rate = encoding rate = constant rate r then, fill rate = constant rate - packet loss short playout delay (2-5 seconds) to compensate for network delay jitter Ì error recover: time permitting Ì
Ì

TCP
Ì

send at maximum possible rate under TCP fill rate fluctuates due to TCP congestion control Ì larger playout delay: smooth TCP delivery rate Ì HTTP/TCP passes more easily through firewalls Ì

Unit - 4

RTSP
HTTP Ì Does not target multimedia content Ì No commands for fast forward, etc. RTSP: RFC 2326 Ì Client-server application layer protocol. Ì For user to control display: rewind, fast forward, pause, resume, repositioning, etc…

What it doesn’t do: Ì does not define how audio/video is encapsulated for streaming over network Ì does not restrict how streamed media is transported; it can be transported over UDP or TCP Ì does not specify how the media player buffers audio/video
Unit - 4

Using a Media Server and RTSP
The real-time streaming Protocol (RTSP): RTSP Is control protocol designed to add more functionalities to the streaming process. Using RTSP we can control the playing of audio/video. RTSP is a out-of-band control protocol that is similar to the second connection in FTP.

Unit - 4

Using a Media Server and RTSP
Client Machine 1 GET: metafile Web Server 2 3 4 SETUP Media Player 5 RESPONSE 6 PLAY 7 RESPONSE 8 TEARDOWN 9 RESPONSE
Unit - 4

Server Machine

Browser

Response

Media Server

RTSP: out of band control
FTP uses an “out-of-band” control channel: Ì A file is transferred over one TCP connection. Ì Control information (directory changes, file deletion, file renaming, etc.) is sent over a separate TCP connection. Ì The “out-of-band” and “inband” channels use different port numbers.

RTSP messages are also sent out-of-band: Ì RTSP control messages use different port numbers than the media stream: out-ofband.
r

Port 554

Ì The media stream is

considered “in-band”.

Unit - 4

RTSP Example
Scenario:
Ì metafile communicated to web browser Ì browser launches player Ì player sets up an RTSP control connection, data

connection to streaming server

Unit - 4

Metafile Example
<title>Twister</title> <session> <group language=en lipsync> <switch> <track type=audio e="PCMU/8000/1" src = "rtsp://audio.example.com/twister/audio.en/lofi"> <track type=audio e="DVI4/16000/2" pt="90 DVI4/8000/1" src="rtsp://audio.example.com/twister/audio.en/hifi"> </switch> <track type="video/jpeg" src="rtsp://video.example.com/twister/video"> </group> </session>
Unit - 4

RTSP Operation

Unit - 4

RTSP Exchange Example
C: SETUP rtsp://audio.example.com/twister/audio RTSP/1.0 Transport: rtp/udp; compression; port=3056; mode=PLAY S: RTSP/1.0 200 1 OK Session 4231 C: PLAY rtsp://audio.example.com/twister/audio.en/lofi RTSP/1.0 Session: 4231 Range: npt=0C: PAUSE rtsp://audio.example.com/twister/audio.en/lofi RTSP/1.0 Session: 4231 Range: npt=37 C: TEARDOWN rtsp://audio.example.com/twister/audio.en/lofi RTSP/1.0 Session: 4231 S: 200 3 OK
Unit - 4

Real-time interactive applications
Ì PC-2-PC phone
r

instant messaging services are providing this

Ì PC-2-phone

Dialpad r Net2phone Ì videoconference with Webcams
r

Going to now look at a PC-2-PC Internet phone example in detail

Unit - 4

Interactive Multimedia: Internet Phone
Introduce Internet Phone by way of an example
Ì speaker’s audio: alternating talk spurts, silent periods.
r

64 kbps during talk spurt 20 msec chunks at 8 Kbytes/sec: 160 bytes data

Ì pkts generated only during talk spurts
r

Ì application-layer header added to each chunk. Ì Chunk+header encapsulated into UDP segment. Ì application sends UDP segment into socket every 20

msec during talkspurt.

Unit - 4

Internet Phone: Packet Loss and Delay
Ì network loss: IP datagram lost due to network

congestion (router buffer overflow) Ì delay loss: IP datagram arrives too late for playout at receiver
delays: processing, queueing in network; endsystem (sender, receiver) delays r typical maximum tolerable delay: 400 ms
r

Ì loss tolerance: depending on voice encoding,

losses concealed, packet loss rates between 1% and 10% can be tolerated.
Unit - 4

Delay Jitter
Cumulative data

constant bit rate transmission

client reception
buffered data

variable network delay (jitter)

constant bit rate playout at client

client playout delay

time

Ì Consider the end-to-end delays of two consecutive

packets: difference can be more or less than 20 msec
Unit - 4

Internet Phone: Fixed Playout Delay
Ì Receiver attempts to playout each chunk

exactly q msecs after chunk was generated. r chunk has time stamp t: play out chunk at t+q . r chunk arrives after t+q: data arrives too late for playout, data “lost” Ì Tradeoff for q: r large q: less packet loss r small q: better interactive experience

Unit - 4

Fixed Playout Delay
• Sender generates packets every 20 msec during talk spurt.

• First packet received at time r • First playout schedule: begins at p • Second playout schedule: begins at p’

p

a

c k

Unit - 4

Adaptive Playout Delay, I
Ì Goal: minimize playout delay, keeping late loss rate low Ì Approach: adaptive playout delay adjustment:
r r r

Estimate network delay, adjust playout delay at beginning of each talk spurt. Silent periods compressed and elongated. Chunks still played out every 20 msec during talk spurt.
t i = timestamp of the ith packet ri = the time packet i is received by receiver p i = the time packet i is played at receiver ri − t i = network delay for ith packet d i = estimate of average network delay after receiving ith packet

Dynamic estimate of average delay at receiver:

d i = (1 − u )d i −1 + u( ri − ti )
where u is a fixed constant (e.g., u = .01).
Unit - 4

Adaptive playout delay II
Also useful to estimate the average deviation of the delay, vi :

vi = (1 − u )vi −1 + u | ri − ti − d i |
The estimates di and vi are calculated for every received packet, although they are only used at the beginning of a talk spurt. For first packet in talk spurt, playout time is:

pi = ti + d i + Kvi
where K is a positive constant. Remaining packets in talkspurt are played out periodically

Unit - 4

Adaptive Playout, III
Q: How does receiver determine whether packet is first in a talkspurt? Ì If no loss, receiver looks at successive timestamps.
r

difference of successive stamps > 20 msec -->talk spurt begins.

Ì With loss possible, receiver must look at both time

stamps and sequence numbers.
r

difference of successive stamps > 20 msec and sequence numbers without gaps --> talk spurt begins.

Unit - 4

Recovery from packet loss (1)
forward error correction (FEC): simple scheme Ì for every group of n chunks create a redundant chunk by exclusive OR-ing the n original chunks Ì send out n+1 chunks, increasing the bandwidth by factor 1/n. Ì can reconstruct the original n chunks if there is at most one lost chunk from the n+1 chunks

Ì Playout delay needs to

be fixed to the time to receive all n+1 packets Ì Tradeoff: r increase n, less bandwidth waste r increase n, longer playout delay r increase n, higher probability that 2 or more chunks will be lost
Unit - 4

Recovery from packet loss (2)
2nd FEC scheme • “piggyback lower quality stream” • send lower resolution audio stream as the redundant information • for example, nominal stream PCM at 64 kbps and redundant stream GSM at 13 kbps.
• Whenever there is non-consecutive loss, the

receiver can conceal the loss. • Can also append (n-1)st and (n-2)nd low-bit rate chunk
Unit - 4

Recovery from packet loss (3)

Interleaving Ì chunks are broken up into smaller units Ì for example, 4 5 msec units per chunk Ì Packet contains small units from different chunks

Ì if packet is lost, still have most

of every chunk Ì has no redundancy overhead Ì but adds to playout delay

Unit - 4

Summary: Internet Multimedia: bag of
tricks
Ì use UDP to avoid TCP congestion control (delays) for

time-sensitive traffic

Ì client-side adaptive playout delay: to compensate

for delay Ì server side matches stream bandwidth to available client-to-server path bandwidth
r r

chose among pre-encoded stream rates dynamic server encoding rate

Ì error recovery (on top of UDP) r FEC, interleaving r retransmissions, time permitting r conceal errors: repeat nearby data
Unit - 4

Real-Time Protocol (RTP)
Ì RTP specifies a packet

structure for packets carrying audio and video data Ì RFC 1889. Ì RTP packet provides
r

Ì RTP runs in the end

r

r

payload type identification packet sequence numbering timestamping

systems. Ì RTP packets are encapsulated in UDP segments Ì Interoperability: If two Internet phone applications run RTP, then they may be able to work together
Unit - 4

RTP runs on top of UDP
RTP libraries provide a transport-layer interface that extend UDP: • port numbers, IP addresses • payload type identification • packet sequence numbering • time-stamping

Unit - 4

RTP Example
Ì Consider sending 64

kbps PCM-encoded voice over RTP. Ì Application collects the encoded data in chunks, e.g., every 20 msec = 160 bytes in a chunk. Ì The audio chunk along with the RTP header form the RTP packet, which is encapsulated into a UDP segment.

Ì RTP header

indicates type of audio encoding in each packet
r

sender can change encoding during a conference.

Ì RTP header also

contains sequence numbers and timestamps.
Unit - 4

RTP and QoS
Ì RTP does not provide any mechanism to

ensure timely delivery of data or provide other quality of service guarantees. Ì RTP encapsulation is only seen at the end systems: it is not seen by intermediate routers.
r

Routers providing best-effort service do not make any special effort to ensure that RTP packets arrive at the destination in a timely matter.

Unit - 4

RTP Header

Payload Type (7 bits): Indicates type of encoding currently being used. If sender changes encoding in middle of conference, sender informs the receiver through this payload type field. •Payload •Payload •Payload •Payload •Payload •Payload type 0: PCM mu-law, 64 kbps type 3, GSM, 13 kbps type 7, LPC, 2.4 kbps type 26, Motion JPEG type 31. H.261 type 33, MPEG2 video

Sequence Number (16 bits): Increments by one for each RTP packet sent, and may be used to detect packet loss and to restore packet sequence.
Unit - 4

RTP Header (2)
Ì Timestamp field (32 bytes long). Reflects the sampling instant

of the first byte in the RTP data packet. r For audio, timestamp clock typically increments by one for each sampling period (for example, each 125 usecs for a 8 KHz sampling clock) r if application generates chunks of 160 encoded samples, then timestamp increases by 160 for each RTP packet when source is active. Timestamp clock continues to increase at constant rate when source is inactive. stream. Each stream in a RTP session should have a distinct SSRC.

Ì SSRC field (32 bits long). Identifies the source of the RTP

Unit - 4

RTSP/RTP Programming Assignment
Ì Build a server that encapsulates stored video

frames into RTP packets
grab video frame, add RTP headers, create UDP segments, send segments to UDP socket r include seq numbers and time stamps r client RTP provided for you
r

Ì Also write the client side of RTSP r issue play and pause commands r server RTSP provided for you

Unit - 4

Real-Time Control Protocol (RTCP)
Ì Works in conjunction with

RTP. Ì Each participant in RTP session periodically transmits RTCP control packets to all other participants. Ì Each RTCP packet contains sender and/or receiver reports
r

Ì Statistics include

report statistics useful to application

number of packets sent, number of packets lost, interarrival jitter, etc. Ì Feedback can be used to control performance r Sender may modify its transmissions based on feedback

Unit - 4

RTCP - Continued

- For an RTP session there is typically a single multicast address; all RTP and RTCP packets belonging to the session use the multicast address. - RTP and RTCP packets are distinguished from each other through the use of distinct port numbers. - To limit traffic, each participant reduces his RTCP traffic as the number of conference participants increases.
Unit - 4

RTCP Packets
Receiver report packets: Ì fraction of packets lost, last sequence number, average interarrival jitter. Sender report packets: Ì SSRC of the RTP stream, the current time, the number of packets sent, and the number of bytes sent.

Source description packets: Ì e-mail address of sender, sender's name, SSRC of associated RTP stream. Ì Provide mapping between the SSRC and the user/host name.
Unit - 4

Synchronization of Streams
Ì RTCP can synchronize Ì Each RTCP sender-report

different media streams within a RTP session. Ì Consider videoconferencing app for which each sender generates one RTP stream for video and one for audio. Ì Timestamps in RTP packets tied to the video and audio sampling clocks r not tied to the wallclock time

packet contains (for the most recently generated packet in the associated RTP stream):
r

r

timestamp of the RTP packet wall-clock time for when packet was created.

Ì Receivers can use this

association to synchronize the playout of audio and video.

Unit - 4

RTCP Bandwidth Scaling
Ì RTCP attempts to limit

its traffic to 5% of the session bandwidth. Example Ì Suppose one sender, sending video at a rate of 2 Mbps. Then RTCP attempts to limit its traffic to 100 Kbps. Ì RTCP gives 75% of this rate to the receivers; remaining 25% to the sender

Ì The 75 kbps is equally
r

shared among receivers:
With R receivers, each receiver gets to send RTCP traffic at 75/R kbps.

Ì Sender gets to send RTCP

traffic at 25 kbps. Ì Participant determines RTCP packet transmission period by calculating avg RTCP packet size (across the entire session) and dividing by allocated rate.
Unit - 4

SIP
Ì Session Initiation Protocol Ì Comes from IETF

SIP long-term vision Ì All telephone calls and video conference calls take place over the Internet Ì People are identified by names or e-mail addresses, rather than by phone numbers. Ì You can reach the callee, no matter where the callee roams, no matter what IP device the callee is currently using.

Unit - 4

SIP Services
Ì Setting up a call

Provides mechanisms for caller to let callee know she wants to establish a call r Provides mechanisms so that caller and callee can agree on media type and encoding. r Provides mechanisms to end call.
r

Ì Determine current IP

address of callee.
r

Maps mnemonic identifier to current IP address

Ì Call management r Add new media streams during call r Change encoding during call r Invite others r Transfer and hold calls
Unit - 4

Setting up a call to a known IP address • Alice’s SIP invite
A l i c e

message indicates her port number & IP address. Indicates encoding that Alice prefers to receive (PCM ulaw) • Bob’s 200 OK message indicates his port number, IP address & preferred encoding (GSM)

µ

1

6

7

. 1

8

0 . 1 1 2 . 2 4 messages can be • INVSIPover ob or UDP; IT sent E b TCP@193 .6 c=IhereIP4 16 RTP/UDP. 4. sent over N 7 .1 8 0 . 1 1 2 m=•Default SIP port number audi o 3806 0 RTP/A
is 5060.
Unit - 4

Setting up a call (more)
Ì Codec negotiation:
r r

r

Suppose Bob doesn’t have PCM ulaw encoder. Bob will instead reply with 606 Not Acceptable Reply and list encoders he can use. Alice can then send a new INVITE message, advertising an appropriate encoder.

Ì Rejecting the call

Bob can reject with replies “busy,” “gone,” “payment required,” “forbidden”. Ì Media can be sent over RTP or some other protocol.
r

Unit - 4

Example of SIP message
INVITE sip:bob@domain.com SIP/2.0 Via: SIP/2.0/UDP 167.180.112.24 From: sip:alice@hereway.com To: sip:bob@domain.com Call-ID: a2e3a@pigeon.hereway.com Content-Type: application/sdp Content-Length: 885 c=IN IP4 167.180.112.24 m=audio 38060 RTP/AVP 0 Notes: Ì HTTP message syntax Ì sdp = session description protocol Ì Call-ID is unique for every call.
• Here we don’t know

Bob’s IP address. Intermediate SIP servers will be necessary.
• Alice sends and

receives SIP messages using the SIP default port number 506. • Alice specifies in Via: header that SIP client sends and receives SIP messages over UDP
Unit - 4

Name translation and user locataion
Ì 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:
r r r

user moves around DHCP protocol user has different IP devices (PC, PDA, car device)

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

Service provided by SIP servers: Ì SIP registrar server Ì SIP proxy server
Unit - 4

SIP Registrar
Ì When Bob starts SIP client, client sends SIP

REGISTER message to Bob’s registrar server (similar function needed by Instant Messaging)
Register Message:
REGISTER sip:domain.com SIP/2.0 Via: SIP/2.0/UDP 193.64.210.89 From: sip:bob@domain.com To: sip:bob@domain.com Expires: 3600

Unit - 4

SIP Proxy
Ì Alice sends invite message to her proxy server r contains address sip:bob@domain.com Ì Proxy responsible for routing SIP messages to callee r possibly through multiple proxies. Ì Callee sends response back through the same set of

proxies. Ì Proxy returns SIP response message to Alice
r

contains Bob’s IP address

Ì Note: proxy is analogous to local DNS server

Unit - 4

Caller jim@umass.edu with places a call to keith@upenn.edu (1) Jim sends INVITE message to umass SIP proxy. (2) Proxy forwards request to upenn registrar server. (3) upenn server returns redirect response, indicating that it should try keith@eurecom.fr

Example

2

S I P p r o x y (4) umass proxy sends INVITE to eurecom registrar. (5) eurecomd u m a s s . e u

registrar forwards INVITE to 197.87.54.21, which is running keith’s SIP client. (6-8) SIP response sent back (9) media sent directly between clients. Note: also a SIP ack message, which is not shown.
Unit - 4

Comparison with H.323
Ì H.323 is another signaling

protocol for real-time, interactive Ì H.323 is a complete, vertically integrated suite of protocols for multimedia conferencing: signaling, registration, admission control, transport and codecs. Ì SIP is a single component. Works with RTP, but does not mandate it. Can be combined with other protocols and services.

Ì H.323 comes from the

ITU (telephony). Ì SIP comes from IETF: Borrows much of its concepts from HTTP. SIP has a Web flavor, whereas H.323 has a telephony flavor. Ì SIP uses the KISS principle: Keep it simple stupid.
Unit - 4

Content distribution networks (CDNs)
Content replication
Ì Challenging to stream large files

origin server in North America

(e.g., video) from single origin server in real time Ì Solution: replicate content at hundreds of servers throughout Internet r content downloaded to CDN servers ahead of time r placing content “close” to user avoids impairments (loss, delay) of sending content over long paths r CDN server typically in edge/access network

CDN distribution node

CDN server in S. America CDN server in Europe

CDN server in Asia

Unit - 4

Content distribution networks (CDNs)
Content replication
Ì CDN (e.g., Akamai)
origin server in North America

customer is the content provider (e.g., CNN) Ì CDN replicates customers’ content in CDN servers. When provider updates content, CDN updates servers

CDN distribution node

CDN server in S. America CDN server in Europe

CDN server in Asia

Unit - 4

CDN example
1 2 3

HTTP request for www.foo.com/sports/sports.html

Origin server
DNS query for www.cdn.com

CDNs authoritative DNS server
HTTP request for www.cdn.com/www.foo.com/sports/ruth.gif

Nearby CDN server

origin server (www.foo.com) CDN company (cdn.com) Ì distributes gif files Ì distributes HTML Ì uses its authoritative DNS server to route redirect requests Ì replaces:
http://www.foo.com/sports.ruth.gif
http://www.cdn.com/www.foo.com/sports/ruth.gif
Unit - 4

with

More about CDNs
routing requests Ì CDN creates a “map”, indicating distances from leaf ISPs and CDN nodes Ì when query arrives at authoritative DNS server:
r server determines ISP from which query originates
r

uses “map” to determine best CDN server

Ì CDN nodes create application-layer overlay

network

Unit - 4

Chapter 7 outline
Ì 7.1 Multimedia Networking

Applications Ì 7.2 Streaming stored audio and video Ì 7.3 Real-time Multimedia: Internet Phone study Ì 7.4 Protocols for RealTime Interactive Applications
r

Ì 7.6 Beyond Best Effort Ì 7.7 Scheduling and

Policing Mechanisms Ì 7.8 Integrated Services and Differentiated Services Ì 7.9 RSVP

RTP,RTCP,SIP

Ì 7.5 Distributing

Multimedia: content distribution networks
Unit - 4

Improving QOS in IP Networks
Thus far: “making the best of best effort” Future: next generation Internet with QoS guarantees r RSVP: signaling for resource reservations r Differentiated Services: differential guarantees r Integrated Services: firm guarantees Ì simple model for sharing and congestion studies:

Unit - 4

Principles for QOS Guarantees
Ì Example: 1MbpsI P phone, FTP share 1.5 Mbps

link.
bursts of FTP can congest router, cause audio loss r want to give priority to audio over FTP
r

Principle 1 packet marking needed for router to distinguish between different classes; and new router policy to treat packets accordingly
Unit - 4

Ì

Principles for QOS Guarantees (more) (audio sends higher than what if applications misbehave
declared rate)
r

policing: force source adherence to bandwidth allocations

Ì marking and policing at network edge: r similar to ATM UNI (User Network Interface)

Principle 2 provide protection (isolation) for one class from others
Unit - 4

Principles for QOS Guarantees (more)
Ì Allocating fixed (non-sharable) bandwidth to flow:

inefficient use of bandwidth if flows doesn’t use its allocation

Principle 3 While providing isolation, it is desirable to use resources as efficiently as possible
Unit - 4

Principles for QOS Guarantees (more)
Ì Basic fact of life: can not support traffic demands

beyond link capacity

Principle 4 Call Admission: flow declares its needs, network may block call (e.g., busy signal) if it cannot meet needs
Unit - 4

Summary of QoS Principles

Let’s next look at mechanisms for achieving this ….
Unit - 4

Ì scheduling: choose next packet to send on link

Scheduling And Policing Mechanisms

Ì FIFO (first in first out) scheduling: send in order of arrival to queue r real-world example? r 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

Unit - 4

Scheduling Policies: more
Priority scheduling: transmit highest priority queued packet Ì multiple classes, with different priorities
r r

class may depend on marking or other header info, e.g. IP source/dest, port numbers, etc.. Real world example?

Unit - 4

Scheduling Policies: still more
round robin scheduling: multiple classes Ì cyclically scan class queues, serving one from each class (if available) Ì real world example? Ì

Unit - 4

Scheduling Policies: still more
Weighted Fair Queuing: Ì generalized Round Robin Ì each class gets weighted amount of service in each cycle Ì real-world example?

Unit - 4

Policing Mechanisms
Goal: limit traffic to not exceed declared parameters
Three common-used criteria: Ì (Long term) Average Rate: how many pkts can be sent per unit time (in the long run)
r

crucial question: what is the interval length: 100 packets per sec or 6000 packets per min have same average!

Ì Peak Rate: e.g., 6000 pkts per min. (ppm) avg.; 1500 ppm peak rate Ì (Max.) Burst Size: max. number of pkts sent consecutively (with no

intervening idle)

Unit - 4

Policing Mechanisms
Token Bucket: limit input to specified Burst Size and
Average Rate.

Ì bucket can hold b tokens Ì tokens generated at rate r token/sec unless bucket full Ì over interval of length t: number of packets admitted

less than or equal to (r t + b).

Unit - 4

Policing Mechanisms (more)
Ì token bucket, WFQ combine to provide

guaranteed upper bound on delay, i.e., QoS guarantee!
arriving traffic token rate, r bucket size, b

WFQ

per-flow rate, R

D = b/R max

Unit - 4

Chapter 7 outline
Ì 7.1 Multimedia Networking

Applications Ì 7.2 Streaming stored audio and video Ì 7.3 Real-time Multimedia: Internet Phone study Ì 7.4 Protocols for RealTime Interactive Applications
r

Ì 7.6 Beyond Best Effort Ì 7.7 Scheduling and

Policing Mechanisms Ì 7.8 Integrated Services and Differentiated Services Ì 7.9 RSVP

RTP,RTCP,SIP

Ì 7.5 Distributing

Multimedia: content distribution networks
Unit - 4

IETF Integrated Services
Ì architecture for providing QOS guarantees in IP

networks for individual application sessions Ì resource reservation: routers maintain state info (a la VC) of allocated resources, QoS req’s Ì admit/deny new call setup requests:

Question: can newly arriving flow be admitted with performance guarantees while not violated QoS guarantees made to already admitted flows?

Unit - 4

Intserv: QoS guarantee scenario
Ì Resource reservation r call setup, signaling (RSVP) r traffic, QoS declaration r per-element admission control

request/ reply
r

QoS-sensitive scheduling (e.g., WFQ)

Unit - 4

Call Admission
Arriving session must :
Ì declare its QOS requirement

R-spec: defines the QOS being requested Ì characterize traffic it will send into network r T-spec: defines traffic characteristics Ì signaling protocol: needed to carry R-spec and Tspec to routers (where reservation is required) r RSVP
r

Unit - 4

Intserv QoS: Service models [rfc2211, rfc
2212]
Guaranteed service:
Ì worst case traffic arrival: leaky-

Controlled load service:
Ì "a quality of service closely

bucket-policed source Ì simple (mathematically provable) bound on delay [Parekh 1992, Cruz 1988]

approximating the QoS that same flow would receive from an unloaded network element."

arriving traffic

token rate, r bucket size, b

WFQ

per-flow rate, R

D = b/R max

Unit - 4

IETF Differentiated Services
Concerns with Intserv: Ì Scalability: signaling, maintaining per-flow router state difficult with large number of flows Ì Flexible Service Models: Intserv has only two classes. Also want “qualitative” service classes
r r

“behaves like a wire” relative service distinction: Platinum, Gold, Silver

Diffserv approach: Ì simple functions in network core, relatively complex functions at edge routers (or hosts) Ì Do’t define define service classes, provide functional components to build service classes

Unit - 4

Diffserv Architecture
Edge router:
 per-flow traffic management  marks packets as in-profile

r marking scheduling b

and out-profile

. . .

Core router:
 per class traffic management  buffering and scheduling based

on marking at edge  preference given to in-profile packets  Assured Forwarding

Unit - 4

Edge-router Packet Marking
Ì profile: pre-negotiated rate A, bucket size B Ì packet marking at edge based on per-flow profile
Rate A B User packets

Possible usage of marking:
Ì class-based marking: packets of different classes

marked differently Ì intra-class marking: conforming portion of flow marked differently than non-conforming one
Unit - 4

Classification and Conditioning
Ì Packet is marked in the Type of Service (TOS) in IPv4,

and Traffic Class in IPv6 Ì 6 bits used for Differentiated Service Code Point (DSCP) and determine PHB that the packet will receive Ì 2 bits are currently unused

Unit - 4

Classification and Conditioning
may be desirable to limit traffic injection rate of some class: Ì user declares traffic profile (e.g., rate, burst size) Ì traffic metered, shaped if non-conforming

Unit - 4

Forwarding (PHB)
Ì PHB result in a different observable

(measurable) forwarding performance behavior Ì PHB does not specify what mechanisms to use to ensure required PHB performance behavior Ì Examples:
Class A gets x% of outgoing link bandwidth over time intervals of a specified length r Class A packets leave first before packets from class B
r
Unit - 4

Forwarding (PHB)
PHBs being developed:
Ì Expedited Forwarding: pkt departure rate of

a class equals or exceeds specified rate
r

logical link with a minimum guaranteed rate

Ì Assured Forwarding: 4 classes of traffic r each guaranteed minimum amount of bandwidth r each with three drop preference partitions

Unit - 4

Chapter 7 outline
Ì 7.1 Multimedia Networking

Applications Ì 7.2 Streaming stored audio and video Ì 7.3 Real-time Multimedia: Internet Phone study Ì 7.4 Protocols for RealTime Interactive Applications
r

Ì 7.6 Beyond Best Effort Ì 7.7 Scheduling and

Policing Mechanisms Ì 7.8 Integrated Services and Differentiated Services Ì 7.9 RSVP

RTP,RTCP,SIP

Ì 7.5 Distributing

Multimedia: content distribution networks
Unit - 4

Signaling in the Internet
connectionless (stateless) forwarding by IP routers

+

best effort service

=

no network signaling protocols in initial IP design

Ì New requirement: reserve resources along end-to-end

path (end system, routers) for QoS for multimedia applications Ì RSVP: Resource Reservation Protocol [RFC 2205]
r

“ … allow users to communicate requirements to network in robust and efficient way.” i.e., signaling !

Ì earlier Internet Signaling protocol: ST-II [RFC 1819]

Unit - 4

RSVP Design Goals
1. 2. 3. 4. 5. 6.

accommodate heterogeneous receivers (different bandwidth along paths) accommodate different applications with different resource requirements make multicast a first class service, with adaptation to multicast group membership leverage existing multicast/unicast routing, with adaptation to changes in underlying unicast, multicast routes control protocol overhead to grow (at worst) linear in # receivers modular design for heterogeneous underlying technologies

Unit - 4

RSVP: does not…
Ì specify how resources are to be reserved
Ì

rather: a mechanism for communicating needs that’s the job of routing protocols signaling decoupled from routing separation of control (signaling) and data (forwarding) planes

Ì determine routes packets will take
Ì Ì

Ì interact with forwarding of packets
Ì

Unit - 4

RSVP: overview of operation
Ì senders, receiver join a multicast group r done outside of RSVP r senders need not join group Ì sender-to-network signaling r path message: make sender presence known to routers r path teardown: delete sender’s path state from routers Ì receiver-to-network signaling r reservation message: reserve resources from sender(s) to receiver r reservation teardown: remove receiver reservations Ì network-to-end-system signaling r path error r reservation error

Unit - 4

Path msgs: RSVP sender-to-network signaling
Ì path message contents:

address: unicast destination, or multicast group r flowspec: bandwidth requirements spec. r filter flag: if yes, record identities of upstream senders (to allow packets filtering by source) r previous hop: upstream router/host ID r refresh time: time until this info times out Ì path message: communicates sender info, and reversepath-to-sender routing info r later upstream forwarding of receiver reservations
r
Unit - 4

RSVP: simple audio conference
Ì H1, H2, H3, H4, H5 both senders and receivers Ì multicast group m1 Ì no filtering: packets from any sender

forwarded Ì audio rate: b Ì only one multicast routing tree possible
H2 R1 H1 H5 R2 R3

H3

H4

Unit - 4

RSVP: building up path state
Ì H1, …, H5 all send path messages on m1:
(address=m1, Tspec=b, filter-spec=no-filter,refresh=100)

Ì Suppose H1 sends first path message
m1: in L1 out L2 L6 L6 m1: in out L5 L7 m1: in L7 out L3 L4

H2
L2

H3
L3 L1

R1

L6

R2
L5

L7

R3

L4

H4

H1

H5
Unit - 4

RSVP: building up path state
Ì next, H5 sends path message, creating more

state in routers
L6 L1 m1: in out L1 L2 L6 L5 L6 m1: in out L5 L6 L7 m1: in L7 out L3 L4

H2
L2

H3
L3 L1

R1

L6

R2
L5

L7

R3

L4

H4

H1

H5
Unit - 4

RSVP: building up path state
Ì H2, H3, H5 send path msgs, completing path

state tables
L1 L2 L6 m1: in out L1 L2 L6 L5 L6 L7 m1: in out L5 L6 L7 m1: in L3 L4 L7 out L3 L4 L7

H2
L2

H3
L3 L1

R1

L6

R2
L5

L7

R3

L4

H4

H1

H5
Unit - 4

reservation msgs: receiver-to-network signaling
Ì reservation message contents: r desired bandwidth: r filter type: • no filter: any packets address to multicast group can use reservation • fixed filter: only packets from specific set of senders can use reservation • dynamic filter: senders who’s p[ackets can be forwarded across link will change (by receiver choce) over time. r filter spec Ì reservations flow upstream from receiver-to-senders,

reserving resources, creating additional, receiver-related state at routers
Unit - 4

RSVP: receiver reservation example 1
H1 wants to receive audio from all other senders Ì H1 reservation msg flows uptree to sources Ì H1 only reserves enough bandwidth for 1 audio stream Ì reservation is of type “no filter” – any sender can use reserved bandwidth
H2 H3
L2 L3 L1

R1

L6

R2
L5

L7

R3

L4

H4

H1

H5
Unit - 4

RSVP: receiver reservation example 1
Ì H1 reservation msgs flows uptree to sources Ì routers, hosts reserve bandwidth b needed on

downstream links towards H1
m1: in L1 L2 out L1(b) L2 L6 L6 m1: in L5 out L5 L7 L6 L6(b) L7 L3 b L4 b m1: in L3 out L3 L4 L4 L7 L7(b)

H2
L2

b b L1

H3

R1

b L6

H1

b

R2
L5

b L7

R3

H4

H5
Unit - 4

RSVP: receiver reservation example 1 (more)
Ì next, H2 makes no-filter reservation for

bandwidth b Ì H2 forwards to R1, R1 forwards to H1 and R2 (?) Ì R2intakes noL6 L7 in L3 L4 action, since b already reserved on L1 L2 m1: m1: out L3 L4 L7(b) out L1(b) L2(b) L6 L6 L7 in L5 L6
m1: out L5 L6(b) L7

H2

b L2

b b b L1

R1

b L6

H1

b

R2
L5

b L7

R3

L3 b L4

b

H3

H4

H5
Unit - 4

RSVP: receiver reservation: issues
What if multiple senders (e.g., H3, H4, H5) over link (e.g., L6)? Ì arbitrary interleaving of packets Ì L6 flow policed by leaky bucket: if H3+H4+H5 sending L7 in L3 L4 m1: m1: in exceeds L6 packet loss will occur L3 L4 L7(b) rate L1(b) L2(b) L6 b, out L1 L2
out m1: in L5 out L5 L7 L6 L6(b) L7 L3 b L4 b

H2

b L2

b b b L1

H3

R1

b L6

H1

b

R2
L5

b L7

R3

H4

H5
Unit - 4

RSVP: example 2
Ì H1, H4 are only senders r send path messages as before, indicating filtered reservation r Routers store upstream senders for each upstream link Ì H2 will want to receive from H4 (only)
H2
L2

H3
L3 L1

R1

L6

R2

L7

R3

L4

H4

H1

Unit - 4

RSVP: example 2
Ì H1, H4 are only senders r send path messages as before, indicating filtered reservation
L1, L6 L2(H1-via-H1 out L6(H1-via-H1 L1(H4-via-R2 in ; H4-via-R2 ) ) ) L4, L7 L3(H4-via-H4 out L4(H1-via-R2 L7(H4-via-H4 in ; H1-via-R3 ) ) )

H2
L2

H3 R2
L1 L3 L7 L6, L7 ) )
Unit - 4

R1

L6 in

R3

L4

H4

H1

L6(H4-via-R3 out L7(H1-via-R1

RSVP: example 2
Ì receiver H2 sends reservation message for

source H4 at bandwidth b
r
in

propagated upstream towards H4, reserving b
;H4-via-R2 (b)) ) ) L4, L7 L3(H4-via-H4 ; H1-via-R2 out L4(H1-via-62 ) L7(H4-via-H4 (b)) in )

L1, L6 L2(H1-via-H1 out L6(H1-via-H1 L1(H4-via-R2

H2
L2

b L1

H3 R1
b L6 in

R2

b L7

R3

L3 b L4

H4

H1

L6, L7

L6(H4-via-R3 (b)) out L7(H1-via-R1 )
Unit - 4

RSVP: soft-state
Ì senders periodically resend path msgs to refresh

(maintain) state Ì receivers periodically resend resv msgs to refresh (maintain) state in L1, L6 in L4, L7 L2(H1-via-H1 Ì path and resv;H4-via-R2 (b)) TTL field, specifying H1-via-R3 msgs have L3(H4-via-H4 ; refresh out L6(H1-via-H1 ) out L4(H1-via-62 ) interval L1(H4-via-R2 ) L7(H4-via-H4 (b))
H2
L2 b L1

)

H3 R1
b L6 in

R2

b L7

R3

L3 b L4

H4

H1

L6, L7

L6(H4-via-R3 (b)) out L7(H1-via-R1 )
Unit - 4

RSVP: soft-state
Ì suppose H4 (sender) leaves without performing teardown Ì eventually state in routers will timeout and disappear!
L1, L6 L2(H1-via-H1 out L6(H1-via-H1 L1(H4-via-R2 in in

;H4-via-R2 (b)) ) )

L4, L7 L3(H4-via-H4 ; H1-via-R3 out L4(H1-via-62 ) L7(H4-via-H4 (b))

)

H2
L2

b L1

H3 R1
b L6 in

R2

b L7

R3

L3 b L4

H1

gone H4 fishing!

L6, L7

L6(H4-via-R3 (b)) out L7(H1-via-R1 )
Unit - 4

The many uses of reservation/path refresh
Ì recover from an earlier lost refresh message r expected time until refresh received must be longer than timeout interval! (short timer interval desired) Ì Handle receiver/sender that goes away without

teardown
r

Sender/receiver state will timeout and disappear

Ì Reservation refreshes will cause new reservations to

be made to a receiver from a sender who has joined since receivers last reservation refresh
r r

E.g., in previous example, H1 is only receiver, H3 only sender. Path/reservation messages complete, data flows H4 joins as sender, nothing happens until H3 refreshes reservation, causing R3 to forward reservation to H4, which allocates bandwidth
Unit - 4

RSVP: reflections
Ì multicast as a “first class” service Ì receiver-oriented reservations Ì use of soft-state

Unit - 4

Multimedia Networking: Summary
Ì multimedia applications and

requirements Ì making the best of today’s best effort service Ì scheduling and policing mechanisms Ì next generation Internet: Intserv, RSVP, Diffserv

Unit - 4

Sign up to vote on this title
UsefulNot useful

Master Your Semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master Your Semester with a Special Offer from Scribd & The New York Times

Cancel anytime.