Beruflich Dokumente
Kultur Dokumente
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)
Hc vin mng Bch Khoa - Website: www.bkacad.com 5
The functions
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
Primary responsibilities
4.1.1
10
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.
Hc vin mng Bch Khoa - Website: www.bkacad.com 11
Segmentation
12
Q/A
Conversation vs Session ?
13
14
16
17
18
20
21
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
Hc vin mng Bch Khoa - Website: www.bkacad.com 24
25
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.
Hc vin mng Bch Khoa - Website: www.bkacad.com 26
27
28
29
Port Addressing
4.1.5
31
Q/A
4.1.5
32
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
33
UDP port
34
35
36
Extra: Sockets
37
Netstat command
4.1.5.3
38
39
Q/A
Lab 4.1.6.2
41
42
4.2.1
43
4.2.2
44
45
3-way handshake
4.2.4
46
3-way handshake
47
3-way handshake
48
49
50
51
Lab 4.2.5.2
52
53
54
Expectational Acknowledgement ?
55
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
56
Flow control
4.3.4.1
Flow Control ?
57
4.3.4.2
58
Flow control avoids the problem of a transmitting host overflowing the buffers in the receiving host.
Hc vin mng Bch Khoa - Website: www.bkacad.com 59
60
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
63
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
64
65
66
UDP simply reassembles the data in the order that it was received and forwards it to the application.
67
Like TCP-based applications, UDP-based server applications are assigned Well Known or Registered port numbers.
68
69
Lab 4.4.4.2
70
71
72
Summary
73
74