Professional Documents
Culture Documents
Chap 06
Chap 06
4. Transport layer
67
Application
Presentation
Session
• Multiplexing/demultiplexing
Transport • UDP
Network
• TCP
Datalink
Physical
68
Transport layer
• Cung cấp kết nối định hướng (connection-oriented).
• Xử lý địa chỉ IP và tên miền.
• Các giao thức tiêu biểu: TCP, UDP, FCP, RDP…
• Chịu trách nhiệm kiểm tra dữ liệu đã được gửi thành
công hay không (error-free).
70
Transport layer
• Cung cấp các cơ chế kiểm tra lỗi gói tin và điều hướng
luồng dữ liệu (flow control) giữa các kết nối.
• End-to-end connection: chia gói tin lớn thành các
segment nhỏ tại nơi gửi và ráp lại đúng thứ tự tại nơi
nhận dựa vào segment sequencing.
71
Multiplexing/demultiplexing
multiplexing at sender:
handle data from multiple demultiplexing at receiver:
sockets, add transport header use header info to deliver
(later used for demultiplexing) received segments to correct
socket
application
delivery (TCP)
network
data link
physical
•flow control
data link physical
physical
network
“best-effort” IP
network
data link application
physical transport
network
• services not available: data link
physical
network
data link
•delay guarantees
physical
•bandwidth
guarantees
74
length checksum
why is there a UDP?
no connection
application establishment (which can
data add delay)
(payload) simple: no connection
state at sender, receiver
small header size
UDP segment format
no congestion control:
UDP can blast away as fast
as desired
76
UDP checksum
wraparound 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1
sum 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 0
checksum 1 0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 1
“12.3.4.15”
80
Three-way handshake
Three-way handshake
Three-way handshake
•Step 1 (SYN) : establish a connection with server
•Step 2 (SYN + ACK): server responds to the client
request with SYN-ACK signal bits set.
•Step 3 (ACK) : client acknowledges the response
of server and they both establish a reliable
connection starting to transfer data.