Bài giảng môn Mạng máy tính - Chapter 4: Osi transport layer

Retransmission for lost data employed by TCP. • If the ACK is not received within a timeout interval, the data is retransmitted.

pdf74 trang | Chia sẻ: nguyenlam99 | Lượt xem: 777 | Lượt tải: 1download
Bạn đang xem trước 20 trang tài liệu Bài giảng môn Mạng máy tính - Chapter 4: Osi transport layer, để xem tài liệu hoàn chỉnh bạn click vào nút DOWNLOAD ở trên
Chapter 4 OSI Transport Layer CCNA Exploration version 4.0 Học viện mạng Bách Khoa - Website: www.bkacad.com 2 Objectives • Explain the role of Transport Layer protocols and services in supporting communications across data networks • Analyze the application and operation of TCP mechanisms that support reliability • Analyze the application and operation of TCP mechanisms that support reassembly and manage data loss. • Analyze the operation of UDP to support communicate between two processes on end devices Học viện mạng Bách Khoa - Website: www.bkacad.com 3 Application data Application data IP Protocol Field = 17 IP Protocol Field = 6 Học viện mạng Bách Khoa - Website: www.bkacad.com 4 Connectionless Connection- oriented Connectionless Extra: Logical Connection Học viện mạng Bách Khoa - Website: www.bkacad.com 5 Extra: TCP Operation • IP is best effort delivery. • The transport layer (TCP) is responsible reliability and flow control from source to destination.This is accomplished using: – sliding windows (flow control) – sequencing numbers and acknowledgments (reliability) – synchronization (establish a virtual circuit) Học viện mạng Bách Khoa - Website: www.bkacad.com 6 Roles of Transport Layer Học viện mạng Bách Khoa - Website: www.bkacad.com 7 Transport Layer Role and Services 1.Enables multiple applications to communicate over the network at the same time on a single device 2.Ensures that, if required, all the data is received reliably and in order by the correct application 3.Employs error handling mechanisms • The functions Học viện mạng Bách Khoa - Website: www.bkacad.com 8 Transport Layer Role and Services • Primary responsibilities 1.Tracking the individual communication between applications on the source and destination hosts 2.Segmenting data and managing each piece 3.Reassembling the segments into streams of application data 4. Identifying the different applications 4.1.1 Học viện mạng Bách Khoa - Website: www.bkacad.com 9 Transport Layer Role and Services Học viện mạng Bách Khoa - Website: www.bkacad.com 10 Separating Multiple Communications 4.1.2 Học viện mạng Bách Khoa - Website: www.bkacad.com 11 Extra: Multiplexing • Different applications can send data segments on a first-come, first-served basis. • The segments that arrive first will be taken care of first. This is referred to as the multiplexing of upper-layer conversations. Học viện mạng Bách Khoa - Website: www.bkacad.com 12 Segmentation Q/A •Conversation vs Session ? Học viện mạng Bách Khoa - Website: www.bkacad.com 13 Học viện mạng Bách Khoa - Website: www.bkacad.com 14 Controlling the Conversation 4.1.2.1 Học viện mạng Bách Khoa - Website: www.bkacad.com 15 Controlling the Conversation Other functions: • Connection-oriented conversations • Reliable delivery • Ordered data reconstruction • Flow control The primary functions 1. Segmentation and Reassembly 2. Conversation Multiplexing Học viện mạng Bách Khoa - Website: www.bkacad.com 16 Controlling the Conversation 4.1.2.2 Học viện mạng Bách Khoa - Website: www.bkacad.com 17 Transport Layer Role and Services 4.1.3 Học viện mạng Bách Khoa - Website: www.bkacad.com 18 Transport Layer Role and Services 1.Tracking transmitted data 2.Acknowledging received data 3.Retransmitting any unacknowledged data 4.1.3 At the Transport layer the 3 basic operations of reliability are: Học viện mạng Bách Khoa - Website: www.bkacad.com 19 TCP and UDP Web, email, file transfer DNS, Video streaming, VoIP 4.1.4 Học viện mạng Bách Khoa - Website: www.bkacad.com 20 TCP Header format: Học viện mạng Bách Khoa - Website: www.bkacad.com 21 TCP Header format: Port number • Source Port 16 bits. • Destination Port 16 bits. Học viện mạng Bách Khoa - Website: www.bkacad.com 22 TCP Header format: Sequence • Sequence Number: 32 bits – The sequence number of the first data octet in this segment (except when SYN is present). Học viện mạng Bách Khoa - Website: www.bkacad.com 23 TCP Header format: Acknowledgment • Acknowledgment Number: 32 bits – This field contains the value of the next sequence number the sender of the segment is expecting to receive. Học viện mạng Bách Khoa - Website: www.bkacad.com 24 TCP Header format: Code bits Control Bits: 8 bits URG: Urgent pointer field is valid ACK: Acknowledgment field significant PSH: This segment requests a push RST: Reset the connection SYN: Synchronize sequence numbers FIN: No more data from sender Học viện mạng Bách Khoa - Website: www.bkacad.com 25 Example: code bits Học viện mạng Bách Khoa - Website: www.bkacad.com 26 TCP Header format: Window • Window: 16 bits – The number of data octets beginning with the one indicated in the acknowledgment field which the sender of this segment is willing to accept. Học viện mạng Bách Khoa - Website: www.bkacad.com 27 TCP Header format: Window Urgent Pointer: 16 bits Points to the first data octet following the urgent data. Only significant when the URG control bit is set. TCP Header format: Data Học viện mạng Bách Khoa - Website: www.bkacad.com 28 Học viện mạng Bách Khoa - Website: www.bkacad.com 29 User Datagram Protocol (UDP) • Error processing and retransmission must be handled by higher layer protocols Học viện mạng Bách Khoa - Website: www.bkacad.com 30 UDP header fields • 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 • The protocols that use UDP include: - TFTP (Trivial File Transfer Protocol) - SNMP (Simple Network Management Protocol) - DHCP (Dynamic Host Control Protocol) - DNS (Domain Name System) Học viện mạng Bách Khoa - Website: www.bkacad.com 31 Port Addressing 4.1.5 Q/A •Source Port ? •Socket ? Học viện mạng Bách Khoa - Website: www.bkacad.com 32 4.1.5 Học viện mạng Bách Khoa - Website: www.bkacad.com 33 Port and TCP port • Reserved for services and applications. They are commonly used for applications such as HTTP (web server) POP3/SMTP (e-mail server) and Telnet • These port numbers are assigned to user processes or applications. When not used for a server resource, these ports may also be used dynamically selected by a client as its source port. • These are usually assigned dynamically to client applications when initiating a connection. It is not very common for a client to connect to a service using a Dynamic or Private Port Học viện mạng Bách Khoa - Website: www.bkacad.com 34 UDP port Học viện mạng Bách Khoa - Website: www.bkacad.com 35 TCP and UDP Common Port Học viện mạng Bách Khoa - Website: www.bkacad.com 36 TCP and UDP port numbers Học viện mạng Bách Khoa - Website: www.bkacad.com 37 Extra: Sockets • The socket interface is one of several application programming interfaces (APIs) to the communication protocols. • A socket is a special type of file handle, which is used by a process to request network services from the operating system. • A socket address is the triple: For example, in the TCP/IP suite: Học viện mạng Bách Khoa - Website: www.bkacad.com 38 Netstat command 4.1.5.3 Học viện mạng Bách Khoa - Website: www.bkacad.com 39 Segmentation and Reassembly. 4.1.6.1 Q/A • What is benefit of segmentation ? • Dividing application data into pieces both ensures that – data is transmitted within the limits of the media – and that data from different applications can be multiplexed on to the media. Học viện mạng Bách Khoa - Website: www.bkacad.com 40 Lab 4.1.6.2 Học viện mạng Bách Khoa - Website: www.bkacad.com 41 Học viện mạng Bách Khoa - Website: www.bkacad.com 42 The TCP Protocol – Communicating with Reliability Học viện mạng Bách Khoa - Website: www.bkacad.com 43 TCP – Making Conversations Reliable • The key distinction between TCP and UDP is reliability. 4.2.1 Học viện mạng Bách Khoa - Website: www.bkacad.com 44 TCP Server Processes • Each application process running on the server is configured to use a port number: default or manually ports. • An individual server cannot have two services assigned to the same port number within the same Transport layer services 4.2.2 TCP Connection Establishment and Termination Học viện mạng Bách Khoa - Website: www.bkacad.com 45 4.2.3 Học viện mạng Bách Khoa - Website: www.bkacad.com 46 3-way handshake 4.2.4 Học viện mạng Bách Khoa - Website: www.bkacad.com 47 3-way handshake Học viện mạng Bách Khoa - Website: www.bkacad.com 48 3-way handshake Học viện mạng Bách Khoa - Website: www.bkacad.com 49 TCP Session Termination 4.2.5 Học viện mạng Bách Khoa - Website: www.bkacad.com 50 TCP Session Termination 4.2.5 Học viện mạng Bách Khoa - Website: www.bkacad.com 51 TCP Session Termination Lab 4.2.5.2 Học viện mạng Bách Khoa - Website: www.bkacad.com 52 Học viện mạng Bách Khoa - Website: www.bkacad.com 53 Managing TCP Sessions Học viện mạng Bách Khoa - Website: www.bkacad.com 54 TCP Segment Reassembly 4.3.1 Học viện mạng Bách Khoa - Website: www.bkacad.com 55 TCP Acknowledgement with Windowing Expectational Acknowledgement ? 4.3.2 Học viện mạng Bách Khoa - Website: www.bkacad.com 56 TCP Retransmission • Retransmission for lost data employed by TCP. • If the ACK is not received within a timeout interval, the data is retransmitted. 4.3.3 Học viện mạng Bách Khoa - Website: www.bkacad.com 57 TCP Congestion Control – Minimizing Segment Loss Flow Control ? 4.3.4.1 • Flow control Học viện mạng Bách Khoa - Website: www.bkacad.com 58 TCP Congestion Control – Minimizing Segment Loss • Reducing window size 4.3.4.2 Học viện mạng Bách Khoa - Website: www.bkacad.com 59 Extra: Flow Control • Flow control avoids the problem of a transmitting host overflowing the buffers in the receiving host. Học viện mạng Bách Khoa - Website: www.bkacad.com 60 Extra: Flow Control Học viện mạng Bách Khoa - Website: www.bkacad.com 61 Windowing and Acknowledgment • The purpose of windowing is to improve flow control and reliability. Học viện mạng Bách Khoa - Website: www.bkacad.com 62 Simple Windowing • Stop-and-Wait windowing protocol. Học viện mạng Bách Khoa - Website: www.bkacad.com 63 Sliding Windows Octets sent Not ACKed Usable Window Can send ASAP Working Window size Usable Window Can send ASAP Initial Window size ASAP=As Soon As Possible Học viện mạng Bách Khoa - Website: www.bkacad.com 64 1 2 3 4 5 6 7 8 9 10 11 12 13 1 2 3 4 5 6 7 8 9 10 11 12 13 1 2 3 4 5 6 7 8 9 10 11 12 13 1 2 3 4 5 6 7 8 9 10 11 12 13 1 2 3 4 5 6 7 8 9 10 11 12 13 1 2 3 ACK 4 4 5 1 2 3 4 5 6 7 8 9 10 11 12 13 1 2 3 4 5 6 7 8 9 10 11 12 13 ACK 6 Host B - ReceiverHost A - Sender Octets sent Not ACKed Usable Window Can send ASAP Window size = 6 1 2 3 4 5 6 7 8 9 10 11 12 13 7 6 9 8 1 2 3 4 5 6 7 8 9 10 11 12 13 1 2 3 4 5 6 7 8 9 10 11 12 13 1 2 3 4 5 6 7 8 9 10 11 12 13 1 2 3 4 5 6 7 8 9 10 11 12 13 Học viện mạng Bách Khoa - Website: www.bkacad.com 65 The UDP Protocol – Communicating with Low overhead Học viện mạng Bách Khoa - Website: www.bkacad.com 66 UDP – Low overhead vs. Reliability 4.4.1 Học viện mạng Bách Khoa - Website: www.bkacad.com 67 UDP Datagram Reassembly • UDP simply reassembles the data in the order that it was received and forwards it to the application. Học viện mạng Bách Khoa - Website: www.bkacad.com 68 UDP Server Processes and Requests • Like TCP-based applications, UDP-based server applications are assigned Well Known or Registered port numbers. Học viện mạng Bách Khoa - Website: www.bkacad.com 69 UDP Client Processes 4.4.4.1 Lab 4.4.4.2 Học viện mạng Bách Khoa - Website: www.bkacad.com 70 Học viện mạng Bách Khoa - Website: www.bkacad.com 71 Extra: Denial of Service (DoS) Attacks • DoS attacks are a common method that hackers utilize to halt system response. • One type of DoS is known as SYN flooding. • SYN flooding exploits the normal three-way handshake and causes targeted devices to ACK to source addresses that will not complete the handshake. C:/> netstat SYN_RECV Học viện mạng Bách Khoa - Website: www.bkacad.com 72 Lab: Observing TCP and UDP using Netstat Học viện mạng Bách Khoa - Website: www.bkacad.com 73 Summary Học viện mạng Bách Khoa - Website: www.bkacad.com 74

Các file đính kèm theo tài liệu này:

  • pdfca_ex_s1m04_osi_transport_layer_1335_9648.pdf
Tài liệu liên quan