transporting voice by using ip chapter 2acpang/course/voip_2003/... · 2003. 4. 8. · internet...
TRANSCRIPT
Transporting Voice by Using IP
Chapter 2
2Internet Telephony
Internet Overview
A collection of networksThe private networks
LANs, WANsInstitutions, corporations, business and governmentMay use various communication protocols
The public networksISP: Internet Service ProvidersUsing Internet Protocol
To connect to the InternetUsing IP
3Internet Telephony
Interconnecting Networks
4Internet Telephony
Overview of the IP Protocol Suite
IPA routing protocol for the passing of data packetsMust work in cooperation with higher layer protocols and lower-layer transmission systems
The OSI seven-layer modelThe top layer: useable information to be passed to the other sideThe information must be
Packaged appropriatelyRouted correctlyAnd it must traverse some physical medium
5Internet Telephony
OSI Model [1/3]
Physical layerThe physical mediaCoding and modulation schemes for 1’s and 0’s
Data link layerTransport the information over a single linkFrame packaging, error detection/correction and retransmission
Network layerRouting traffic through a networkPassing through intermediate points
6Internet Telephony
OSI Model [2/3]
Transport layerEnsure error-free, omission-free and in-sequence deliverySupport multiple streams from the source to destination for applications
Session layerThe commencement (e.g., login) and completion (e.g., logout) of a session between applicationsEstablish the dialogue
One way at a time or both ways at the same time
7Internet Telephony
OSI Model [3/3]
Presentation layerSpecify the language, the encoding and so on
Application layerProvide an interface to the userFile transfer programs and web browsers
8Internet Telephony
The IP suite and the OSI stack
TCPReliable, error-free, in-sequence delivery
UDPNo sequencing, no retransmission
9Internet Telephony
Internet Standards and the Process
The Internet SocietyA non-profit organizationKeep the Internet alive and growing“To assure the open development, evolution, and the use of Internet for the benefit of all people throughout the world”The tasks include
Supporting the development and dissemination of Internet standardsSupporting the RD related to the Internet and internetworkingAssisting developing countries
10Internet Telephony
Internet Standards and the Process
IABThe Internet Architecture BoardThe technical advisory groupProviding technical guidance to Internet SocietyOverseeing the Internet standards process
IETFThe Internet Engineering Task ForceComprising a huge number of volunteers
Equipment vendors, network operators, research institutions etc.
Developing Internet standardsDetailed technical workWorking groups
megaco, iptel, sip, sigtran
11Internet Telephony
Internet Standards and the Process
IESGThe Internet Engineering Steering GroupManaging the IETF’s activitiesApproving an official standard
IANAThe Internet Assigned Numbers Authority
Unique numbers and parameters used in Internet standardsBe registered with the IANA
12Internet Telephony
The Internet Standards Process
The processRFC 2026
First, Internet DraftThe early version of spec.Can be updated, replaced, or made obsolete by another document at any timeIETF’s Internet Drafts directorySix-month life-time
13Internet Telephony
The Internet Standards Process
RFCRequest for CommentsAn RFC number
Proposed standardA stable, complete, and well-understood spec.Has garnered significant interest
Draft standardTwo independently successful implementationsInteroperability be demonstrated
14Internet Telephony
The Internet Standards Process
A standardThe IESG is satisfiedThe spec. is stable and matureSignificant operational experienceA standard (STD) number
Not all RFCs are standardsSome document Best Current Practices (BCPs)
Processes, policies, or operational considerations
Others applicability statementsHow a spec be used, or different specs work together
15Internet Telephony
IP
RFC 791Amendments: RFCs 950, 919, and 920Requirements for Internet hosts: RFCs 1122, 1123Requirements for IP routers: RFC 1812IP datagram
Data packet with an IP header
Best-effort protocolNo guarantee that a given packet will be delivered
16Internet Telephony
IP Header [1/2]
Version 4Header LengthType of ServiceTotal LengthIdentification, Flags, and Fragment Offset
A datagram can be split into fragmentsIdentify data fragmentsFlags
a datagram can be fragmented or notIndicate the last fragment
TTLA number of hops (not a number of seconds)
17Internet Telephony
IP Header [2/2]
ProtocolThe higher-layer protocolTCP (6); UDP (17)
Source and Destination IP Addresses
18Internet Telephony
IP Routing
Based on the destination address in the IP headerRouters
Can contain a range of different interfacesDetermine the best outgoing interface for a given IP datagramRouting table
DestinationIP route maskFor example, any address starting with 182.16.16 should be routed on interface A. (IP route mask 255.255.255.0)
19Internet Telephony
Populating Routing Tables
IssuesThe correct information in the first placeKeep the information current in a dynamic environmentThe best path?
ProtocolsOSPF (Open Short Path First)
An AS (Autonomous System) is a group of routers that share routing information between them.Area 0: backbone areaBorder router
BGP (Border Gateway Protocol)
20Internet Telephony
OSPF Areas
21Internet Telephony
TCP
Transmission Control ProtocolIn sequence, without omissions and errorsEnd-to-end confirmation, packet retransmission, Flow controlRFC 793Break up a data stream in segmentsAttach a TCP headerSent down the stack to IPAt the destination, checks the header for errors
Send back an ack
The source retransmits if no ack within a given period
22Internet Telephony
The TCP Header [1/5]
23Internet Telephony
The TCP Header [2/5]
TCP Port NumbersIdentifying a specific instance of a given applicationA unique port number for a particular sessionWell-known port numbers
IANA, 0-102323, telnet; 25, SMTP
Many clients and a serverTCP/IPSource address and port number + Destination address and port numberA socket address (or a transport address)
24Internet Telephony
The TCP Header [3/5]
Sequence and acknowledge numbersIdentify individual segmentsActually count data octets transmittedA given segment with a SN of 100 and contains 150 octets of data
The ack number will be 250The SN of the next segment is 250
Other header fieldsData offset: header length (in 32-bit words)URG: 1 if urgent data is included, use urgent pointer fieldACK: 1, an ACKPSH: a push function, be delivered promptly
25Internet Telephony
The TCP Header [4/5]
RST: reset; an error and abort a sessionSYN: Synchronize; the initial messagesFIN: Finish; close a sessionWindow
The amount of buffer space available for receiving data
Checksum
26Internet Telephony
The TCP Header [5/5]
Urgent PointerAn offset to the first segment after the urgent dataIndicates the length of the urgent dataCritical information to be sent to the user application ASAP
27Internet Telephony
TCP Connections
An exampleAfter receiving
100, 200, 300ACK 400
Closing a connectionFINACK, FINACK
28Internet Telephony
UDP
User Datagram ProtocolPass individual pieces of data from an application to IPNo ACK, inherently unreliableApplications
A quick, on-shot transmission of data, request/responseDNSIf no response, the AP retransmits the requestThe AP includes a request identifier
The source port number is optionalChecksum
29Internet Telephony
Voice over UDP, not TCP
SpeechSmall packets, 10 – 40 msOccasional packet loss is not a catastropheDelay-sensitive
TCP: connection set-up, ack, retransmit → delays
5 % packet loss is acceptable if evenly spacedResource management and reservation techniquesA managed IP network
In-sequence deliveryMostly yes
UDP was not designed for voice traffic
30Internet Telephony
The Real-Time Transport Protocol
RTP: A Transport Protocol for Real-Time Applications
RFC 1889RTP – Real-Time Transport ProtocolRTCP – RTP Control Protocol
UDPPackets may be lost or out-of-sequence
RTP over UDPA sequence numberA time stamp for synchronized play-outDoes not solve the problems; simply provides additional information
31Internet Telephony
RTCP
A companion protocolExchange messages between session users# of lost packets, delay and inter-arrival jitterQuality feedbackRTCP is implicitly open when an RTP session is openE.g., RTP/RTCP uses UDP port 5004/5005
32Internet Telephony
RTP Payload Formats [1/2]
RTP carries the actual digitally encoded voiceRTP header + a payload of voice/video samplesUDP and IP headers are attached
Many voice- and video-coding standardsA payload type identifier in the RTP header
Specified in RFC 1890New coding schemes have become availableSee table 2-1
A sender has no idea what coding schemes a receiver could handle
33Internet Telephony
RTP Payload Formats [2/2]
Separate signaling systemsCapability negotiation during the call setupSIP and SDPA dynamic payload type may be used
Support new coding scheme in the futureThe encoding name is also significant.
Unambiguously refer to a particular payload specificationShould be registered with the IANA
RED, Redundant payload typeVoice samples + previous samplesMay use different encoding schemesCope with packet loss
34Internet Telephony
RTP Header Format
35Internet Telephony
The RTP Header [1/4]
Version (V)2
Padding (P)The padding octets at the end of the payloadThe payload needs to align with 32-bit boundaryThe last octet of the payload contains a count of the padding octets.
Extension (X)1, contains a header extension
36Internet Telephony
The RTP Header [2/4]
CSRC Count (CC)The number of contributing source identifiers
Marker (M)Support silence suppressionThe first packet of a talkspurt, after a silence period
Payload Type (PT)In general, a single RTP packet will contain media coded according to only one payload format.RED is an exception.
Sequence numberA random number generated by the sender at the beginning of a sessionIncremented by one for each RTP packet
37Internet Telephony
The RTP Header [3/4]
Timestamp32-bitThe instant at which the first sampleThe receiver
Synchronized play-outCalculate the jitterThe clock freq depends on the encoding
E.g., 8000Hz
Support silence suppressionThe initial timestamp is a random number chosen by the sending application.
38Internet Telephony
The RTP Header [4/4]
Synchronization Source (SSRC)32-bit identifierThe entity setting the sequence number and timestampChosen randomly, independent of the network addressMeant to be globally unique within a sessionMay be a sender or a mixer
Contributing Source (CSRC)An SSRC value for a contributor0-15 CSRC entries
RTP Header Extensions
39Internet Telephony
Mixers and Translators
MixersEnable multiple media streams from different sources to be combined into a single stream
If the capacity or bandwidth of a participant is limited
An audio conferenceThe SSRC is the mixer
More than one CSRC values
TranslatorsManage communications between entities that does not support the same coding schemeThe SSRC is the participant, not the translator.
40Internet Telephony
The RTP Control Protocol [1/3]
RTCPA companion control protocol of RTPPeriodic exchange of control information
For quality-related feedback
A third party can also monitor session quality and detect network problems.
Using RTCP and IP multicast
Five types of RTCP packetsSender Report: transmission and reception statistics
Receiver Report: reception statistics
41Internet Telephony
The RTP Control Protocol [2/3]
Source Description (SDES)One or more descriptions related to a particular session participantMust contain a canonical name (CNAME)
Separate from SSRC which might changeWhen both audio and video streams were being transmitted, the two streams would have
different SSRCsthe same CNAME for synchronized play-out
BYEThe end of a participation in a session
APPFor application-specific functions
42Internet Telephony
The RTP Control Protocol [3/3]
Two or more RTCP packets will be combinedSRs and RRs should be sent as often as possible to allow better statistical resolution.New receivers in a session must receive CNAME very quickly to allow a correlation between media sources and the received media.Every RTCP packet must contain a report packet (SR/RR) and an SDES packet
Even if no data to report
An example RTP compound packet
43Internet Telephony
RTCP Sender Report
SRHeader InfoSender InfoReceiver Report BlocksOption
Profile-specific extension
44Internet Telephony
Header Info
Resemble to an RTP packetVersion
2
Padding bitPadding octets?
RC, report countThe number of reception report blocks5-bit
If more than 31 reports, an RR is added
PT, payload type
45Internet Telephony
Sender Info
SSRC of senderNTP Timestamp
Network Time Protocol TimestampThe time elapsed in seconds since 00:00, 1/1/1900 (GMT)64-bit
32 MSB: the number of seconds32 LSB: the fraction of a seconds (200 ps)
RTP TimestampCorresponding to the NTP timestampThe same as used for RTP timestampsFor better synchronization
Sender’s packet countCumulative within a session
Sender’s octet countCumulative within a session
46Internet Telephony
RR blocks [1/2]
SSRC_nThe source identifier of the session participant to which the data in this RR block pertains.
Fraction lostFraction of packets lost since the last report issued by this participantBy examining the sequence numbers in the RTP header
Cumulative number of packets lostSince the beginning of the RTP session
Extended highest sequence number receivedThe sequence number of the last RTP packet received16 lsb, the last sequence number16 msb, the number of sequence number cycles
47Internet Telephony
RR blocks [2/2]
Interarrival jitterAn estimate of the variance in RTP packet arrival
Last SR Timestamp (LSR)The middle 32 bits of the NTP timestamp used in the last SR received from the source in questionUsed to check if the last SR has been received
Delay Since Last SR (DLSR)The duration in units of 1/65,536 seconds
48Internet Telephony
RTCP Receiver Report
RRIssued by a participant who receives RTP packets but does not send, or has not yet sentIs almost identical to an SR
PT = 201No sender information
49Internet Telephony
RTCP Source Description Packet
Provides identification and information regarding session participants
Must exist in every RTCP compound packet
HeaderV, P, SC, PT=202, Length
Zero or more chunks of informationAn SSRC or CSRC valueOne or more identifiers and pieces of information
A unique CNAMEEmail address, phone number, name
50Internet Telephony
RTCP BYE PacketIndicate one or more media sources are no longer active
Application-Defined RTCP PacketFor application-specific dataFor non-standardized application
51Internet Telephony
Calculating Round-Trip Time
Use SRs and RRsE.g.
Report A: A, T1 → B, T2Report B: B, T3 → A, T4RTT = T4-T3+T2-T1RTT = T4-(T3-T2)-T1Report B
LSR = T1DLSR = T3-T2
A B
T1
T4
T2
T3
52Internet Telephony
Calculation Jitter
The mean deviation of the difference in packet spacing at the receiver
Si = the RTP timestamp for packet iRi = the time of arrivalD(i,j) = (Rj-Sj) - (Ri- Si)
The Jitter is calculated continuouslyJ(i) = J(i-1) + (| D(i-1,i) | - J(i-1))/16
53Internet Telephony
Timing of RTCP Packets
RTCP provides useful feedbackRegarding the quality of an RTP sessionDelay, jitter, packet lossBe sent as often as possible
Consume the bandwidthShould be fixed at 5%
An algorithm, RFC 1889Senders are collectively allowed at least 25% of the control traffic bandwidth.The interval > 5 seconds0.5 – 1.5 times the calculated intervalA dynamic estimate the avg. RTCP packet size
54Internet Telephony
IP Multicast
An IP diagram sent to multiple hostsConferenceTo a single address associated with all listeners
Multicast groupsMulticast addressJoin a multicast group
Inform local routers
Routing protocolsSupport propagation of routing information for multicast addressesMinimize the number of datagrams sent