Advance Computer Networks Lecture#14 Instructor: Engr. Muhammad Mateen Yaqoob.

24
Advance Computer Networks Lecture#14 Instructor: Engr. Muhammad Mateen Yaqoob

Transcript of Advance Computer Networks Lecture#14 Instructor: Engr. Muhammad Mateen Yaqoob.

Page 1: Advance Computer Networks Lecture#14 Instructor: Engr. Muhammad Mateen Yaqoob.

Advance Computer NetworksLecture#14

Instructor:

Engr. Muhammad Mateen Yaqoob

Page 2: Advance Computer Networks Lecture#14 Instructor: Engr. Muhammad Mateen Yaqoob.

MATEEN YAQOOB DEPARTMENT OF COMPUTER SCIENCE

Guidelines about Final Term Exam

Course Contents:◦ Lecture # 7 to Lecture # 14◦ Also includes the assignment and quiz

Pattern of Final Paper:◦ Total Marks = 50 marks◦ Paper will be from the slides, book and some part will be from research papers (two research papers

have been uploaded on webpage)◦ Short questions (one-two line answer) = 20 marks◦ Long questions = 30 marks; it includes scenario, case studies etc.◦ Paper will be logical◦ Get yourself prepared

Page 3: Advance Computer Networks Lecture#14 Instructor: Engr. Muhammad Mateen Yaqoob.

MATEEN YAQOOB DEPARTMENT OF COMPUTER SCIENCE

Important Announcement Presentations on assigned topics will be on 11-07-2015

Schedule will be available on mateen.yolasite.com

No excuse will be acceptable

Page 4: Advance Computer Networks Lecture#14 Instructor: Engr. Muhammad Mateen Yaqoob.

MATEEN YAQOOB DEPARTMENT OF COMPUTER SCIENCE

Audio and Video Compression multimedia applications need efficient use of transmission capacity

hence audio/video compression algorithms

techniques standardized by MPEG

lossless compression loses no information

lossy compression provides acceptable approximation to original (typically use)

Page 5: Advance Computer Networks Lecture#14 Instructor: Engr. Muhammad Mateen Yaqoob.

MATEEN YAQOOB DEPARTMENT OF COMPUTER SCIENCE

Real-Time Traffic increasing deployment of high-speed nets sees increasing real-time traffic use

has different requirements to traditional non real-time traffic◦ traditionally throughput, delay, reliability◦ real-time more concerned with timing issues◦ with deadline for delivery of data block

Page 6: Advance Computer Networks Lecture#14 Instructor: Engr. Muhammad Mateen Yaqoob.

MATEEN YAQOOB DEPARTMENT OF COMPUTER SCIENCE

Real-Time Traffic Requirements low jitter low latency integrate non-real-time and real-time services adapts to changing network / traffic conditions good performance for large nets / connections modest buffer requirements within the network high effective capacity utilization low overhead in header bits per packet low processing overhead

Page 7: Advance Computer Networks Lecture#14 Instructor: Engr. Muhammad Mateen Yaqoob.

MATEEN YAQOOB DEPARTMENT OF COMPUTER SCIENCE

Real-Time Transport Protocol (RTP) TCP has disadvantages for real-time use

◦ is point-to-point, not suitable for multicast◦ includes retransmission mechanisms◦ has no timing mechanisms

UDP can address some needs but not all

have Real-Time Transport Protocol (RTP)◦ defined in RFC 1889, RFC 3550◦ best suited to soft real-time applications◦ data transfer (RTP) & control (RTCP) protocols

Page 8: Advance Computer Networks Lecture#14 Instructor: Engr. Muhammad Mateen Yaqoob.

MATEEN YAQOOB DEPARTMENT OF COMPUTER SCIENCE

Real-Time Protocol (RTP) RTP specifies packet structure for packets carrying audio, video data

RFC 3550, RFC 1889

RTP packet provides ◦ payload type identification◦ packet sequence numbering◦ time stamping

RTP runs in end systems

RTP packets encapsulated in UDP segments

interoperability: if two VoIP applications run RTP, they may be able to work together

