Ip subnet-zero and ip classless usage

Source: Internet
Author: User

Ip subnet-zero and ip classless usage if you have a class c ip address, such as 192.168.10.0, you want to divide it into eight CIDR blocks, each of which can contain 32 hosts, subnetmask is: 192.168.10.0-31, broadcast address: 192.168.10.31 192.168.10.32-63, broadcast address: 192.168.10.32, broadcast address: 192.168.10.63, broadcast address: 192.168.10.63 192.168.10.64-95, network Address: 192.168.10.64, broadcast address: 192.168.10.95 192.168.10.96-127, network address: 192.168.10.96, broadcast address: 192.168.10.127 192.168.10.128-159, network address: 192.168.10.128, broadcast location Address: 192.168.10.159 192.168.10.160-191, network address: 192.168.10.160, broadcast address: 192.168.10.191 192.168.10.192-223, network address: 192.168.10.192, broadcast address: 192.168.10.223 192.168.10.20.- 255, network address: 192.168.10.20, broadcast address: 192.168.10.255: 32 IP addresses for each CIDR block. The first IP address is the network address, which is used to mark the network and the last IP address is the broadcast address, which is used to represent all hosts on the network. These two IP addresses are reserved by TCP/IP and cannot be assigned to the host. In addition, the first subnet 192.168.10.0-31 and the last subnet 192.168.10.20.- 255 are also retained and cannot be used. The reason is that the network address of the first subnet is 192.168.10.0 and the broadcast address of the last subnet is 192.168.10.255. First look at the network address and broadcast address of this big C. 192.168.10.0 is its network address, and 192.168.10.255 is its broadcast address. Obviously, they are the same as the network address of the first subnet and the broadcast address of the last subnet. So how can we tell the network address of 192.168.10.0? The answer is: add the subnet mask! 192.168.10.0 255.255.255.255.0 is the network address of large C, and 192.168.10.0 255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255. 192.168.10.255 255.255.255.255.0 is the broadcast address of large C, and 192.168.10.255 255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255.255. With a mask, their two meanings will not exist. Therefore, in an environment that strictly classifies IP addresses according to TCP/IP ABCD, all 0 and 1 CIDR blocks are not allowed to be used to avoid ambiguity. This environment is called Classful. In this environment, the subnet mask is valid only in the defined vro, And the mask information cannot reach other vrouters. For example, RIP-1 does not contain mask information during route broadcast. The router that receives the route broadcast does not know the mask of the network, you have to assign a mask to the standard TCP/IP. For example, get 10. x. x. x, it is considered to be A class, and the mask is 255.0.0.0; get A 204. x. x. x, and the mask is 255.255.255.0. however, in a Classless environment, the mask always appears in pairs with the IP address. In this way, the two meanings mentioned above will not exist. Whether it is Classful or Classless depends on the routing protocol you run on the vro. A vro can run both Classful and Classless routing protocols. RIP is Classful. It does not contain mask information during route broadcast. OSPF, OSPF, and BGP4 are Classless, and they contain mask information during route broadcast, they can run on the same vro at the same time. On a CISCO router, you can use full 1 CIDR block by default, but not all 0 CIDR blocks. Therefore, when you define an IP address for a port on a CISCO router, the IP address cannot be in the full 0 CIDR block. If your configuration is correct, you will get an error message. You can use a full 0 CIDR block only after using the IP SUBNET-ZERO command. It should also be emphasized that, after using the IP SUBNET-ZERO command, if the routing protocol uses CLASSFUL (such as RIP), although your definition is successful, however, the subnet mask will not be brought to its route update message by RIP. That is, the IP SUBNET-ZERO command does not work about the routing protocol. In short, in TCP/IP, all 0 and 1 CIDR blocks cannot be used because of their two meanings. CISCO enables full 1 CIDR blocks to be used by default, but full 0 CIDR blocks can only be used after an IP SUBNET-ZERO is configured.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.