1.0 concept
Subnets are divided into subnets by borrowing some host bits of an IP address to act as subnet addresses.
A subnet is A group of small networks formed when A large class A,B, and C network is further divided. Each network has its own address
Subnet mask * * * * is a 32-bit hexadecimal number 2, its corresponding [IP address] (http://baike.baidu.com/item/%E7%BD%91%E7%BB%9C%E5%9C%B0%E5%9D%80) all position is 1, All positions corresponding to the host address are 0.
So the class A network’s default [subnet mask] (http://baike.baidu.com/item/%E5%AD%90%E7%BD%91%E6%8E%A9%E7%A0%81) is 255.0.0.0, class B network default subnet mask is 255.255.0.0, The default subnet mask for a Class C network is 255.255.255.0. Perform logical “and” operation on the subnet mask and IP address by bit to obtain the network address of the IP address, and the remaining part is the host address, so as to distinguish the network address and host address of any IP address.
2.0 the principle
When a subnet is divided, the number of subnets increases as the number of hosts to which the subnet address is borrowed increases, but the number of available hosts in each subnet decreases. Class C network, for example, the original eight host, 2 the eighth of the 256 host address (http://baike.baidu.com/item/%E4%B8%BB%E6%9C%BA%E5%9C%B0%E5%9D%80), The default subnet mask 255.255.255.0 (http://baike.baidu.com/item/%E5%AD%90%E7%BD%91%E6%8E%A9%E7%A0%81). Borrow one [host] (http://baike.baidu.com/item/%E4%B8%BB%E6%9C%BA), to produce 2 subnets, 126 host addresses per subnet. Borrow 2 host bits to generate 4 subnets, each with 62 host addresses…… On each network, the first AND last IP addresses (all host IP addresses are 0) and the last IP addresses (all host IP addresses are 1) cannot be assigned to hosts. Therefore, the number of available IP addresses on each subnet is the total number of IP addresses minus 2. According to the subnet ID to borrow from the host digits, we can calculate the number of subnets, divided into [mask] (http://baike.baidu.com/item/%E6%8E%A9%E7%A0%81), the number of host addresses per subnet
3.0 problem sets
Divide class C network 192.168.25.0 into four subnets and verify the subnet masks and available IP address ranges by setting IP addresses and network masks on the local computer.
Use dichotomy, borrow n bits from the host, can get 2^n-2 subnets, because of the class c address so, there are 2^8=256 subnets, divided into four [0,64],[64,128],[128,192],[192,256] remove the broadcast address, and the IP address is not available.
Used by Cisco Cropacket
—————————— Subnet mask. If there is no special instruction, MY experiment is 255.255.255.192 crossover lines are used for devices of the same type, and straight-through lines are used for devices of different types
4.0 Run the ping command
1.0 Subnet connectivity test.
2.0 Switch connectivity Test.
3.0 Router Connectivity test.
Details, please baidu, Google
© East wind cold snow. Date: May 15, 2017.