当前位置:网站首页>VLSM variable length subnet mask partition tips
VLSM variable length subnet mask partition tips
2022-07-06 12:43:00 【Garbage bags can be hidden】
1、 Determine the number of subnets to be divided , And the internal requirements of each subnet IP The number of
For example, there are four subnets , what is needed IP The addresses are 100 individual ,60 individual ,20 individual ,10 individual ,
2、 As needed IP Determine the number of host bits occupied by each subnet
Then we can see from experience , want 100 individual IP The number of host bits allocated to the subnet of must be 7 position ,60 Yes 6 position ,20 Yes 5 position ,10 Yes 4 position .
3、 Start dividing
We must start with large subnets .
Let's say I have a C Class address 192.168.0.0, Assigned to four subnet A,B,C,D, They need IP The addresses are 100 individual ,60 individual ,20 individual ,10 individual ,
192.168.0.0~(0+127)127 Give me your address A subnet , among 192.168.0.0 It's the network number ,192.168.0.127 It's a broadcast number ( Why 0~127, Because our address distribution must be divided from the beginning , And we give A Subnet assignment 7 A host , So if 7 If all the host bits are 1, Then they are converted into decimal 127)
192.168.0.128~(128+63)191 Give me your address B subnet , among 192.168.0.128 It's the network number ,192.168.0.191 It's a broadcast number .
192.168.0.192~(192+31)223 Give me your address C subnet , among 192.168.0.192 It's the network number ,192.168.0.223 It's a broadcast number .
192.168.0.224~(224+15) Give me your address D subnet , among 192.168.0.224 It's the network number ,192.168.0.239 It's a broadcast number .
If you want to explore the number games inside, there are more things , I'm too lazy to write , But remember that there are just a few tricks :
1、 First determine the number of host bits
2、 First from IP Subnets with high demand
3、 Tips in the above address allocation Explain
What we allocate first is A subnet , Because we know that only assign it 7 Host bits can meet its IP Address requirements , And because it is the first subnet to allocate addresses , So we simply know A The starting address of the subnet is 192.168.0.0, Also because 7 Bit host bit , therefore A Of the subnet to which the subnet is assigned IP The number of addresses is 128 individual ( from 0 Starting number , Count to 127, The number is 128 individual ), The scope is 192.168.0.0 To 192.168.0.127.
Then is B subnet , If you want to play a number game here, it doesn't matter to calculate slowly , But here's the trick from the beginning , For example, the object of address allocation is B subnet , It is one of the four subnets IP The second largest subnet is required , Its need is 60 individual , We will soon know that we are going to assign it 6 Host location , because 2^6=64. Let's first make sure B The starting address of the subnet , stay A Add 1 that will do , that B The starting address of the subnet is 192.168.0.128, Then we have to make sure B The end address of the subnet , As long as 128+(64-1) that will do , among 64 yes 2^B The host bits of the subnet are calculated . Finally, we can get B The address distribution of the subnet is :192.168.0.128~192.168.0.191, among 192.168.0.128 It's the network number ,192.168.0.191 It's a broadcast number .
Then knowing this rule, we can quickly calculate the start address and end address of other subnets .
边栏推荐
- Unity3D,阿里云服务器,平台配置
- @The difference between Autowired and @resource
- Who says that PT online schema change does not lock the table, or deadlock
- MySQL performance tuning - dirty page refresh
- 基于Redis的分布式ID生成器
- JS variable types and common type conversions
- MySQL error warning: a long semaphore wait
- Force buckle 1189 Maximum number of "balloons"
- 程序设计大作业:教务管理系统(C语言)
- Classification, understanding and application of common methods of JS array
猜你喜欢
Postman 中级使用教程【环境变量、测试脚本、断言、接口文档等】
Compilation principle: preprocessing of source program and design and implementation of lexical analysis program (including code)
单片机蓝牙无线烧录
idea中好用的快捷键
Pytorch: tensor operation (I) contiguous
Pat 1097 duplication on a linked list (25 points)
NRF24L01 troubleshooting
Basic operations of databases and tables ----- view data tables
MySQL time, time zone, auto fill 0
js 变量作用域和函数的学习笔记
随机推荐
JS function promotion and declaration promotion of VaR variable
基于Redis的分布式ID生成器
[Offer18]删除链表的节点
(课设第一套)1-5 317号子任务 (100 分)(Dijkstra:重边自环)
Gateway 根据服务名路由失败,报错 Service Unavailable, status=503
(一)R语言入门指南——数据分析的第一步
JS變量類型以及常用類型轉換
Learning notes of JS variable scope and function
(五)R语言入门生物信息学——ORF和序列分析
1081 rational sum (20 points) points add up to total points
Unity3D基础入门之粒子系统(属性介绍+火焰粒子系统案例制作)
[offer18] delete the node of the linked list
Redis based distributed ID generator
记一次云服务器被密码爆破的经历——关小黑屋、改密码、改端口
[golang] leetcode intermediate - fill in the next right node pointer of each node & the k-smallest element in the binary search tree
Problèmes avec MySQL time, fuseau horaire, remplissage automatique 0
编译原理:源程序的预处理及词法分析程序的设计与实现(含代码)
MySQL time, time zone, auto fill 0
MySQL error warning: a long semaphore wait
MySQL时间、时区、自动填充0的问题