[1Day-1CS] Transport Layer
1CS in 1 day, a quick refresher on the transport layer
Transport Layer
Provides communication services that connect senders and receivers. Provides connection-oriented data stream support, reliability, and flow control Serves as a data delivery intermediary between the application and Internet layers
-
TCP: Guarantees order, uses connection-oriented protocol, acknowledges receipt (virtual line packet exchange)
-
UDP: ordering X, acknowledgments X, simple data delivery (datagram packet exchange)
Virtual line packet exchange method
-
Each packet contains a virtual line identifier
-
Virtual line is released when all packets have been sent, packets arrive in order of transmission
How datagram packets are exchanged
-
Packets travel independently, choose the best path
-
Can be sent on different paths and in different order
How TCP establishes and tears down connections
connection: 3-way handshake
- client sends connection request flag with its ISN
- server sends back server's ISN and client's ISN + 1 with authorization number
- client replies back with server's ISN + 1 with authorization number
Disconnecting: 4-way handshake
- client sends FIN set segment and enters FIN_WAIT
- the server that received the data sends an ACK acknowledgment segment to the client and enters CLOSE_WAIT
- sends FIN segment after some time has passed since ACK was sent
- client receives ACK, enters TIME_WAIT and resends ACK back to server
- the receiving server sends a CLOSE
Reasons for using TIME_WAIT: Possibility of delayed packets, confirmation of disconnection
댓글 작성
게시글에 대한 의견을 남겨 주세요.