Current location - Quotes Website - Collection of slogans - Questions about TCP and UDP
Questions about TCP and UDP
1, there is something wrong with this question. We should ask which layer of OSI TCP works on. TCP is the transport layer protocol in OSI, that is, the fourth layer. TCP SYN belongs to TCP protocol, so it is initiated by Layer 4 in OSI. It is worth noting that few operating systems actually implement network functions according to the seven-layer protocol model of OSI. In fact, the industrial standard is the TCP/IP protocol family (four layers: physical layer, link layer, network layer and transport layer).

2. From the concept of pure router, the packets it handles are generally processed to the network layer, and the things at the transport layer are not analyzed. However, general routers have integrated security and filtering modules, so routers may monitor the contents of the transport layer. For example, when a group of TCP packets send data from one end to the other before completing the TCP three-way handshake, the group of TCP packets may be discarded by the router. In addition, the router may have to analyze whether the data at the transport layer is legal, such as the checksum check at the transport layer and so on. You must analyze the destination IP address and then forward the packet according to the router's own routing table.

3. From the pure concept of router, the router works in the network layer (the main IP protocol) and processes the data of the network layer. TCP and UDP are both transport layer protocols, both above the network layer, and there is no difference for routers. In fact, due to the expansion of router functions, such as security, filtering and other functions, the router may analyze the contents of the transport layer in TCP and UDP packets according to its own implementation and make appropriate modifications when necessary.