OSI- transport layer

OSI- transport layer

Port number (2 bytes

SYN(1bit)

ACK (1bit)

Session multiplexing (Why is an IP address can do a lot of things?)

Source port address can be different

Quintuple (not the same two quintuple world)

Source IP address - destination IP address - a source port number - destination port number - protocol number

port

0-65535

0-1023 well-known port

1024-65535

The port number application Chinese name protocol
20/21 FTP File Transfer Protocol (transfer of large files) TCP
22 SSH Remote management application (security, encryption) TCP
23 telent Effective remote protocol (insecure) TCP
25 SMTP Simple Mail Transfer Protocol (just mail) TCP
53 DNS Domain Name Resolution Protocol UDP/TCP
69 TFTP Transfer small files UDP
80 HTTP Hypertext Transfer Protocol TCP
110 POP3 recieve email TCP
161/162 SNMP Network Management Protocol UDP
179 BGP Exterior Gateway Routing Protocol TCP
443 HTTPS (HTTP + SSL) secure http TCP
520 RIP Dynamic routing protocols UDP
521 RIPng The next generation of dynamic routing protocols UDP

The reliability of TCP
reliability of the foundation

1. Data transmission is ordered

2. The data transmission is the acknowledgment mechanism

3. The data retransmission mechanism

4. Reliability premise is to establish a connection

TCP three-way handshake

1. The first handshake: Client Sever tries to establish a connection, a randomly generated sequence number seq = j, the SYN flag bit is set to 1, and the data packet to Server, Clinet enters the SYN_SENT state, waiting for acknowledgment Sever.

2. The second handshake: Sever Client wants to know the received packet to establish a connection, SYN flag is 1 and the other indicates a request to establish a connection, ACK flag is 1 agree to establish a connection, ack = J + 1, client terminal seq I want to send data to tell you the hair of x, x server sends + 1 is to tell the other side, you send the packets x I have received (confirmation effect), x + 1 from the next time it began to send sEQ ID NO own randomly generated seq = K, Server enters SYN_RCVD state.

3. Third handshake: the Client receives acknowledgment, checking whether the ack J + 1, ACk is 1, then if the correct ACK flag is set to 1, ack = K + 1, K represents the data received before , sends the data packet to the Server, ack Server checks whether K + 1, aCK is set, and if correct, the connection is established, Server, and Client enters the eSTABLISHED state, complete the three-way handshake, then transmission can begin between Client and Server the data.

Specific reference blog https://www.cnblogs.com/Qing-840/p/9283367.html

https://www.cnblogs.com/lms0755/p/9053119.html

https://blog.csdn.net/qq_38950316/article/details/81087809

Guess you like

Origin www.cnblogs.com/zx125/p/11311739.html