The reason why the Internet network can interconnect computers of various network systems in a wide range is mainly because it uses the "unified world" TCP/IP protocol. In a network environment, in order to uniquely determine the location of a host, three parameters must be specified for the TCP/IP protocol, namely the IP address, the subnet mask, and the gateway address.
IP addresses are actually a method that uses the IP network inter-network layer to complete the "unified" network physical address through upper-layer software. This method uses a unified address format and is allocated to the host under unified management. Different hosts on the Internet have different IP addresses, and the IP address of each host is composed of 32 bits, that is, 4 bytes. In order to facilitate users to read and understand, the "dotted decimal representation method" is usually used, with each byte being part and separated by dots. For example, 10.67.53.5 is the IP address of the WEB server of Shengli Oilfield Computing Center. Each IP address can be divided into two parts. The network number indicates the size of the network, and the host number indicates the address number of the host in the network. According to the size of the network, IP addresses can be divided into five categories: A, B, C, D, and E. Class A, B, and C are three main types of addresses. Class D is dedicated to multi-directional addresses for multi-directional transmission, and Class E is used to extend alternate addresses.
The valid range of IP addresses of three categories A, B, and C is as follows:
Category �
A 1~126 0~255 0~255 1~254
B 128~191 0~255 0~255 1~254
C 192~223 0~255 0~255 1~254
Among IP addresses, there are several addresses with special meanings:
Broadcast address: TCP/IP protocol stipulates that all host number bits are 1 are used for broadcasting. The so-called broadcast address refers to sending messages to all hosts on the Internet at the same time. That is to say, the Internet network supports broadcast transmission regardless of the characteristics of the physical network. For example, 136.78.255.255 is a broadcast address in a Class B address. If you send the information to this address, you send the information to all hosts with network number 136.78.
Limited broadcast address: Sometimes when you need to broadcast on this website, but you don’t know the network number of this website, the TCP/IP protocol stipulates that an IP address with all 32 bits of 1 is used for broadcasting on this website, that is, 255.255.255.255.
"0" address: TCP/IP protocol stipulates that all network numbers with 0 are interpreted as "this network". If the host tries to communicate within the network but does not know the network number of the network, then the address "0" can be used.
Loopback address: The first decimal value of the Class A network address is 127, which is a reserved address, such as 127.1.11.13 for network software testing and local machine inter-process communication.
In order to quickly determine which part of the IP address represents the network number, which part represents the host number, and to determine whether the two IP addresses belong to the same network, the concept of subnet mask was created. The subnet mask gives the bit pattern of the entire IP address, where 1 represents the network part and 0 represents the IP host number part. The dot-decimal representation is also used in the application. Use it to help determine where the IP address network number ends and where the host number begins. The standard default masks for three types of networks A, B, and C are as follows:
Category �
A 11111111.00000000.00000000.00000000 255.0.0.0
B 11111111.11111111.00000000.00000000 255.255.0.0
C 11111111.11111111.11111111.00000000 255.255.255.0
If the IP addresses of the two hosts communicating on the Internet are 192.83.192.10 and 192.83.192.32, then the subnet mask 255.255.255.0 calculates the two IP addresses respectively, and obtains the network number and host number, and the result is consistent. It can be judged that the two IP addresses belong to the same network.
In order to effectively utilize the IP address in the case of network segmentation, the high-digit part of the host number can be seized as the subnet number, and the subnet mask can be expanded from the usual eight-bit boundary to create more subnets of a certain type of address. But when creating more subnets, the number of available host addresses on each subnet decreases. To determine the subnet masks for more subnets, you should first determine the number of network segments that transmit the IP information flow, and then determine the minimum number of subnet masks that can accommodate the number of network segments. Remember not to use network addresses containing all 0 or all 1.
To connect two completely different networks (heterogeneous networks) together, a gateway is generally used, and in the Internet, the two networks must also be interconnected through a computer called a gateway. This computer can decide whether to send the information sent by the user from the local network based on the IP address of the target computer of the user's communication. At the same time, it also receives information sent by the outside world to the local network computer. It is a channel connected to one network and another network. In order to enable the TCP/IP protocol to be addressed, the channel is assigned an IP address, which is called the gateway address.