IP address and subnet mask knowledge

xiaoxiao2021-03-06  66

IP Address and Network Classification (1) Different physical network technologies with different physical network technologies; hosts in different physical networks, have different physical network addresses. Internet technology is a high-level software technology that will be unified from different physical network technologies. Internet technology uses a global universal address format, all of which allocates a network address for each network of the whole network, and the difference in physical network addresses. The IP protocol provides a full-range address format and is assigned under unified management to ensure that an address corresponds to a network host (including gateway), which is blocked by the IP layer. The address used by the IP layer is called the network address and is also a IP address. It consists of two parts from the network number and host number. All hosts in the unified network use the same network number, and the host number is unique. The IP address is a 32-binary number, divided into 4 fields, 8 bits per field. (2) Three types of major network addresses we know that from LAN to WAN, different types of network scores differ greatly, and must be taken differently. So according to the size of the network, the network address is divided into the main three categories, as follows: A: 0 1 2 3 8 16 24 3 1 0 Network number host number B: 1 0 Network number host number C: 1 1 0 The network host number A address is used for a small number of (up to 27) hosts greater than 216, each A network can accommodate up to 224 hosts; Class B address is used for host number between 28-216 There are many medium-sized networks, and the Class B network is up to 214; Class C addresses can only accommodate a large number of small nets of 28 hosts, and Class up to 221. In addition to the three primary class addresses above A, B, C, there are other two types of addresses, as follows: D Class: 1 1 1 0 Class E-class: 1 1 1 0 Remove with a number of addresses (Multicast Address is a multi-point transfer address than the broadcast address to support multi-purpose transmission technology. The E-address is used for future extensions. (3) TCP / IP specifies that the network address is generally instrumentarily instrumentary, there are several special forms of special forms. * Broadcast address TCP / IP stipulates that the host number "1" network address is used for broadcast use, called broadcast addresses. The so-called radio refers to sending messages to all hosts to the Internet. * Limited broadcast addresses previously mentioned broadcast addresses contain a valid network number and host number, which is technically called a Directed Boradcasting address. Anything on the Internet online can be broadcast to any other network, but there is a shortcoming of direct broadcasting, that is to know the network number of the SBS network. Sometimes it is necessary to broadcast within this network, but I don't know the network number. TCP / IP stipulates that 32-bit "1" network network address is used for this network broadcast, which is called a Limited Broadcast Address. * "0" Address TCP / IP protocol regulations, all network numbers "0" are interpreted as "this" network. * The return address A network address 127 is a reserved address for network software testing and local machine processes, called loopback address. Regardless of the program, once the return address is used, the protocol software returns now, and no network transmission is not performed. TCP / IP protocol regulations, one, packets with network number 127 cannot appear on any network; Second, the host and gateway cannot broadcast any finding information for the address. It can be seen from the above provisions that the host number "0" "1" address has special meanings in the TCP / IP protocol, and cannot be used as a valid address of a host.

Second, subnet mask (1) Subnet TCP / IP network technology is generated in large mainstream environments, which can develop to today's scale is the original designer. The rapid expansion of the network network is not the threat of IP address mode, which does not guarantee the uniqueness of the host address, but will bring two burden: first, huge network address management overhead; second, gateway finding Surprising. The second point is particularly highlighted, not only reduces the renewal of the gateway not only reduces the renewal of the gateway (or even spilled the finding table, thereby causing a diameter failure), but more importantly, it will increase the inner and outer path to refresh, thereby Aggressive network burden. Therefore, there is an urgent need to seek new technologies to deal with problems brought about by gross scale growth. Careful analysis found that the growth of the network network is mainly manifested as the increase or decrease of network addresses, so the problem of solving problems is: How to reduce network addresses. So the multiple duplicate techniques of the IP network address came into being. By multiplexing technology, a number of physical networks share the same IP network address, which will undoubtedly reduce the number of network addresses. Subnet Addressing Technology, a subnet finding, English abbreviation Subnetting, is the most widely used IP network address multiplexing method, which is currently standardized andcomes part of the IP address mode. In general, 32-bit IP addresses are divided into two parts, namely the network number and host number, and we call them "Network Some" and "Local Part" respectively. Subnet addressing technology further divides local part into the "physical network" section and "host" section, as shown: Network Network part Physical Network Host Network Network part. Local part of "physical network" is used to identify the same IP network Different physical networks under the address are both "subnet". (2) Subnet Mask IP Protocol Standards: Each of the outlets using the subnet selects a 32-bit bit mode, if a bit in the mode is 1, the corresponding IP address is a network address (including One of the network network part and the physical network number); if a bit 0 in the mode is 0, the corresponding IP address is one of the host addresses. For example, bit mode: 11111111 11111111 11111111 10000000, the top three bytes all 1, representing the highest three bytes corresponding to the IP address as the network address; the latter byte all 0, representing the last byte corresponding to the IP address For the host address. This mode is called subnet mode (Subnet Mask) or "subnet mask". For the convenience of use, it is often used to use the "dot division integer representation" to represent an IP address and subnet mask, such as a B-class address subnet mask (11111111 11111111 1111111100000) to: 255.255.25.0 IP protocol on subnet mask The definition provides an interesting flexibility that allows the "0" and "1" bits in the subnet mask. However, such subnet masks bring certain difficulties to allocate host addresses and understanding of the finding table, and very little router supports the use of low or unordered bits in the subnet, so usually in practical applications. The outlet is a subnet mask in a continuous manner. Subnet mask like 255.255.255.64 and 255.255.255.160 is not recommended. (3) The subnet mask is combined with the IP address subnet mask and the IP address to distinguish between a network number and host number of a network address.

For example, there is a C class address: 192.9.200.13 The default subnet mask is: 255.255.255.0 It is obtained by getting the IP address as follows: 192.9.200.13 Converting into binary 11000000 00001001 11001000 00001101 to convert subnet mask 255.255.255.0 to binary 11111111 11111111 11111111 000000 200 After the two binary logic and (AND) calculations, For network parts 110000000000001001 1100110 0000001001 11111111 111111 1111111111111111 111111 00000000 110000000000001 11001000 00000000 result is 192.9.200.0, ie 192.9.200.0. The result of the subnet mask to retrore and (AND) is the host part 1100000000000000001 11001000 00000000000000000000000000000000000000000000000000000000000000 00000000 000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000 00000000 00000000 00000000 0000000000 00000000 00000000 0000000000 00000000 00000000 0000000000 00000000 00000000 00000000 00 00000000 00000000 0000000000 00000000 00000000 00000000 00 00000000 00000000 00000000 00 00000000 00000000 00001101 Results are 0.0.0.13, that is, the host number is 13. (4) The subnet mask is used in conjunction with the IP address subnet mask to the IP address to distinguish between a network number and host number of a network address. For example, there is a C class address: 192.9.200.13 The default subnet mask is: 255.255.255.0 It is obtained by getting the IP address as follows: 192.9.200.13 Converting into binary 11000000 00001001 11001000 00001101 to convert subnet mask 255.255.255.0 to binary 11111111 11111111 11111111 000000 200 After the two binary logic and (AND) calculations, For network parts 110000000000001001 1100110 0000001001 11111111 111111 1111111111111111 111111 00000000 110000000000001 11001000 00000000 result is 192.9.200.0, ie 192.9.200.0. The result of the subnet mask to retrore and (AND) is the host part 1100000000000000001 11001000 00000000000000000000000000000000000000000000000000000000000000 00000000 000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000 00000000 00000000 00000000 0000000000 00000000 00000000 0000000000 00000000 00000000 0000000000 00000000 00000000 00000000 00 00000000 00000000 0000000000 00000000 00000000 00000000 00 00000000 00000000 00000000 00 00000000 00000000 00001101 Results are 0.0.0.13, that is, the host number is 13.

Third, subnet division and examples are based on the above analysis, it is recommended to define subnet masks as follows and instances. 1. The number of subnets to be divided into 2 M times. To divide 8 subnets, 8 = 23. 2. Take the Power of the M-Party Power of 2 of the number of 2 points to be divided. Such as 23, m = 3. 3. The power m determined by the previous step is converted to a decimal system after the host address m bits. If M is 3 is 11100000, converted to decimal 224, that is, the final determined subnet mask. If it is a C-class, the subnet mask is 255.255.255.224; if it is a B network, the subnet mask is 255.255.224.0; if it is a C-Class Class Class Class 255.224.0.0. Here, the number of subnets and occupied host address bits are established: 2M = n. Where M represent the number of bits of the host address; n represents the number of subnets divided. According to these principles, a Class C network is divided into 4 subnets. If we use the network number 192.9.200, the host IP address in this C-Class C network is 192.9.200.1 ~ 192.9.200.254 (because the "0" and "1" host address have special meanings, no As a valid IP address), the network is now divided into 4 parts, according to the above step: 4 = 22, the power of 22, that is, 2, the binary is 11, the high order of the host address is 11000000, and the conversion is Tecraformation is 192. This makes it possible to determine the subnet mask: 192.9.200.192, the IP address range of 4 subnets is: binary decimal 110000000000001 11000000 0000001001 11001000 00111110 192.9.20000 00001001 11001000 01000001 1,100,000,000,001,001 1,100,100,001,111,110 192.9.200.65192.9.200.12611000000 00001001 1,100,100,010,000,001 1,100,000,000,001,001 1,100,100,010,111,110 192.9.200.129192.9.200.19011000000 00001001 1,100,100,011,000,001 1,100,000,000,001,001 1,100,100,011,111,110 192.9.200 . 1993192.9.200.254 A conversion table of the number of I, B, C three types of network subnets is listed here for reference.

Class A: Subnet Number of Subnets Numbers Numbers 2 1 255.128.0.0 8, 388, 606 4 2 255.192.0.0 4,194,302 8 3 255.24.0.0 2,097,150 16 4 255. 240.0.0 1,048,574 32 5 255.248.0.0 524,286 64 6 255.252.0.0 262,142 128 7 255.254.0.0 131,070 128 8 255.255.0.0 65,534b class: Number of nets Number Net masks Number of hosts 2 1 255.255.128.0 32,766 4 2 255.0 325.255.224.0 8,190 16 4 255.255.240. 0 4,094 32 5 255.255.248.0 2,046 64 6 255.255.252.0 1,022 128 7 255.255.22.0 510 256 8 255.255.255.0 254c class: Subnet number occupied Number of maincomers in the net mask nets 2 1 255.255.255.128 126 4 2 255.255.255.192 62 8 3 255.255.255.24 30 16 4 255.255.255.240 14 32 5 255 . The most simple understanding is that the IP addresses of the two computers are equally operated with the subnet mask. If the result is the same, then the two computers are in the same sub-network, which can be directly communicated. . It's that simple.

Consider the following example: one operator Demo: aaI 192.168.0.1 Subnet Mask 255.255.255.0AND P conversion arithmetic operation is a binary address: IP address subnet mask 11111111.11111111.11111111.00000000AND 11010000.10101000.00000000.00000001 into operation 11000000.10101000.00000000.00000000 after decimal: 192.168.0.0, bis calculation demonstrates: IP address 192.168.0.254, subnet mask 255.255.255.0, AND binary arithmetic operation conversions: IP address: 11010000.10101000.00000000.11111110 Subnet Mask: 11111111.11111111.11111111.00000000AND Operation: 11000000.10101000.00000000.00000000 Transformation into a decimal after: 192.168.0.0 Operation Demonstration 3: IP address 192.168.0.4, subnet mask 255.255.255.0, And operation, transformation into binary operation: IP address 11010000.10101000.00000000.00000100 Subnet mask Code 1111111111111111111111111111111111111111111111111111111111111111111111111111110000.10101000.00000000.00000000 Transformation to decimal after: 192.168.0.0 After the above to three sets of computer IP addresses and subnet mask, we can see that it is the same. Both of 192.168.0.0, so the computer will treat the three computers as the same subnet and then communicate. The proxy server I use now, the internal network is this plan. Maybe you have to ask, how many IP addresses can be used like this subnet mask? You can count this. According to the above we can see that the IP address inside the LAN is our own provision (of course, the other IP address is the same), which is determined by the subnet mask through the analysis of 255.255.255.0. It can be obtained: the top three IP code can only be fixed to 192.168.0 by the number allocated, so there is only one last one, so obvious, IP addresses can only have (2 8 times - 1), that is, 256-1 = 255, there is a special role of the last bit of 0 or 255. Then you may ask: If my subnet mask is not 255.255.255.0? You can also do this, assume that your subnet mask is 255.255.128.0 So the first two of your LAN's IP address is fixed (what, why is it fixed? Do you look at it? ? # ¥) This, you can find out how many machines 1 in the same subnet can be found in the same subnet, and the decimal 128 = binary 1000 00002, IP code and subnet mask for And operation 3, IP address 00010000.01001001.1 ******** Subnet mask 11111111111111111111111111111111111111110000.0100000000.01000000000000000000000000000000 Transformation into decimal after: 16.73. 128.04, you can know that our internal network can be used IP address: 00010000.01001001.10000000.00000000 00010000.01001001.11111111.111111115 to be converted to decimal: 16.73.128.0 16.73.255.2556,0 to generally as 255 and an internal network for special purposes. Usually not used.

转载请注明原文地址:https://www.9cbs.com/read-87172.html

New Post(0)