Download presentation
1
Guide to TCP/IP Fourth Edition
Chapter 9: TCP/IP Transport Layer Protocols
2
Objectives Explain the key features and functions of the User Datagram Protocol and the Transmission Control Protocol Explain, in detail, the header fields and functions of the UDP packet, as well as port numbers, processes, and how UDP behaves when used as a transport protocol by IPv6 Explain in detail, the mechanisms that drive segmentation, reassembly, and retransmission for TCP as well as how TCP behaves when used as a transport protocol by IPv6 © 2013 Course Technology/Cengage Learning. All Rights Reserved.
3
Objectives (cont’d.) Describe how UDP and TCP pseudo-headers are organized with the IPv6 header and extension headers Explain the differences between connectionless and connection-oriented transport mechanisms Choose between using User Datagram Protocol and Transmission Control Protocol © 2013 Course Technology/Cengage Learning. All Rights Reserved.
4
Understanding UDP and TCP
UDP and TCP actually function as peers IP operates at the Network layer of the OSI model Responsible for transferring variable length data sequences from a source host to a destination host TCP guarantees acknowledged delivery At the cost of both time and bandwidth UDP is used for applications that do not need verified delivery Gain in speed and a reduced use of network bandwidth © 2013 Course Technology/Cengage Learning. All Rights Reserved.
5
UDP with IPv4 and IPv6 Connectionless protocols UDP
Provide the simplest kind of transport services UDP Used by applications that contain their own connection oriented timeout values and retry counters Runs up to 40 percent faster than TCP © 2013 Course Technology/Cengage Learning. All Rights Reserved.
6
UDP with IPv4 and IPv6 (cont’d.)
Connectionless protocols handle the following kinds of tasks Message checksum Higher-layer protocol identification © 2013 Course Technology/Cengage Learning. All Rights Reserved.
7
TCP with IPv4 and IPv6 TCP (connection-oriented protocol)
Used by applications that rely on data reaching its destination TCP offers connection-oriented services with: Sequencing, error recovery, and a sliding window mechanism TCP hosts create a virtual connection with each other using a handshake process TCP transfers data as a continuous stream of bytes © 2013 Course Technology/Cengage Learning. All Rights Reserved.
8
TCP with IPv4 and IPv6 (cont’d.)
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
9
User Datagram Protocol
UDP limitations No reliability mechanisms No delivery guarantees No connection handling Identifies the Application layer protocol Checksum for entire message carried in UDP header No buffering services No segmentation © 2013 Course Technology/Cengage Learning. All Rights Reserved.
10
UDP Header Fields and Functions
UDP header’s main function To define the process or application that is using the IP and UDP Network and Transport layers UDP header fields Source Port Number field Destination Port Number field Length field Checksum field © 2013 Course Technology/Cengage Learning. All Rights Reserved.
11
UDP Header Fields and Functions (cont’d.)
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
12
UDP Header Fields and Functions (cont’d.)
Source Port Number field Defines the application or process that sends the packet using the UDP header Well-known port numbers (0 Through 1023) Assigned to core services that systems offer Registered port numbers (1024 Through 49151) Assigned to industry applications and processes Dynamic ports Used as temporary ports for specific communications while they are underway © 2013 Course Technology/Cengage Learning. All Rights Reserved.
13
UDP Header Fields and Functions (cont’d.)
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
14
UDP Header Fields and Functions (cont’d.)
Destination Port Number Field Defines destination application or process that uses the IP and UDP headers Length field Defines the length of the packet from the UDP header to the end of valid data Checksum field is optional © 2013 Course Technology/Cengage Learning. All Rights Reserved.
15
UDP Port Numbers and Processes
UDP and TCP Use port numbers to define the source and destination processes or applications By default Windows Vista, Windows 7, and Windows Server 2008 support a port range of to 65535 © 2013 Course Technology/Cengage Learning. All Rights Reserved.
16
UDP Port Numbers and Processes (cont’d.)
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
17
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
18
UDP and IPv6 © 2013 Course Technology/Cengage Learning. All Rights Reserved.
19
Transmission Control Protocol
Responsible for providing ordered delivery of a stream of bytes From an application on one network node to an application on another network node Communications between two computers that are being established through TCP Use a three-way handshake procedure © 2013 Course Technology/Cengage Learning. All Rights Reserved.
20
TCP and IPv4 Primary functions and features of TCP communications:
Start-up connection process (TCP handshake) Keep-alive process Connection termination Sequence and acknowledgment process Error-detection and error-recovery processes Congestion control Sliding window Header fields and functions © 2013 Course Technology/Cengage Learning. All Rights Reserved.
21
TCP Startup Connection Process
Begins with handshake between two hosts One host initiates the handshake to another host to: Ensure the destination host is available Ensure the destination host is listening on the destination port number Inform destination host of initiator’s sequence number © 2013 Course Technology/Cengage Learning. All Rights Reserved.
22
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
23
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
24
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
25
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
26
TCP Startup Connection Process (cont’d.)
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
27
TCP Half-Open Connections
Occur when the handshake process does not end successfully with a final ACK Half-open connection communication sequence occurs in the following order SYN >>>>> <<<<< ACK SYN © 2013 Course Technology/Cengage Learning. All Rights Reserved.
28
TCP Keep-Alive Process
Can maintain connection when there is no data sent across the wire TCP keep-alives Disabled by default on Windows XP, Windows Vista, Windows 7, Windows Server 2003, and Windows Server 2008 KeepAliveTime setting Defines how long to wait before sending the first TCP keep-alive packet © 2013 Course Technology/Cengage Learning. All Rights Reserved.
29
TCP Keep-Alive Process (cont’d.)
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
30
TCP Connection Termination
Requires four packets Host 1 Sends a TCP packet with the FIN and ACK flags set Host 2 Sends an ACK in response Then sends a TCP packet with FIN and ACK flags set Returns ACK response © 2013 Course Technology/Cengage Learning. All Rights Reserved.
31
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
32
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
33
TCP Sequence and Acknowledgment Process
Guarantees that packets are ordered properly and protects against missing segments During handshake process Each side of connection selects its own starting sequence number Each side increments its sequence number value by the amount of data included in the outbound packet © 2013 Course Technology/Cengage Learning. All Rights Reserved.
34
TCP Sequence and Acknowledgment Process (cont’d.)
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
35
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
36
TCP Error-Detection and Error-Recovery Process
Retransmission timer First error-detection and error-recovery mechanism Retransmission timeout (RTO) Value specified by timer Retransmission operation increments 1st retransmit: RTO seconds 2nd retransmit: 2 x RTO seconds 3rd retransmit: 4 x RTO seconds 4th retransmit: 8 x RTO seconds 5th retransmit: 16 x RTO seconds © 2013 Course Technology/Cengage Learning. All Rights Reserved.
37
TCP Congestion Control
The overloading of the network or a receiver Overloading of the network Occurs when there is too much data on the network medium Overloading a receiver Occurs when the number of data bytes is greater than the advertised window Current window Always the lesser of what the network and receiver can handle © 2013 Course Technology/Cengage Learning. All Rights Reserved.
38
TCP Congestion Control (cont’d.)
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
39
TCP Congestion Control (cont’d.)
TCP has four defined congestion control mechanisms Slow Start Congestion Avoidance Fast Retransmit Fast Recovery © 2013 Course Technology/Cengage Learning. All Rights Reserved.
40
TCP Congestion Control (cont’d.)
Table 9-11 GlobalMaxTcpWindowSize Registry setting © 2013 Course Technology/Cengage Learning. All Rights Reserved.
41
TCP Congestion Control (cont’d.)
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
42
TCP Sliding Window Used to determine the amount of unacknowledged data that can go out on the wire from any sender Nagle algorithm When small data segments are being sent, but not acknowledged, no other small segments can be sent Silly Window Syndrome (SWS) Caused when enough data is sent to a TCP host to fill its receiver buffer Puts receiver in a zero-window state © 2013 Course Technology/Cengage Learning. All Rights Reserved.
43
TCP Header Fields and Functions
Source Port Number Field Destination Port Number Field Sequence Number Field Acknowledgment Number Field Header Length Field © 2013 Course Technology/Cengage Learning. All Rights Reserved.
44
TCP Header Fields and Functions (cont’d.)
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
45
Table 9-13 TCP flag settings
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
46
TCP Header Fields and Functions (cont’d.)
Window Size Field TCP Checksum Field Urgent Pointer Field TCP Options Field(s) © 2013 Course Technology/Cengage Learning. All Rights Reserved.
47
TCP Header Fields and Functions (cont’d.)
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
48
TCP Header Fields and Functions (cont’d.)
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
49
TCP and IPv6 © 2013 Course Technology/Cengage Learning. All Rights Reserved.
50
UDP, TCP, and IPv6 Extension Headers
IPv6 headers put all optional data in extension headers Extension header Contains optional Internet-layer data that is stored in separate headers IPv6 header and each extension header, if present, contain a Next Header field © 2013 Course Technology/Cengage Learning. All Rights Reserved.
51
UDP, TCP, and IPv6 Extension Headers (cont’d.)
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
52
© 2013 Course Technology/Cengage Learning. All Rights Reserved.
53
Choosing Between TCP and UDP
Because TCP is robust and reliable, it carries a lot of baggage, including: Additional header fields Explicit meta-messages in the form of TCP messages For some lightweight services, such as Microsoft Messenger Service TCP is overkill and UDP is used instead TCP is no longer as important as it once was Long-haul and local area networks have significantly increased speed, capacity, and reliability © 2013 Course Technology/Cengage Learning. All Rights Reserved.
54
Summary Transport layer protocols come in two types
Connectionless and connection-oriented User Datagram Protocol The connectionless protocol associated with TCP/IP protocol suite UDP header is short and simple, consisting of: A protocol identifier in the IP header An optional checksum value Source and destination port addresses © 2013 Course Technology/Cengage Learning. All Rights Reserved.
55
Summary (cont'd.) Transmission Control Protocol TCP header
Heavyweight, connection-oriented protocol that helps name the TCP/IP protocol suite TCP header Longer and more complex, Includes a variety of flags, values, and message types © 2013 Course Technology/Cengage Learning. All Rights Reserved.
56
Summary (cont'd.) Appropriate (and historical) uses for UDP
Concentrate on Application layer services that manage their own reliability and connections Appropriate (and historical) uses for TCP Concentrate on providing reliable delivery of user services Although there are no updated versions for TCP and UDP that correspond to IPv6 The functions of these transport protocols are treated differently when used by IPv4 or IPv6 © 2013 Course Technology/Cengage Learning. All Rights Reserved.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.