What is the IP address, and the difference between physical and IP addresses
Source: Shangpin China |
Type: website encyclopedia |
Date: August 24, 2012
Beijing website construction Company Shangpin China: The Internet connects large and small networks around the world, and there are many computers connected to these networks. Users can communicate with other computers on the Internet or obtain online information resources by operating on networked computers. In order to enable users to find the host that needs to be connected to it conveniently and quickly, the problem of how to identify the online host must be solved first. In the network, the identification of the host depends on the address. Therefore, in the process of unifying the whole network, the Internet must first solve the problem of address unification. The Internet uses a global general address format to assign an Internet address to each network and each host in the whole network, so as to shield the difference of physical network addresses. An important function of IP is to deal with this problem, that is, hide the original physical address of the host through IP, and use a unified IP address in the network layer.
1. Physical address and IP address
Address is a problem that every kind of network has to face. The address is used to identify a resource in the network system, also called "identifier". Generally, identifiers are divided into three categories: Name, Address, and Route. They tell people what resources are, where they are and how to find them. Different networks adopt different address compilation methods and contents.
The Internet is a virtual network that connects physical networks together through routers (or gateways). In any physical network, the devices of each node must have a recognizable address so that information can be exchanged in it. This address is called "Physical Address". Since the physical address is reflected in the data link layer, the physical address is also called hardware address or media access control (MAC) address.
The physical address of the network brings some problems to the unified network address of the Internet.
(1) Physical address is an embodiment of physical network technology. Different physical networks have different length and format of physical address. For example, for LAN, the MAC address of Ethernet is difficult to find in different physical networks, and the address format of token ring network also lacks uniqueness. Obviously, both address management methods will set obstacles for cross network communication.
(2) The address of the physical network is fixed in the network equipment and cannot be modified.
(3) The physical address belongs to a non hierarchical address. It can only identify a single device, but cannot identify which network the device is connected to.
The Internet adopts the network layer IP address addressing scheme to address the physical network address. IP provides a unified address format for the whole network. Address allocation is carried out under unified management to ensure that one address corresponds to one host (including router or gateway). In this way, the difference of physical addresses is shielded by the IP layer.
2 . IP address division
According to TCP/IP regulations, IP address consists of 32 hit, which includes three parts: address category, network number and host number. How to reasonably allocate the 32 hit information to the network and host as a number seems simple, but it is of great significance. Because once the bits of each part are determined, it is equal to the number of networks that can be included in the entire Internet and the number of hosts that can be accommodated by each network.
Since the IP address is expressed in the form of 32-bit binary number, which is not suitable for reading and memory, the Internet Management Committee has adopted a "dotted decimal" representation method to represent the IP address in order to facilitate users to read and understand the IP address. That is to say, the IP address is divided into four bytes (each byte is 8 bits). Each byte is represented in decimal and separated by a dot ".", for example, 202.196.192.5.
In the Internet, the number of networks is a difficult factor to determine, but the size of each network is relatively easy to determine. As we all know, from local area network to wide area network, the scale of different types of networks varies greatly and must be differentiated. Therefore, according to the size of the network and the purpose of use, Internet IP addresses can be divided into five types, including Class A, Class B, Class C, Class D, and Class E. Format of Class 5 address.
(1) Class A address
The first bit of the first byte of Class A address is "0", and the other 7 bits represent the network number. The second, third and fourth bytes are 24 bits in total, which are used for the host number. From the number of bits of the network number and host number, we can know that there are 2 (128) networks of Class A addresses, and each network contains 2 (16777216) hosts. The range of Class A addresses is 0.0.0.0-127.255.255.255. Since all network numbers are 0 and I are reserved for special purposes, the number of valid networks for Class A addresses is 126, ranging from 1-126. In addition, if the host numbers are all 0 and all 1, there is a special role. Therefore, each network number should contain 2-2 (16777214) hosts. Therefore, the valid range of Class A addresses that a host can use is 1.0.0.1-126.255.255.254.
The IP address category can be identified according to the network number range in the IP address. For example, if an IP address is 10.10.10.1, then the address belongs to Class A address. Class A addresses are generally allocated to network users with a large number of hosts.
(2) Class B address
The first two bits of the first byte of the class B address are the remaining 6 bits of "10" and the 8 bits of the second byte are 14 bits in total, which are used to represent the network number. The third and fourth bytes are 16 bits in total, which are used to represent the host number. Therefore The number of Class B address networks is 2, and the number of hosts included in each network number is 2 (the actual effective number of hosts is 2-2). The range of Class B addresses is 128.0.0.0 - 191. 255. 255. 255. Since all host numbers 0 and 1 have special functions, the effective range of Class B addresses that a host can use is 128.0.0.1-191.255.255.254
The range of the first byte value used to identify the Class B address is 128-191. Class B addresses are generally allocated to network users with a medium number of hosts.
(3) Class C address
The first three bits of the first byte of the class C address are "110". The remaining five bits, the second byte and the third byte, a total of 21 binary digits, are used to represent the network number, and the eight binary digits of the fourth byte are used to represent the host number. Therefore, the number of Class C address networks is 221, and each network number contains 256 hosts (254 actually valid). The range of Class C addresses is 192.0.0.0 - 223.255.255.255. The effective range of Class C AML that can be used by the same host is 192.0.0.1 - 223.255.255.254
The value range of the first byte used to identify the class C address is 192 "223. Since the class C address is characterized by a large number of networks, and each network has only 254 hosts at most, the class C address is generally allocated to small LAN users.
(4) Class D address
The first four bits of the first byte of the Class D address are "1110". Class D address is used for multicast. Multicast is to send data to a group of hosts at the same time. Only those hosts that have registered to receive multicast addresses can receive multicast packets. The range of Class D address is 224.0.0.0-239.255.255.255
(5) Class E address
The first four bits of the first byte of the class E address are "1111". Class E addresses are reserved for the future. They can also be used for experimental purposes, but they cannot be allocated to the host. This article was published in UEO Marketing website construction Company Shangpin China //ihucc.com/
Source Statement: This article is original or edited by Shangpin China's editors. If it needs to be reproduced, please indicate that it is from Shangpin China. The above contents (including pictures and words) are from the Internet. If there is any infringement, please contact us in time (010-60259772).