# 13. IP address and subnet partitioning (VLSM)

2022-06-23 17:51:22

1、ip The role of address

The network address used to identify a node

2、2 Base number

3、2-10 Base conversion

Calculate by short division 10 Binary forwarding 2 Base number

2 Binary exchange 10 Base number

4、IP Composition and classification of addresses

bit The smallest unit in a computer ,1bit It's equal to... In binary 1

8bit( position )=Byte（ byte ）

D class IP Address is used for multicast

E class IP For scientific research

Used to identify network bits , The same network bits can communicate with each other （ On the same network ）

A class 255.0.0.0

B class 255.255.0.0

C class 255.255.255.0

Two 、 Divide subnets

1、 The role of subnets

By setting the subnet mask side length , Divide a large network into several small networks （ save IP, Narrow the broadcast domain ）

2、 How to divide subnets

Information before subnet partition

The Internet 172.168.0.0 Mask 255.255.0.0

There are... In this network 2^16-2 individual IP Address , But it is rare to use so many in a network IP, Then we divide the network into several subnets .

Information after subnetwork partition

The mask changes to 255.255.255.0

Number of subnets 2^8-2=254( The subnet number cannot be all 0 Or all 1. When the subnet numbers are all 0 Is the first subnet , But it has the same network number as the whole network , The broadcast address of the last subnet is the same as that of the whole network , In the past, some principles seemed to be something RFC-95 It is specified that the subnet number cannot be all 0 Or all 1, To prevent the router from being unrecognized . But today's routers are basically ready to use , However, some books do not emphasize that the subnet numbers are all 0 Or all 1 Is it available . In the exam all 0 And all 1 The subnet number of is OK .)

The network is divided into 172.16.1.0、172.16.2.0、172.16.3.0…… 172.168.254.0

3、VLSM（ Variable length subnet mask ）

Keep at least... In the variable length subnet mask 2 Host location

Calculate the number of subnets 2^x x Is the number of subnets

Calculate the number of hosts 2^y-2 y Is the host bit number

4、 Fast subnet partition

How many subnets will this selected subnet mask generate ？

How many legal host numbers are available in this subnet ？

What is the legal subnet number of CPPCC ？

What is the broadcast address of each subnet ？

In each subnet , Those legitimate host numbers ？

5、 Allow all 0 whole 1 Subnet segment

IP subnet zero

12 Cisco devices of the above versions are started by default

show running-config You can see the configuration

https://chowdera.com/2022/01/202201051711021393.html