1 / 27

Module 11: TCP/IP Transport and Application Layer

Module 11: TCP/IP Transport and Application Layer. James Chen ydjames@ydu.edu.tw. Outline. 11.1 TCP/IP Transport Layer Introduction to transport layer Flow control Session establishment, maintenance, and termination overview Three-way handshake Windowing Acknowledgment

hanley
Download Presentation

Module 11: TCP/IP Transport and Application Layer

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Module 11: TCP/IP Transport and Application Layer James Chen ydjames@ydu.edu.tw YuDa college of business

  2. Outline • 11.1 TCP/IP Transport Layer • Introduction to transport layer • Flow control • Session establishment, maintenance, and termination overview • Three-way handshake • Windowing • Acknowledgment • Transmission Control Protocol (TCP) • User Datagram Protocol (UDP) • TCP and UDP port numbers • 11.2 The Application Layer • Introduction to the TCP/IP application layer • DNS • FTP • HTTP • SMTP • SNMP • Telnet YuDa college of business

  3. 11.1 TCP/IP Transport Layer YuDa college of business

  4. Introduction to transport layer • It establishes a logical connection between the endpoints of the network. • It provides transport services from the source host to the destination host (end-to-end transport services). • Transport services segment and reassemble several upper-layer applications onto the same transport layer data stream. • Reliable transportation • Ensure that segments delivered will be acknowledged to the sender. • Provide for retransmission of any segments that are not acknowledge. • Put segments back into their correct sequence numbers at the destination. • Provide congestion avoidance and control. • Flow control • Sliding window YuDa college of business

  5. Flow control • Flow control avoids the problem of a transmitting host overflowing the buffers in the receiving host. • TCP provides the mechanism for flow control by allowing the sending and receiving host to communicate. • The two hosts then establish a data-transfer rate that is agreeable to both. YuDa college of business

  6. Session establishment, maintenance, and termination overview • Multiple applications can share the same transport connection. • segment-by-segment basis YuDa college of business

  7. Session establishment, maintenance, and termination overview (cont.) • Synchronization handshake requests • Synchronize connection parameters in the opposite direction. • An acknowledgment to inform the destination that both sides agree that a connection has been established. • After the connection has been established, data transfer begins. YuDa college of business

  8. Session establishment, maintenance, and termination overview (cont.) • Congestion occurs during data transfering • A high-speed computer might be capable of generating traffic faster than a network can transfer it. • If many computers simultaneously need to send datagrams to a single destination, that destination can experience congestion (no single source caused the problem). • When datagrams arrive too quickly for a host or gateway to process, they are temporarily stored in memory. • If the traffic continues, the host or gateway eventually exhausts its memory and must discard additional datagrams that arrive. • To prevent data to be lost • not ready > stop sign • ready > go sign • At the end of data transfer • The sending host sends a signal that indicates the end of the transmission. • The receiving host at the end of the data sequence acknowledges the end of transmission • The connection is terminated. YuDa college of business

  9. Three-way handshake • For a connection to be established or initialized, the two hosts must synchronize their Initial Sequence Numbers (ISNs). • Segments that carry the SYN bit are also called “SYNs". • The synchronization requires each side to send its own Initial Sequence Numbers (ISNs) and to receive a confirmation of exchange in an acknowledgment (ACK) from the other side. YuDa college of business

  10. Three-way handshake (cont.) • TCP uses a 3-way handshake to initiate a connection. The handshake serves two functions: • It ensures that both sides are ready to transmit data, and that both ends know that the other end is ready before transmission actually starts. • It allows both sides to pick the initial sequence number to use. • When opening a new connection, why not simply use an initial sequence number of 0? Because if connections are of short duration, exchanging only a small number of segments, we may reuse low sequence numbers too quickly. Thus, each side that wants to send data must be able to choose its initial sequence number. The 3-way handshake proceeds as follows: • TCP A picks an initial sequence number (A_SEQ) and sends a segment to B containing: SYN_FLAG=1, ACK_FLAG=0, and SEQ=A_SEQ. • When TCP B receives the SYN, it chooses its initial sequence number (B_SEQ) and sends a TCP segment to A containing: ACK=(A_SEQ+1), ACK_BIT=1, SEQ=B_SEQ, SYN_FLAG=1. YuDa college of business

  11. Three-way handshake (cont.) • When A receives B's response, it acknowledges B's choice of an initial sequence number by sending a dataless third segment containing: SYN_FLAG=0, ACK=(B_SEQ+1), ACK_BIT=1, SEQ=A_SEQ+1(data length = 0). • Data transfer may now begin. • Note: The sequence number used in SYN segments are actually part of the sequence number space. That is why the third segment that A sends contains SEQ=(A_SEQ+1). This is required so that we don't get confused by old SYNs that we have already seen. To insure that old segments are ignored, TCP ignores any segments that refer to a sequence number outside of its receive window. This includes segments with the SYN bit set. YuDa college of business

  12. Windowing • recipient acknowledge : the receipt of each packet before the next packet is sent. • If the sender must wait for an acknowledgment after sending each packet, throughput would be low. YuDa college of business

  13. Windowing (cont.) • Transmit more data • The number of data packets the sender is allowed to have outstanding without having received an acknowledgment is known as the window size, or window. • TCP uses expectational acknowledgments. • TCP window sizes are variable during the lifetime of a connection. • Each acknowledgement contains a window advertisement that indicates the number of bytes the receiver can accept. • TCP also maintains a congestion-control window. • This window is normally the same size as the window of the receiver. • This window is cut in half when a packet is lost, perhaps as a result of network congestion. YuDa college of business

  14. Windowing (cont.) • The sender sends three packets before expecting an ACK. • If the receiver can handle a window size of only two packets, the window drops packet three, specifies three as the next packet, and specifies a new window size of two. • The sender sends the next two packets, but still specifies a window size of three. • This means that the sender will still expect a three packet acknowledgement from the receiver. • The receiver replies by requesting packet five and again specifying a window size of two. YuDa college of business

  15. Acknowledgment • Positive acknowledgment with retransmission guarantees that a stream of data sent from one device is delivered through a data link to another device without duplication or data loss. • Positive acknowledgment • It requires a recipient to communicate with the source. • It send back an acknowledgment message when the data is received. • Retransmission • The sender keeps a record of each data packet (TCP segment), that it sends and expects an acknowledgment. • The sender also starts a timer when it sends a segment and will retransmit a segment if the timer expires before an acknowledgment arrives. • all segments / part of segments YuDa college of business

  16. Transmission Control Protocol (TCP) • Source port – Number of the calling port • Destination port – Number of the called port • Sequence number – Number used to ensure correct sequencing of the arriving data • Acknowledgment number – Next expected TCP octet • HLEN – Number of 32-bit words in the header • Reserved – Set to zero • Code bits – Control functions, such as setup and termination of a session • Window – Number of octets that the sender is willing to accept • Checksum – Calculated checksum of the header and data fields • Urgent pointer – Indicates the end of the urgent data • Option – One option currently defined, maximum TCP segment size • Data – Upper-layer protocol data • FTP / HTTP / SMTP / telnet YuDa college of business

  17. User Datagram Protocol (UDP) • Error processing and retransmission must be handled by higher layer protocols. • Source port – Number of the calling port • Destination port – Number of the called port • Length – Number of bytes including header and data • Checksum – Calculated checksum of the header and data fields • Data – Upper-layer protocol data • TFTP / SNMP / DHCP / DNS YuDa college of business

  18. TCP and UDP port numbers • Both TCP and UDP use port numbers to pass information to the upper layers. • socket = IP + port number • Port numbers are used to keep track of different conversations crossing the network at the same time. • Internet Assigned Numbers Authority (IANA). • Numbers below 1024 are considered well-known ports numbers. • Numbers above 1024 are dynamically assigned ports numbers. • Registered port numbers are those registered for vendor-specific applications. Most of these are above 1024. • End systems use port numbers to select the proper application. • The source host dynamically assigns originating source port numbers. YuDa college of business

  19. 11.2 The Application Layer YuDa college of business

  20. Introduction to the TCP/IP application layer YuDa college of business

  21. DNS • The Domain Name System (DNS) is a system used on the Internet for translating names of domains and their publicly advertised network nodes into IP addresses. • A domain name is a string of characters, number, or both. • There are more than 200 top-level domains on the Internet. • .us – United States • .uk – United Kingdom • .edu – educational sites • .com – commercial sites • .gov – government sites • .org – non-profit sites • .net – network service YuDa college of business

  22. FTP • FTP is a reliable, connection-oriented service that uses TCP to transfer files between systems. • FTP first establishes a control connection between the client and the server. • Then a second connection is established, which is a link between the computers through which the data is transferred. • Data transfer can occur in ASCII mode or in binary mode. • TFTP is a connectionless service that uses User Datagram Protocol (UDP). • TFTP is designed to be small and easy to implement. • It lacks most of the features of FTP. • It cannot list directories and currently has no provisions for user authentication. • TFTP is used on the router to transfer configuration files and Cisco IOS images and to transfer files between systems. YuDa college of business

  23. HTTP • Hypertext Transfer Protocol (HTTP) • client-server application • A Web browser presents data in multimedia formats on Web pages that use text, graphics, sound, and video. • Hyperlinks make the World Wide Web easy to navigate. • Uniform Resource Locator (URL) YuDa college of business

  24. SMTP • Simple Mail Transfer Protocol (SMTP) • The SMTP protocol transports email messages in ASCII format using TCP. • Collecting mail > POP3 and IMAP4 • Sending mail > SMTP YuDa college of business

  25. SNMP • Simple Network Management Protocol (SNMP) • Application layer protocol • UDP • Exchange management information between network devices. • Network management system (NMS) • It executes applications that monitor and control managed devices. • Managed device • network node • An SNMP agent reside in it. • It collects and stores management information for NMS. • routers, access servers, switches, bridges, hubs, computer hosts, printers. • Agents • software modules • It translates information into a form compatible with SNMP. YuDa college of business

  26. Telnet • Terminal emulation • Telnet operation uses none of the processing power from the transmitting computer. • It transmits the keystrokes to the remote host and sends the resulting screen output back to the local monitor. • A Telnet client is referred to as a local host. • A Telnet server uses special software called a daemon, is referred to as a remote host. YuDa college of business

  27. END YuDa college of business

More Related