module12 tcpudp v2
DESCRIPTION
TRANSCRIPT
1
Transport Protocols
Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
2
Orientation
• We move one layer up and look at the transport layer.
ApplicationLayer
NetworkLayer
Link Layer
IP
ARPHardwareInterface
RARP
Media
ICMP IGMP
TransportLayer
TCP UDP
UserProcess
UserProcess
UserProcess
UserProcess
3
Orientation
• Transport layer protocols are end-to-end protocols • They are only implemented at the hosts
Application
Transport
Network
HOST
Data Link Data Link Data Link
Network
Application
Transport
Network
HOST
Data Link
4
Transport Protocols in the Internet
UDP - User Datagram ProtocolUDP - User Datagram Protocol• datagram oriented• unreliable, connectionless• simple• unicast and multicast• useful only for few applications,
e.g., multimedia applications• used a lot for services
– network management (SNMP), routing (RIP), naming (DNS), etc.
TCP - Transmission Control Protocol
• stream oriented• reliable, connection-oriented• complex• only unicast• used for most Internet
applications:– web (http), email (smtp), file
transfer (ftp), terminal (telnet), etc.
• The two major transport protocols of the Internet are
5
UDP Format
IP header UDP header UDP data
UDP message length Checksum
DATA
20 bytes 8 bytes
0 15 16 31
Source Port Number Destination Port Number
• Port numbers identify sending and receiving applications (processes). Maximum port number is 216-1= 65,535
• Message Length is at least 8 bytes (I.e., Data field can be empty) and at most 65,535
• Checksum is for header (of UDP and some of the IP header fields)
6
Format of TCP segments
IP header TCP header TCP data
Sequence number (32 bits)
DATA
20 bytes 20 bytes
0 15 16 31
Source Port Number Destination Port Number
Acknowledgement number (32 bits)
window sizeheaderlength
0 Flags
Options (if any)
TCP checksum urgent pointer
20 bytes
• TCP segments have a min. 20 byte header with ≥ 0 bytes of data.
7
Port Numbers
• UDP (and TCP) use port numbers to identify applications• A globally unique address for applications consists of
<IP address, type of protocol, port number>• 65,535 ports per protocol
IP
TCP UDP
UserProcess
Demultiplex
based on
Protocol field in IP
header
UserProcess
UserProcess
UserProcess
UserProcess
UserProcess
Demultiplex
based on
port number
8
UDP - User Datagram Protocol
• UDP is supports unreliable transmissions of datagrams• UDP merely extends the host-to-to-host delivery service of IP datagram to an application-
to-application service• The only thing that UDP adds to IP datagrams is multiplexing and demultiplexing (by
adding port numbers)
UDP
IP IPIP IP IP
UDP
Applications Applications
9
New Transport Protocols
• New Transport Protocols were added:– DCCP (2006): Datagram Congestion Control Protocol– SCTP (2000): Stream Control Transmission Protocol
ApplicationLayer
NetworkLayer
Link Layer
IP
ARPHardware Interface
RARP
Media
ICMP IGMP
TransportLayer
TCP UDP
User Process
User Process
User Process
User Process
DCCP SCTP
10
DCCP and SCTP
SCTP SCTP
“TCP for datagrams”
• connection-oriented (full duplex)
• more delivery options than TCP
• Message-oriented – preserves message boundaries
• Supports multiple flows (“streams” per connection)
• unreliable or reliable
• ordered or partially ordered
• congestion control
• support for multi-homing
• Used for signaling in telephone networks
DCCP
“UDP with congestion control”
“TCP without reliable byte stream”
• connection-oriented
• message-oriented
• unreliable
• unordered
• congestion control
• Intended for applications that transfer large volumes of data
• Provide more service than UDP, but less than TCP
11
SCTP Format
IP headerSCTP
headerSCTP data
Verification tag
20 bytes 12 bytes
0 15 16 31
Source Port Destination Port
Checksum
LengthType Flags
DataChunk 1
LengthType Flags
DataChunk N
...
• Many different chunk types– Data chunks– Control chunks
• Each chunk has a type-dependent header
12
DCCP Format
IP headerDCCP header
DCCP data
DATA
20 bytes12 or 16
bytes 0 15 16 31
Source Port Number Destination Port Number
Sequence number0 0
Options (if any)
type X
Data offset CCVal CsCov Checksum