Computer networks – IP and ports
Hierarchical model of computer network
OSI layered model: physical layer, data link layer, network layer, transport layer, session layer, presentation layer and application layer;
TCP / IP layered model: physical + data link layer, network layer, transmission layer and application layer;
IP address
The IP address is a 32-bit integer. Usually, for ease of representation, it is divided into four 8-bit binary integers, and each 8-bit binary integer can be expressed as a decimal number from 0 to 255.
IP addresses are divided into categories A, B, C, D and E:
IP addresses are divided into public IP and private IP according to purpose.
The internal private addresses retained are listed below
port
Port is a 16 bit integer used to indicate which communication program the data is handed over to. Port is the entrance and exit for the application to communicate with the outside world.
Different applications process data on different ports. Two programs on the same machine cannot share a port.
Port numbers range from 0 to 65535 and are generally divided into three categories: