IP subnet division

A specific step of subnetting

192.168.1.0/24 is known, divided into eight sub (ip divided into eight sub-a, i.e., the network is no longer a 24 bit)
1100 0000.1010 1000.0000 0001.0000 0000
1 transcriptions bit original network ( ip same network segment, the network must be the same position )
1100 0000.1010 1000.0000 0001
2 bit extension network (subnet bits), all the changes written
1100 0000.1010 1000.0000 0001 000
1100 0000.1010 1000.0000 0001 001
1100 0000.1010 1000.0000 0001 010
1100 0000.1010 1000.0000 0001 011
1100 0000.1010 1000.0000 0001 100
1100 0000.1010 1000.0000 0001 101
1100 0000.1010 1000.0000 0001 110
1100 0000.1010 1000.0000 0001 111
3, the host bits are all zero padding, to fill a full
1100 0000.1010 1000.0000 0000.1010 1000.0000 0,001,000,000,001,100 0001.00011111
192.168.1 0 to 31 ( all-zero address for the network-wide broadcast address 1 ) is therefore available ip 192.168.1.1 ~ 30 (hereinafter the same)

1100 0000.1010 1000.0000 0000.1010 1000.0000 0,001,001,000,001,100 0001.00111111
192.168.1 32 to 63

1100 0000.1010 1000.0000 0000.1010 1000.0000 0,001,010,000,001,100 0001.01011111
192.168.1 64 95

1100 0000.1010 1000.0000 0000.1010 1000.0000 0,001,011,000,001,100 0001.01111111
192.168.1 96 ~ 127

1100 0000.1010 1000.0000 0000.1010 1000.0000 0,001,100,000,001,100 0001.10011111
192.168.1 . 128 to 159

1100 is 0000.1010 1000.0000 0000.1010 1000.0000 0,001,101,000,001,100 0001.10111111
192.168.1. 160 - 191

1100 0000.1010 1000.0000 0000.1010 1000.0000 0,001,110,000,001,100 0001.11011111
192.168.1. 192 to 223.

1100 0000.1010 1000.0000 0000.1010 1000.0000 0,001,111,000,001,100 0001.11111111
192.168.1. 224 to 255

so that subnets are eight
192.168.1.0/27
192.168. 1.0 0000.1010 1000.0000 binary representation 1100 000100100000 5 I host bits, 2 ^ 5 = 32 allows only the subnet hosts 32
192.168.1.32/27
192.168.1.64/27
192.168.1.96/27
192.168.1.128/27
192.168.1.160/27
192.168.1.192/27
192.168.1.224/27

Two, ip classification

Category A (1 to 126)

Class (128 ~ 191) B

Class (192 ~ 223) C

Class D (224 ~ 239) Multicast

Class E (240 to 255) Research

Third, the private ip and subnet mask (private ip our most contact)

Class A: 10.0.0.0 ~ 10.255.255.255 255.0.0.0

Class B: 172.16.0.0 ~ 172.31.255.255 255.255.0.0

Class C: 192.168.0.0 ~ 192.168.255.255 255.255.255.0

Four, IP network segment, bits of the same network

Case: 192.168.91.1 and 192.168.90.1 is in the same network segment?

1100 0000.1010 1000.0101 1001.0000 0001

1111 1111.1111 1111.1111 1111.0000 0000

And operation (by multiplication)

The results of 1100 0000.1010 1000.0101 1001 .0000 0000

1100 0000.1010 1000.0101 1000.0000 0001

1111 1111.1111 1111.1111 1111.0000 0000

Results: 1100 0000.1010 1000.0101 1000 .0000 0000

After ip and subnet mask of the operation, they are not comparing the same network segment.

 

Guess you like

Origin www.cnblogs.com/zjz20/p/11304411.html