ip-udp-rtp

18
1 IP-UDP-RTP 건건건건건 건건건건건건건건건 건 건 건 Computer Networking (In Chap 3, 4, 7)

Upload: ivrit

Post on 06-Jan-2016

20 views

Category:

Documents


0 download

DESCRIPTION

IP-UDP-RTP. Computer Networking (In Chap 3, 4, 7). 건국대학교 인터넷미디어공학부 임 창 훈. IP-UDP-RTP Packet. IP header. UDP header. RTP header. Application message. RTP packet. UDP packet (segment). IP packet (datagram). transport segment from sending to receiving host - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: IP-UDP-RTP

1

IP-UDP-RTP

건국대학교 인터넷미디어공학부임 창 훈

Computer Networking(In Chap 3, 4, 7)

Page 2: IP-UDP-RTP

2

IP-UDP-RTP Packet

IPheader

UDPheader

RTPheader

Application message

RTP packet

UDP packet (segment)

IP packet (datagram)

Page 3: IP-UDP-RTP

3

Network layer transport segment

from sending to receiving host

on sending side encapsulates segments into datagrams

on receiving side, delivers segments to transport layer

network layer protocols in every host, router

Router examines header fields in all IP datagrams passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Page 4: IP-UDP-RTP

4

Key Network-Layer Functions

forwarding: move packets from router’s input to appropriate router output

routing: determine route taken by packets from source to destination

Routing algorithms

analogy:

routing: process of planning trip from source to destination

forwarding: process of getting through single interchange

Page 5: IP-UDP-RTP

5

1

23

0111

value in arrivingpacket’s header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Page 6: IP-UDP-RTP

6

Datagram networks no call setup at network layer routers: no state about end-to-end connections

no network-level concept of “connection” packets forwarded using destination host

address packets between same source-dest pair may take

different paths

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1. Send data 2. Receive data

Page 7: IP-UDP-RTP

7

Forwarding table

Destination Address Range Link Interface

11001000 00010111 00010000 00000000 through 0 11001000 00010111 00010111 11111111

11001000 00010111 00011000 00000000 through 1 11001000 00010111 00011000 11111111

11001000 00010111 00011001 00000000 through 2 11001000 00010111 00011111 11111111

otherwise 3

4 billion possible entries

Page 8: IP-UDP-RTP

8

Longest prefix matching

Prefix Match Link Interface 11001000 00010111 00010 0 11001000 00010111 00011000 1 11001000 00010111 00011 2 otherwise 3

DA: 11001000 00010111 00011000 10101010

Examples

DA: 11001000 00010111 00010110 10100001 Which interface?

Which interface?

Page 9: IP-UDP-RTP

9

IP datagram format

ver length

32 bits

data (variable length,typically a TCP

or UDP segment)

16-bit identifier

Internet checksum

time tolive

32 bit source IP address

IP protocol versionnumber

header length (bytes)

max numberremaining hops

(decremented at each router)

forfragmentation/reassembly

total datagramlength (bytes)

upper layer protocolto deliver payload to

head.len

type ofservice

“type” of data flgsfragment

offsetupper layer

32 bit destination IP address

Options (if any) E.g. timestamp,record routetaken, specifylist of routers to visit.

how much overhead with TCP?

20 bytes of TCP 20 bytes of IP = 40 bytes +

app layer overhead

Page 10: IP-UDP-RTP

10

IP addressing: CIDR

CIDR: Classless InterDomain Routing subnet portion of address of arbitrary length address format: a.b.c.d/x, where x is # bits in

subnet portion of address

11001000 00010111 00010000 00000000

subnetpart

hostpart

200.23.16.0/23

Page 11: IP-UDP-RTP

11

Transport services and protocols provide logical

communication between app processes running on different hosts

transport protocols run in end systems send side: breaks

application messages into segments, passes to network layer

receive side: reassembles segments into messages, passes to application layer

more than one transport protocol available to apps Internet: TCP and UDP

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysicalnetwork

data linkphysical

logical end-end transport

Page 12: IP-UDP-RTP

12

Transport vs. network layer

network layer: logical communication between hosts

transport layer: logical communication between processes relies on, enhances, network layer services

Page 13: IP-UDP-RTP

13

Internet transport-layer protocols reliable, in-order

delivery (TCP) congestion control flow control connection setup

unreliable, unordered delivery: UDP no-frills extension of

“best-effort” IP services not available:

delay guarantees bandwidth guarantees

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysicalnetwork

data linkphysical

logical end-end transport

Page 14: IP-UDP-RTP

14

Multiplexing/demultiplexing

application

transport

network

link

physical

P1 application

transport

network

link

physical

application

transport

network

link

physical

P2P3 P4P1

host 1 host 2 host 3

= process= socket

delivering received segmentsto correct socket

Demultiplexing at rcv host:gathering data from multiplesockets, enveloping data with header (later used for demultiplexing)

Multiplexing at send host:

Page 15: IP-UDP-RTP

15

How demultiplexing works host receives IP datagrams

each datagram has source IP address, destination IP address

each datagram carries 1 transport-layer segment

each segment has source, destination port number

host uses IP addresses & port numbers to direct segment to appropriate socket

source port # dest port #

32 bits

applicationdata

(message)

other header fields

TCP/UDP segment format

Page 16: IP-UDP-RTP

16

UDP: User Datagram Protocol [RFC 768]

“no frills,” “bare bones” Internet transport protocol

“best effort” service, UDP segments may be: lost delivered out of order

to app connectionless:

no handshaking between UDP sender, receiver

each UDP segment handled independently of others

Why is there a UDP? no connection

establishment (which can add delay)

simple: no connection state at sender, receiver

small segment header no congestion control:

UDP can blast away as fast as desired

Page 17: IP-UDP-RTP

17

UDP: more

often used for streaming multimedia apps loss tolerant rate sensitive

reliable transfer over UDP: add reliability at application layer application-

specific error recovery!

source port # dest port #

32 bits

Applicationdata

(message)

UDP segment format

length checksumLength, in

bytes of UDPsegment,including

header

Page 18: IP-UDP-RTP

18

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