Doing a good deed today compares the IP layer protocol number and TCP layer port number duplication.
The Protocol field of the IP layer indicates the protocol used by the transport layer to determine the decoding program used when the data is decoded from the bottom to the upper layer, the field is a byte, so it can characterize up to 256 protocols, in the official database of the IANA, where The protocol that corresponds to the protocol number of the currently assigned IP protocol field is given.
In the same vein, the TCP layer uses two bytes to characterize the protocol used by the application layer, so the maximum can represent 65,536 protocols, but the port number is usually expressed in the ports on the server side. Here, the protocol that corresponds to the port number of the currently assigned TCP port field is given.
Separately extracting the corresponding protocol names exists in Ipnumber.txt and port.txt, involving case-by-case problems, using the Nodepad conversion, using the following command:
Cat Port.txt | Sort > New_port.txt
cat ipnumber.txt | sort >new_ ipnumber.txt
Get sorted after the file is finished, using the COMM command
comm-12 New_port.txt New_ipnumber.txt
Get a common part for the following six kinds of protocols
CBT
iso-ip
kryptolan
L2TP
MTP
where Iso-ip,kryptolan is within 1024 ports, which is known as the Port protocol.
in the IANA's official database, the maximum number of ports is calibrated to 49151. When we grabbed the bag, we saw that the client port was usually very large, because 49152-65535 was basically a temporary port number reserved for the client to use.
Of course, the question is, since the IP layer has assigned it a protocol number, why should the six protocols go to the port of application?
finally established a Wireshark network-related technical question and answer group, discusses the Wireshark grab packet problem, Wireshark plug-in writing, including Lua and C, batch processing messages, protocol-related network knowledge, etc. , the group number is 218451941.
This article is for the Csdn Village Youth original article, reprint remember to add small tail puppet, Bo main link here.