问题
lets say I have 136.181.0.0 /16 and I want to divide it into eleven subnets
I got /19? First it was /16 which has only 1 subnet (actually when subnetting is not yet applied, it is still called Network Address). Borrow 1 bit from the host bits, you get /17 with two subnets. Borrow another one then you'll get 4 subnets and a prefix of 18. Borrow another bit then you get 8 subnets with /19 as the CIDR.
not sure about 9th,10th and 11th on here..
1st 136.181.0.0/19
2nd 136.181.32.0/19
3rd 136.181.64.0/19
4th 136.181.96.0/19
5th 136.181.128.0/19
6th 136.181.160.0/19
7th 136.181.192.0/19
8th 136.181.224.0/19
9th 136.181.224.1/19
10th 136.181.224.33/19
11th 136.181.224.65/19
回答1:
136.181.0.0/16 (255.255.0.0)
(N = Network, S = Subnet, H = Host)
10001000.10110101.00000000.00000000
NNNNNNNN.NNNNNNNN.HHHHHHHH.HHHHHHHH
NNNNNNNN.NNNNNNNN.SSSSHHHH.HHHHHHHH
01: 136.181.00000000.00000000/19 (136.181.0.0)
02: 136.181.00010000.00000000/19 (136.181.16.0)
03: 136.181.00100000.00000000/19 (136.181.32.0)
04: 136.181.00110000.00000000/19 (136.181.48.0)
05: 136.181.01000000.00000000/19 (136.181.64.0)
06: 136.181.01010000.00000000/19 (136.181.80.0)
07: 136.181.01100000.00000000/19 (136.181.96.0)
08: 136.181.01110000.00000000/19 (136.181.112.0)
09: 136.181.10000000.00000000/19 (136.181.128.0)
10: 136.181.10010000.00000000/19 (136.181.144.0)
11: 136.181.10100000.00000000/19 (136.181.160.0)
12: 136.181.10110000.00000000/19 (136.181.176.0)
13: 136.181.11000000.00000000/19 (136.181.192.0)
14: 136.181.11010000.00000000/19 (136.181.208.0)
15: 136.181.11100000.00000000/19 (136.181.224.0)
16: 136.181.11110000.00000000/19 (136.181.240.0)
You want 11 subnets, so you need 4 subnet bits creating 16 (2^4) subnets with 4094 (2^12-2) usable host addresses.
回答2:
As we require 11 subnets, we require 4 bits from the host side into the network side.
Number of bits on the network side is 20.
01: 136.181.00000000.00000000/20 (136.181.0.0)
02: 136.181.00010000.00000000/20 (136.181.16.0)
03: 136.181.00100000.00000000/20 (136.181.32.0)
04: 136.181.00110000.00000000/20 (136.181.48.0)
05: 136.181.01000000.00000000/20 (136.181.64.0)
06: 136.181.01010000.00000000/20 (136.181.80.0)
07: 136.181.01100000.00000000/20 (136.181.96.0)
08: 136.181.01110000.00000000/20 (136.181.112.0)
09: 136.181.10000000.00000000/20 (136.181.128.0)
10: 136.181.10010000.00000000/20 (136.181.144.0)
11: 136.181.10100000.00000000/20 (136.181.160.0)
Wasted IP Address = 5 * 2^12.
来源:https://stackoverflow.com/questions/19191608/how-to-divide-a-network-into-eleven-subnets