Escolar Documentos
Profissional Documentos
Cultura Documentos
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
Application data
IP Protocol Field = 17
Application data
IP Protocol Field = 6
Connectionoriented
Connectionless
Connectionless
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 Bch Khoa - Website: www.bkacad.com 5
2.
3.
2. 3. 4.
Computer connected to a network that is simultaneously receiving and sending e-mail and instant messages, viewing websites, and conducting a VoIP phone call. Each of these applications is sending and receiving data over the network at the same time. However, data from the phone call is not directed to the web browser, and text from an instant message does not appear in an e-mail.
Extra: Multiplexing
10
Segmentation
Without
segmentation, only one application, the streaming video for example, would be able to receive data. You could not receive e-mails, chat on instant messenger, or view web pages while also viewing the video.
11
12
13
Transmission Control Protocol (TCP) TCP is a connection-oriented protocol, described in RFC 793. TCP incurs additional overhead to gain functions. Additional functions specified by TCP are the same order delivery, reliable delivery, and flow control. Each TCP segment has 20 bytes of overhead in the header encapsulating the Application layer data, whereas each UDP segment only has 8 bytes of overhead
UDP is a simple, connectionless protocol, described in RFC 768. It has the advantage of providing for low overhead data delivery: besteffort delivery
H c vi n m ng Bch Khoa - Website: www.bkacad.com 15
16
17
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 Bch Khoa - Website: www.bkacad.com 20
21
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 Bch Khoa - Website: www.bkacad.com 22
23
UDP is a simple protocol that exchanges datagrams, without acknowledgments or guaranteed delivery. Error processing and retransmission must be handled by higher layer protocols UDP is designed for applications that do not need to put sequences of segments together . Each UDP datagram is sent within a single IP datagram. All IP implementations are required to accept datagrams of 576 bytes, which means that, allowing for maximum-size IP header of 60 bytes, a UDP datagram of 516 bytes is acceptable to all implementations. Many implementations will accept larger datagrams, but this is not guaranteed.
24
25
26
Reserved for services and applications. They are commonly used for 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.
applications such as HTTP (web server) POP3/SMTP (e-mail server) and Telnet
initiating a connection. It is not very common for a client to connect to a service using a Dynamic or Private Port
27
UDP port
28
29
Both TCP and UDP use port (socket) numbers to pass information
to the upper layers. Port numbers are used to keep track of different conversations crossing the network at the same time.
30
Extra: Sockets
31
Netstat command
32
33
34
35
Each application process running on the server is configured to use a port number, either by default or manually by a system administrator.
Request destination port, request source port Response destination port, response source port
36
3-way handshake
37
3-way handshake
38
39
40
41
42
43
TCP Retransmission
Retransmission for lost data employed by TCP. If the ACK is not received within a timeout interval, the data is retransmitted.
44
45
46
47
48
Flow Control
49
50
Goal:
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.
H c vi n m ng Bch Khoa - Website: www.bkacad.com 51
Flow Control
The purpose of windowing is to improve flow control and reliability. The window size is determined by the receiver when the connection is established and is variable during the data transfer. Window size refers to the number of bytes that are transmitted before receiving an acknowledgment. The window size determines how much data the receiving station can accept at one time.
H c vi n m ng Bch Khoa - Website: www.bkacad.com 53
Simple Windowing
Sliding Windows
Initial Window size Usable Window Can send ASAP Working Window size Octets sent Usable Window Not ACKed Can send ASAP ASAP=As Soon As Possible
55
Host A - Sender
1 2 3 4 5 6 7 8 9 10 11 12 13 1 2 3 4
Host B - Receiver
5 6 7 8 9 10 11 12 13
10
11
12
13
1 2 3
13
ACK 4 4 5
10
11
12
13
10
11
12
13 1 2 3 4 5 6 7 8 9 10 11 12 13
10
11
12
13
ACK 6 6 7
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 10
11 11
12 12
13 1 13 2 3 4 5 6 7 8 9 10 11 12 13
8 9
1 2 3 4 5 6 7 8 9 10 11 12 13
56
57
UDP simply reassembles the data in the order that it was received and forwards it to the application.
59
Like TCP-based applications, UDP-based server applications are assigned Well Known or Registered port numbers.
60
As with TCP, client/server communication is initiated by a client application that is requesting data from a server process: using ports
Lab 4.2.5.2
61
62
63
Summary
64
65