IP address and subnet mask

xiaoxiao2021-03-06  81

I. IP address and network classification (1) IP address We know that different physical network technologies have different formation modes; hosts in different physical networks have different physical network addresses. Internet technology is a high-level software technology that will be unified in different physical network technologies. Internet technology uses a global universal address format, allocating a network address for each network of the whole network, and each host to block the difference in physical network addresses. The IP protocol provides an address format for all Internet networks 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 three types, as follows: C Category: 0 1 2 3 8 16 243 1 0 Network number host number B: 1 0 Network host number C class: 1 1 0 network The host number A-class address is used for a small number of (up to 27) hosts larger than 216, each A network can accommodate up to 224 hosts; Class B addresses are used for host numbers 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, the Subnet Routing, English Abbreviation Subnetting, is the most widely used IP network address multiplexing method, which is currently standardized and has become part of 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 a "physical network" section and "host" part, as shown in Figure: Network Network Some Physical Network Host | ← Network Network Part → | ← - Local Parts - → | Among them, "physical network" is used to identify different physical networks under the same IP network address, 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 integer representation" to represent an IP address and subnet mask, such as a Class B address subnet mask (11111111 11111111 11111111000000) is: 255.255.25.0 IP protocol on subnet mask Definitions provide an interesting flexibility that allows "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 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 Its network number and host number can be obtained as follows: 1 Put IP Address 192.9.200.13 Convert to binary 11000000 000000001001 11001000 000011012 Subnet mask 255.255.255.0 converted to binary 11111111 11111111 11111111 0000003 After two binary logic and (AND) calculations result That is, network portion 110000000000001001 11001000 0000001101 111111 11111111 111111110 000000111 11111110111 11111100000000001001 11001000 000000 200.000.0, the network number is 192.9.200.0. 4 The result of the subnet mask and reverse and IP address logic and (AND) are the host part 1100000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000001101 Result is 0.0.0.13, that is, the host number 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 Its network number and host number can be obtained as follows: 1 Put IP Address 192.9.200.13 Convert to binary 11000000 000000001001 11001000 000011012 Subnet mask 255.255.255.0 converted to binary 11111111 11111111 11111111 0000003 After two binary logic and (AND) calculations result That is, network part 110000000000001001 11001000 00001101 111111 11111111 11111111 11111111 111111111 11111111 11111111111 111111 111111111 11000000 1100000000000000000000000000.0, network number 192.9.200.0. 4 The result of the subnet mask and reverse and IP address logic and (AND) are the host part 11000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000 000000000000000000000000000000001101 Results 0.0.0.13, that is, the host number 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. If you are divided into 8 subnets, 8 = 23.2, take the M-Party power of the two points of the number of points to divide the number of nets. Such as 23, ie m = 3.3, the power m determined by the previous step is converted into a decimal by pressing the host address M bit. 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 is: 192.9.200.192, 4 subnet IP addresses range: binary decimal 1 110000000000001001000000 000000001 11001000000000000192.9.20000000000001001 11001000, respectively 0100000111000000 00001001 11001000 01111110192.9.200.65192.9.200.126③ 11000000 00001001 11001000 1000000111000000 00001001 11001000 10111110192.9.200.129192.9.200.190④ 11000000 00001001 11001000 1100000111000000 00001001 11001000 11111110192.9.200.193192.9 . Class A: The number of subnets takes a number of nets in the net masks 21255.128.08, 388, 6064, 30283, 388, 6064, 30283, 388, 6064, 30283255.224.0.02,097,150,048,573,24255. 248.0.0524, 286646255.252.0.0262, 1421287255.254.0.0131, 0701288255.255.0.065, 534

Class B: The number of subnets occupies the number of mains in the net mask. Number of main machines in the number of subnet masks in the number of subnets. 255.255.2401432555.255.255.2486646255.255.255.2522

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

New Post(0)