IP address and subnet mask basics

IP address and subnet mask basics

​ IP address classification: Class A, Class B, and Class C addresses are unicast addresses

​ The host bit in the IP address is set to 0 is the network segment where the host is located.

​ Subnet mask: It is a bit mask used to indicate which bits of an IP address identify the subnet where the host is located and which bits identify the host. The subnet mask has only one function, which is to divide an IP address into two parts, the network address and the host address.

​ The function of the mask is to indicate that there are subnets and several subnets, but the number of subnets can only be expressed as a range, and the specific subnets cannot be specified. The mask does not specify the specific subnet number. There is a subnet mask. Format (for class C addresses).

​ The subnet mask usually has the following two formats:

​ 1. Expressed by the same dotted decimal as the IP address format

​ Such as: 255.0.0.0 or 255.255.255.128

​ 2. Add the "/" symbol and the numbers 1-32 after the IP address, where the numbers 1-32 indicate the length of the network identification bits in the subnet mask

​ For example: the subnet mask of 192.168.1.1/24 can also be expressed as 255.255.255.0

​ The subnet mask is generally 255.255.255.0

TCP, IP protocol

TCP layered protocols according to functions: application layer, transport layer, network layer, data link layer, and physical layer.
TCP protocol function

​ 1. Establish a connection: establish a TCP connection before formally transmitting data, and negotiate some parameters, such as telling the other party how large the receiving buffer (unit byte) is, how many bytes of data a segment can carry, and whether it supports selective confirmation .
​ 2. Reliable transmission: The sender puts the file in the buffer of the sender in the form of a byte stream, and the receiver reads it from the buffer in the form of a byte stream. If the data packet is lost, it will be automatically retransmitted; if it does not arrive in order, it will be buffered and sorted at the receiving end.
​ 3. Congestion avoidance: The network may be congested or unblocked during the entire communication process. When the sender starts to send data, it first senses whether the network is congested and adjusts the sending speed.
​ 4. Flow control: If the sending end sends too fast, the receiving end application may not have time to read data from the receiving buffer, causing the receiving buffer to be full. In the process of receiving data, the receiving end can tell the sending end to send it faster or slower, and whether it needs to pause for a while.
​ 5. Release the connection: After sending, tell the other party that the sending is complete, and wait for the other party to receive the confirmation before releasing the connection

​ As long as the network service is started, it uses a certain port of TCP or UDP to listen to the client request
. The TCP or UDP + destination port of the data packet to locate the service
on the server. The port on the server must be unique.
View service monitoring Listen to the port netstat -an​ to
test whether the remote server can access a port telnet 192.168.80.120 3389

Guess you like

Origin blog.csdn.net/m0_52425873/article/details/112647657