transport layer3-1 chapter 3 transport layer these ppt slides are originally from the kurose and...
TRANSCRIPT
Transport Layer 3-1
Chapter 3Transport Layer
These ppt slides are originally from theKurose and Ross’s book. But some slides aredeleted and added for my own purpose, and some of them are modified.
Transport Layer 3-2
Chapter 3: Transport LayerOur goals: understand
principles behind transport layer services: multiplexing/
demultiplexing reliable data
transfer flow control congestion control
learn about transport layer protocols in the Internet: UDP: connectionless
transport TCP: connection-oriented
transport TCP congestion control
Transport Layer 3-3
TCP/IP Protocol Suite
IP
TCP UDP
FTP Telnet SMTP BGP RIP DNS SNMP
RARPARP
IGMPICMP OSPF
HTTP
Transport Layer 3-4
Chapter 3 outline
3.1 Transport-layer services
3.2 Multiplexing and demultiplexing
3.3 Connectionless transport: UDP
3.4 Principles of reliable data transfer
3.5 Connection-oriented transport: TCP segment structure reliable data transfer flow control connection
management
3.6 Principles of congestion control
3.7 TCP congestion control
Transport Layer 3-5
Transport services and protocols provide logical
communication between app processes running on different hosts
transport protocols run in end systems send side: breaks
app messages into segments, passes to network layer
rcv side: reassembles segments into messages, passes to app layer
application
transportnetworkdata linkphysical
application
transportnetworkdata linkphysical
networkdata linkphysical
networkdata linkphysical
networkdata linkphysical
networkdata linkphysicalnetwork
data linkphysical
logical end-end transport
Transport Layer 3-6
AnalogySeoul Busan
Consider two houses, one in Seoul and the other in Busan, Four kids live in each house. Each kid write a letter to its cousin who lives in the other house every Sunday. In each house there is one kid(Gilsoo and Bowen)who is responsible for mail collection and mail distribution.
Gilsoo Bowon
Application messageProcessesHostTransport-layer protocolNetwork-layer protocol
Gilsoo and BowonKidsPostal serviceLetterhouse
Transport Layer 3-7
Chapter 3 outline
3.1 Transport-layer services
3.2 Multiplexing and demultiplexing(Addressing of application processes)
3.3 Connectionless transport: UDP
3.4 Principles of reliable data transfer
3.5 Connection-oriented transport: TCP segment structure reliable data transfer flow control connection
management
3.6 Principles of congestion control
3.7 TCP congestion control
Transport Layer 3-8
Addressing: Port Number
The address of the application process running on a host is called a port number.
Transport Layer 3-10
The Range of Port Numbers
The port number is 16-bit integers between 0 and 65535. The ephemeral port numbers
The client process defines itself with a port number randomly. The well-known port numbers
The Internet has decided to use universal port numbers for servers.
(ephemeral)
Transport Layer 3-11
Port Protocol Description
7 Echo Echoes a received datagram back to the sender
9 Discard Discards any datagram that is received
11 Users Active users
13 Daytime Returns the date and the time
17 Quote Returns a quote of the day
19 Chargen Returns a string of characters
20 FTP, Data File Transfer Protocol (data connection)
21 FTP, Control File Transfer Protocol (control connection)
23 TELNET Terminal Network
25 SMTP Simple Mail Transfer Protocol
53 DNS Domain Name Server
67 BOOTP Bootstrap Protocol
79 Finger Finger
80 HTTP Hypertext Transfer Protocol
111 RPC Remote Procedure Call
Well-known port number used by TCP
Transport Layer 3-12
Well-known port number used by UDP
Port Protocol Description
7 Echo Echoes a received datagram back to the sender
9 Discard Discards any datagram that is received
11 Users Active users
13 Daytime Returns the date and the time
17 Quote Returns a quote of the day
19 Chargen Returns a string of characters
53 Nameserver Domain Name Service
67 Bootps Server port to download bootstrap information
68 Bootpc Client port to download bootstrap information
69 TFTP Trivial File Transfer Protocol
111 RPC Remote Procedure Call
123 NTP Network Time Protocol
161 SNMP Simple Network Management Protocol
162 SNMP Simple Network Management Protocol (trap)
Transport Layer 3-13
Socket Address
Process-to-process delivery needs two identifiers, IP address and the port number, at each end to make a connection.
The combination of an IP address and a port number is called a socket address, which defines the destination process uniquely.
Transport Layer 3-14
Protocol Stack
AP
Application processes
IPLink/physical
layers
Data communication network
Host
Port number
Protocol number
TCP/UDP
IPLink/phisical
layers
Host
Port number
Protocol number
TCP/UDP
AP AP AP
Application processes
AP AP
Transport Layer 3-16
Reliable vs. Unreliable Service If the application-layer program needs reliability, we use a
reliable transport protocol. If the application has its own flow and error control
mechanism or it needs faster service or the kind of a service that does not demand flow and error control(ex, real-time application), then unreliable transport can be used.
networkaccess 1
IP
TCP/UDP
Application
networkAccess 2
IP
TCP/UDP
Application
network networkaccess1 access2
IP
subnet 1
End-to-end Service
subnet 2
Transport Layer 3-17
Transport protocol Functions:Reliable vs. Unreliable Unreliable Transport protocol functions
Addressing for application processes(multiplexing)
Reliable Transport Protocol functions Address for application processes Error control (retransmission) Flow control Guarantee of no out-of-sequence of packet order No duplication
Transport Layer 3-18
Chapter 3 outline
3.1 Transport-layer services
3.2 Multiplexing and demultiplexing
3.3 Connectionless transport: UDP
3.4 Principles of reliable data transfer
3.5 Connection-oriented transport: TCP segment structure reliable data transfer flow control connection
management
3.6 Principles of congestion control
3.7 TCP congestion control
Transport Layer 3-19
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
Transport Layer 3-20
UDP: more
often used for streaming multimedia apps loss tolerant rate sensitive
other UDP uses DNS SNMP
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
Transport Layer 3-21
UDP checksum
Sender: treat segment contents
as sequence of 16-bit integers
checksum: addition (1’s complement sum) of segment contents
sender puts checksum value into UDP checksum field
Receiver: compute checksum of
received segment check if computed checksum
equals checksum field value: NO - error detected YES - no error detected.
But maybe errors nonetheless? More later ….
Goal: detect “errors” (e.g., flipped bits) in transmitted segment
Transport Layer 3-22
Internet Checksum Example Note
When adding numbers, a carryout from the most significant bit needs to be added to the result
Example: add two 16-bit integers
1 1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 01 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1
1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 01 0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 1
wraparound
sumchecksum