When it comes to the Internet, IP addresses cannot be mentioned, because the IP address is a very important concept in terms of learning or using the Internet, and many of the Internet's services and features are embodied through IP addresses.
First, the concept of IP address
We know that the Internet is the whole world-wide computer-integrated communications network of the collective name. When the two computers that are connected to one network communicate with each other, there are additional information in the packets they transmit, which is the address of the computer where the data is sent and the address of the computer receiving the data. Like this, people for the convenience of communication to each computer in advance to assign a similar to the telephone number of our daily identity address, the identity address is the IP address we want to introduce today. According to the TCP/IP protocol, IP addresses are made up of 32-bit binary numbers and are unique across the Internet. For example, the IP address of a TSU computer on the Internet is:
11010010 01001001 10001100 00000010
Obviously, these numbers are not very good for people to remember. People for the convenience of memory, will constitute the computer's IP address of the 32-bit binary into four segments, 8 bits per paragraph, separated by a decimal point, and then convert every eight-bit binary to decimal number, so that the IP address of the above computer becomes: 210.73.140.2.
Second, the classification of IP address
We said that the Internet is a huge network that connects countless networks around the world, the computers on each network are uniquely identified by their own IP addresses, and we can assume that each network has its own identifier on the internet in this vast network. This is very much like the telephone number in our daily life, for example, if there is a telephone number of 0515163, the first four digits in this number indicate which region the phone belongs to, and the following numbers indicate a phone number in that area. Similar to the example above, we divide the IP address of the computer into two parts, namely the network identity and the host identity. All hosts on the same physical network use the same network identity, the 4 bytes of the IP address are divided into 2 parts to indicate the specific network segment, the network identity, and the other part to indicate the specific node, that is, the host identity, that is, the specific computer number in a network. For example, the IP address of the server at the Yancheng Information Network Center is 210.73.140.2, and for that IP address, we can divide it into two parts, the network ID and the host identity, so that the IP address above can be written as:
Network ID: 210.73.140.0
Host ID: 2
Close Up write: 210.73.140.2
Because the network contains a number of computers that may not be as many, some networks may contain more computers, and some networks contain fewer computers, so people in accordance with the size of the network, the 32-bit address information set to three kinds of positioning of the way, the three methods corresponding to the classification of a, B, Class C IP address.
1.A Class IP Address
A Class A IP address refers to the IP address of the four paragraph number, the first paragraph number is the network number, the remaining three segment number is the local computer number. If the IP address is represented by a binary, the Class A IP address consists of a 1-byte network address and a 3-byte host address, and the highest bit of the network address must be "0". A class of IP address network identification length of 7 bits, host identification length of 24 bits, a class of network addresses a small number of hosts can be used for a large network of more than 16 million units.
2.B Class IP Address
A class B IP address means that in the four segment of the IP address number, the first two paragraphs are the network number, and the remaining two is the local computer number. If the IP address is represented by binary, the Class B IP address consists of 2-byte network address and 2-byte host address, and the highest bit of the network address must be "10". Class B IP Address network identification length of 14 bits, host identification length of 16 bits, B class network address for the medium sized network, each network can hold more than 60,000 computers.
3.C Class IP Address
A class C IP address means that in the four segment of the IP address number, the first three is the network number, and the remaining section number is the local computer number. If the IP address is represented by binary, the class C IP address consists of 3-byte network address and 1-byte host address, and the highest bit of the network address must be "110". Class C IP Address Network identification length of 21 bits, host identification length of 8 bits, C class network address a large number of applications for small-scale local area network, each network can contain up to 254 computers.
In addition to the above three types of IP addresses, there are several special types of IP addresses, TCP/IP protocol, where the first byte of the IP address in the "lll0" start address is called multicast address. Therefore, any IP address with a first byte greater than 223 or less than 240 is a multicast address; the address of each byte in the IP address ("0.0.0.0") corresponds to the current host, and each byte in the IP address is 1 IP address ("255.255.255.255") is the broadcast address of the current subnet, and the address of the IP address which is "llll0" is reserved for future use as a special purpose.
Iii. addressing rules for IP
1. Network addressing Rules
A, the network address must be unique.
B, the network identity cannot begin with the number 127. In the Class A address, the number 127 is reserved for the internal loopback function.
C, the first byte of the network identity cannot be 255. Number 255 as broadcast address.
D, the first byte of the network ID cannot be "0", "0" indicates that the address is a local host and cannot be routed.
2. Host addressing Rules
A, the host identity must be unique within the same network.
B, the host identity of each bit can not be "1", if all bits are "1", then the machine address is the broadcast address, not the address of the host.
C, the host identity of each bit can not be "0", if each bit is "0", it means "only this network", and the network does not have any hosts.
Iv. Overview of IP subnet Masks
1. The concept of subnet mask
The subnet mask is a 32-bit address that masks part of an IP address to distinguish between a network identity and a host identity, and whether the IP address is on a local area network or on a remote network.
2. Determine the number of subnet masks
The number of digits used for the subnet mask depends on the number of possible subnets and the number of hosts per subnet. Before you define a subnet mask, you must figure out the number of subnets and hosts you would otherwise use.
The steps for defining a subnet mask are:
A, determine which group address is for us to use. For example, we apply to the network number of "210.73.A.B", the network address for the class C IP address, the network is labeled "210.73", the host identified as "A.B".
B, based on the number of subnets we need now and the number of subnets that might be expanded in the future, define the subnet mask with some bits of the host. For example, we now need 12 subnets and may need 16 in the future. The subnet mask is determined with the first four bits of the third byte. The first four digits are set to "1", that is, the third byte is "11110000", and this number is called the new binary subnet mask.
C, the corresponding initial network of each bit are set to "1", that is, the first two bytes are set to "1", the fourth byte is set to "0", the subnet mask of the discontinuous binary form: "11111111.11111111.11110000.00000000"
D, turn this number into a discontinuous decimal form: "255.255.240.0"
This number is the subnet mask for the network.
Callout for 3.IP Mask
A, no subnet labeling method
For IP addresses without subnets, it can be written as a mask with a host number of 0. such as IP address 210.73.140.5, Mask is 255.255.255.0, you can also default mask, write only IP address.
B, the method of labeling with subnet
When you have a subnet, you must pair them up. Take the Class C address as an example.
The first 3 bytes in the 1.IP address represent the network number, the second byte indicates both the subnet number and the host number, and whether the two IP addresses belong to a network segment. If they belong to the same network interval, the exchange of information between these two addresses is not routed through the router. If it is not the same network interval, that is, the subnet number is different, the information exchange of two addresses will be through the router. For example, for a host with an IP address of 210.73.140.5, its host ID is 00000101, and for a host with an IP address of 210.73.140.16, its host identity is 00010000, the front three digits of the above two host IDs are 000, indicating that two IP addresses are in the same network area.
Host address, for example, the host identity of the host identified as 00000001,210.73.60.252 for the 10.73.60.1 is 11111100, the front three digits 000 and 011 of the two host identities are different from each other in different network areas, and the information needs to be routed through the router. Its subnet host number is 1 and 252.
2. The function of the mask is to show that there are subnets and there are several subnets, but the number of subnets can only be expressed as a range, can not be exact specific several subnets, the mask does not specify the subnet number, subnet mask format (for the C class address): The host logo before a few for the subnet number, the following do not write the host, all write 0.
V. Other matters of IP
1. The General Internet Information Center allocates the IP address according to the network, so only when it comes to the network address can we use the parlance of Class A, Class B and C.
2. When assigning network addresses, the network identity is fixed, and the computer identity can vary within a certain range, the following is the composition of the three types of network address:
Class A address: 73.0.0.0
Class B Address: 160.153.0.0
Class C Address: 210.73.140.0
Each of the 0 above can be changed between 0~255.
3. Because the first three digits of the IP address have determined what type of network an IP address is, the Class A network address will no longer be divided into Class B IP addresses, and Class B IP addresses can no longer be classified into C-class IP addresses.
4. When it comes to a particular computer IP address, it is not appropriate to use a class, Class B, Class C, but it can be said that the host address is a Class A, B, Class C network.
You must have an understanding of the IP address. With an IP address, you can send e-mail and have access to other information on the Internet, such as the WWW service on the Internet, the BBS service, the FTP service, and so on.