ip (address) : a unique identifier used to mark a network device
Public network ip: the ip that can actually access the Internet
private ip : the ip in the local area network (also called private ip)
Class A ip : The first digit remains unchanged, a total of 2 ^ 24, available: 2 ^ 24 - 2
Class B ip : The first 2 ip remains unchanged, a total of 2 ^ 16, available: 2 ^ 16 - 2
Class C ip : The first three There are 2 ^ 8 bits unchanged , available: 2 ^ 8 - 2
Class D, E: reserved for future
local ip: 127.0.0.1 (localhost)
port: used to distinguish different programs on a device
0-1023 : Ports occupied by the system 1024-65535 : Ports
that can be used during development
netstat - an : View the ports used by the computer
lsof - i:port : view processes by port number
socket (socket) : a tool for sending / receiving network data
The process of sending / receiving data on the network:
1. The sender delivers the content to the network card -> 2. The network card sends the content to the receiver according to the receiver's IP address -> 3. After the receiver receives it, according to the port number, the Data is passed to specific software