Page 9: Advance Computer Networks Lecture#14 Instructor: Engr. Muhammad Mateen Yaqoob.

MATEEN YAQOOB DEPARTMENT OF COMPUTER SCIENCE

RTP runs on top of UDPRTP libraries provide transport-layer interface that extends UDP:

• port numbers, IP addresses• payload type identification• packet sequence numbering• time-stamping

Page 10: Advance Computer Networks Lecture#14 Instructor: Engr. Muhammad Mateen Yaqoob.

MATEEN YAQOOB DEPARTMENT OF COMPUTER SCIENCE

RTP Protocol Architecture have close coupling between RTP and application-layer functionality

◦ view RTP as framework used by applications

imposes structure and defines common functions

key concepts:◦ application-level framing ◦ integrated layer processing

Page 11: Advance Computer Networks Lecture#14 Instructor: Engr. Muhammad Mateen Yaqoob.

MATEEN YAQOOB DEPARTMENT OF COMPUTER SCIENCE

Application-Level Framing TCP transparently performs data recovery

have scenarios where more appropriately done by application layer◦ when less than perfect delivery acceptable◦ when application can better provide data

have application-level data units (ADUs)◦ preserved by lower layer processing◦ form unit of error recovery◦ if lose part of ADU discard and retransmit entire ADU

Page 12: Advance Computer Networks Lecture#14 Instructor: Engr. Muhammad Mateen Yaqoob.

MATEEN YAQOOB DEPARTMENT OF COMPUTER SCIENCE

Integrated Layer Processing layered protocols have sequential processing of functions in each layer

◦ limits parallel or re-ordered functions

instead integrated layer processing allows tight coupling between adjacent layers for greater efficiency

concept that strict layering is inefficient is not new, cf. RPC implementation

Page 13: Advance Computer Networks Lecture#14 Instructor: Engr. Muhammad Mateen Yaqoob.

MATEEN YAQOOB DEPARTMENT OF COMPUTER SCIENCE

Integrated Layer Processing

Page 14: Advance Computer Networks Lecture#14 Instructor: Engr. Muhammad Mateen Yaqoob.

MATEEN YAQOOB DEPARTMENT OF COMPUTER SCIENCE

RTP example example: sending 64 kbps PCM-encoded voice over RTP

application collects encoded data in chunks, e.g., every 20 msec = 160 bytes in a chunk

audio chunk + RTP header form RTP packet, which is encapsulated in UDP segment

RTP header indicates type of audio encoding in each packet◦ sender can change encoding during conference

RTP header also contains sequence numbers, timestamps

Page 15: Advance Computer Networks Lecture#14 Instructor: Engr. Muhammad Mateen Yaqoob.

MATEEN YAQOOB DEPARTMENT OF COMPUTER SCIENCE

RTP and QoS RTP does not provide any mechanism to ensure timely data delivery or other QoS guarantees

RTP encapsulation only seen at end systems (not by intermediate routers)◦ routers provide best-effort service, making no special effort to ensure that RTP packets arrive at

destination in timely matter

Page 16: Advance Computer Networks Lecture#14 Instructor: Engr. Muhammad Mateen Yaqoob.

MATEEN YAQOOB DEPARTMENT OF COMPUTER SCIENCE

RTP header

payload type (7 bits): indicates type of encoding currently being used. If sender changes encoding during call, sender informs receiver via payload type field

Payload type 0: PCM mu-law, 64 kbpsPayload type 3: GSM, 13 kbpsPayload type 7: LPC, 2.4 kbpsPayload type 26: Motion JPEGPayload type 31: H.261Payload type 33: MPEG2 video

sequence # (16 bits): increment by one for each RTP packet sent detect packet loss, restore packet sequence

payload type

sequence number type

time stamp SynchronizationSource ID

Miscellaneous fields

Page 17: Advance Computer Networks Lecture#14 Instructor: Engr. Muhammad Mateen Yaqoob.

MATEEN YAQOOB DEPARTMENT OF COMPUTER SCIENCE

RTP header

timestamp field (32 bits long): sampling instant of first byte in this RTP data packet◦ for audio, timestamp clock increments by one for each sampling period (e.g., each 125 usecs for 8 KHz

sampling clock) ◦ if application generates chunks of 160 encoded samples, timestamp increases by 160 for each RTP

packet when source is active. Timestamp clock continues to increase at constant rate when source is inactive.

SSRC field (32 bits long): identifies source of RTP stream. Each stream in RTP session has distinct SSRC

payload type

sequence number type

time stamp SynchronizationSource ID

Miscellaneous fields

Page 18: Advance Computer Networks Lecture#14 Instructor: Engr. Muhammad Mateen Yaqoob.

MATEEN YAQOOB DEPARTMENT OF COMPUTER SCIENCE

Real-Time Control Protocol (RTCP)

works in conjunction with RTP

each participant in RTP session periodically sends RTCP control packets to all other participants

each RTCP packet contains sender and/or receiver reports◦ report statistics useful to application: # packets sent, # packets lost, interarrival jitter

feedback used to control performance◦ sender may modify its transmissions based on feedback

Page 19: Advance Computer Networks Lecture#14 Instructor: Engr. Muhammad Mateen Yaqoob.

MATEEN YAQOOB DEPARTMENT OF COMPUTER SCIENCE

RTCP: packet types receiver report packets:

fraction of packets lost, last sequence number, average interarrival jitter

sender report packets:

SSRC of RTP stream, current time, number of packets sent, 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

Page 20: Advance Computer Networks Lecture#14 Instructor: Engr. Muhammad Mateen Yaqoob.

MATEEN YAQOOB DEPARTMENT OF COMPUTER SCIENCE

RTCP: stream synchronization RTCP can synchronize different media streams within a RTP session

e.g., videoconferencing app: each sender generates one RTP stream for video, one for audio.

timestamps in RTP packets tied to the video, audio sampling clocks◦ not tied to wall-clock time

each RTCP sender-report packet contains (for most recently generated packet in associated RTP stream):

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

receivers uses association to synchronize playout of audio, video

Page 21: Advance Computer Networks Lecture#14 Instructor: Engr. Muhammad Mateen Yaqoob.

MATEEN YAQOOB DEPARTMENT OF COMPUTER SCIENCE

RTCP: bandwidth scaling RTCP attempts to limit its traffic to 5% of session bandwidth

example : one sender, sending video at 2 Mbps

RTCP attempts to limit RTCP traffic to 100 Kbps

RTCP gives 75% of rate to receivers; remaining 25% to sender

75 kbps is equally 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 entire session) and dividing by allocated rate

Page 22: Advance Computer Networks Lecture#14 Instructor: Engr. Muhammad Mateen Yaqoob.

MATEEN YAQOOB DEPARTMENT OF COMPUTER SCIENCE

Scenario 1: mixed HTTP and VoIP

example: 1Mbps VoIP, HTTP share 1.5 Mbps link. ◦ HTTP bursts can congest router, cause 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

R1R2

Page 23: Advance Computer Networks Lecture#14 Instructor: Engr. Muhammad Mateen Yaqoob.

MATEEN YAQOOB DEPARTMENT OF COMPUTER SCIENCE

Principles for QOS guarantees (more)

what if applications misbehave (VoIP sends higher than declared rate)◦ policing: force source adherence to bandwidth allocations

marking, policing at network edge

provide protection (isolation) for one class from othersPrinciple 2

R1 R2

1.5 Mbps link

1 Mbps phone

packet marking and policing

Page 24: Advance Computer Networks Lecture#14 Instructor: Engr. Muhammad Mateen Yaqoob.

MATEEN YAQOOB DEPARTMENT OF COMPUTER SCIENCE

Principles for QOS guarantees (more)

allocating fixed (non-sharable) bandwidth to flow: inefficient use of bandwidth if flows doesn’t use its allocation

while providing isolation, it is desirable to use resources as efficiently as possible

Principle 3

R1R2

1.5 Mbps link

1 Mbps phone

1 Mbps logical link

0.5 Mbps logical link