Title: 3rd Edition: Chapter 3
1Chapter 3Transport Layer
These ppt slides are originally from the Kurose
and Rosss book. But some slides are deleted and
added for my own purpose, and some of them are
modified.
2Chapter 3 Transport Layer
- learn about transport layer protocols in the
Internet - UDP connectionless transport
- TCP connection-oriented transport
- TCP congestion control
- Our goals
- understand principles behind transport layer
services - multiplexing/demultiplexing
- reliable data transfer
- flow control
- congestion control
3TCP/IP Protocol Suite
SNMP
FTP
Telnet
SMTP
BGP
RIP
DNS
HTTP
UDP
TCP
IGMP
ICMP
OSPF
IP
RARP
ARP
4Chapter 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
5Transport 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
6Analogy
Busan
Seoul
Gilsoo
Bowon
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.
Application message Processes Host Transport-layer
protocol Network-layer protocol
Gilsoo and Bowon Kids Postal service Letter house
7Chapter 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
8Addressing Port Number
- The address of the application process running on
a host is called a port number.
9IP Address and Port Number
10The 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)
11Well-known port number used by TCP
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
12Well-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)
13Socket 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.
14Protocol Stack
Host
Host
Application processes
Application processes
AP
AP
AP
AP
AP
AP
Port number
Port number
TCP/UDP
TCP/UDP
Protocol number
Protocol number
IP
IP
Link/physical layers
Link/phisical layers
Data communication network
15Example(Web server)
16Reliable 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.
17Transport protocol FunctionsReliable 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
18Chapter 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
19UDP 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
20UDP 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!
32 bits
source port
dest port
Length, in bytes of UDP segment, including header
checksum
length
Application data (message)
UDP segment format
21UDP checksum
- Goal detect errors (e.g., flipped bits) in
transmitted segment
- Sender
- treat segment contents as sequence of 16-bit
integers - checksum addition (1s 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 .
22Internet 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
0 1 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 0 1 0 1 0 0 0 1 0 0 0 1 0 0 0 0
1 1
wraparound
sum
checksum