当前位置:网站首页>Class A, B, C networks and subnet masks in IPv4
Class A, B, C networks and subnet masks in IPv4
2022-07-06 03:59:00 【yanwu_ nuc】
Reference article
Reference article
When two computers connected to a network communicate with each other , The packets they transmit contain some additional information , These additional information is the address of the computer that sends the data and the address of the computer that receives the data . When the network exists with IP Protocol based communication , These addresses for sending and receiving data are IP Address .
The following are involved IP All addresses are Ipv4 Of 32 position IP Address
IP Address format :IP Address = network address + The host address
IP Address according to network address Mainly can be divided into A、B、C Three types of address
1. A class IP Address
One A class IP Address by 1 Byte network address and 3 Byte host address composition , The highest bit of the network address must be “0”, Address range from 1.0.0.0 To 126.0.0.0. Usable A There are 126 individual , Every network can hold 1 More than 100 million hosts .
2. B class IP Address
One B class IP Address by 2 Byte network address and 2 Byte host address composition , The highest bit of the network address must be “10”, Address range from 128.0.0.0 To 191.255.255.255. Usable B There are 16382 individual , Every network can hold 6 More than ten thousand hosts .
3. C class IP Address
One C class IP Address by 3 Byte network address and 1 Byte host address composition , The highest bit of the network address must be “110”. Range from 192.0.0.0 To 223.255.255.255.C Class network up to 209 More than a , Every network can hold 254 Host computer .
Subnet mask (subnet mask):
The subnet mask is a 32 Bit address , For shielding IP Part of the address to distinguish between a network ID and a host ID , The subnet mask cannot exist alone , It has to be combined with IP Address used together .
Function of subnet mask :
1、 For shielding IP Part of the address to distinguish between a network ID and a host ID , Only Network identity The same two hosts can communicate with each other without routing .
The subnet mask must match IP Address to use . For common Networks A、 B、C class IP The binary and decimal correspondence of the default subnet mask of the address is shown in the table 1 Shown .
The working process of subnet mask is : take 32 Bit subnet mask and IP Address carries out bitwise logic in binary form “ And ” The result of the operation is the network address , Sum the result of the subnet mask binary non with IP Address binary logic “ And ”(AND) operation , What you get is the host address .
Such as :192.168.10.11 AND 255.255.255.0, The result is 192.168.10.0, The meaning of its expression is : The IP The address belongs to 192.168.10.0 The network , Its host number is 11, That is, the number in this network is 11 The host .
2、 The second is to put a big IP The network is divided into several small subnetworks .
In order to better manage the network in the intranet , Network administrators also take advantage of the subnet mask , Artificially divide a larger intranet into more small subnets , recycling Three layer switch The routing function of realizes the interconnection of subnets , So as to effectively solve the network broadcast storm and network virus and many other network management problems .
The subnet mask mechanism provides a method for subnet partition . Its effect is : Reduce traffic on the network ; save IP Address ; Easy to manage ; Solve some problems of the physical network itself . After using the subnet mask to divide the subnets , Communication is possible in the subnet , Cannot communicate across subnets , Routers should be used for communication between subnets , And correctly configure the static routing information . Divide subnets , You should follow the rules of subnet partition structure . Is to use continuous 1 stay IP Add the network address in the address , At the same time, reduce the number of bits representing the host address .
for example ,IP The address is 130.39.37.100, The network address is 130.39.37.0、 The subnet address is 130.39.37.0、 The subnet mask is 255.255.255.0, The network address part and the subnet identification part are “1” Corresponding , The host identification part is “0” Corresponding . Use CIDR Expressed as :130.39.37.100/24 namely IP Address / Mask length . On the third byte 255 The corresponding 8 Bit binary value is to lend the host address bits to the network address part , Acts as the number of bits for dividing subnets .
边栏推荐
- Custom event of C (31)
- AcWing 243. A simple integer problem 2 (tree array interval modification interval query)
- Scalpel like analysis of JVM -- this article takes you to peek into the secrets of JVM
- Hashcode and equals
- C language circular statement
- 使用JS完成一个LRU缓存
- [practical exercise] face location model based on skin color
- Ipv4中的A 、B、C类网络及子网掩码
- 【Qt5】Qt QWidget立刻出现并消失
- [FPGA tutorial case 11] design and implementation of divider based on vivado core
猜你喜欢
Data analysis Seaborn visualization (for personal use)
[PSO] Based on PSO particle swarm optimization, matlab simulation of the calculation of the lowest transportation cost of goods at material points, including transportation costs, agent conversion cos
[introduction to Django] 11 web page associated MySQL single field table (add, modify, delete)
Multi project programming minimalist use case
自动化测试怎么规范部署?
Thread sleep, thread sleep application scenarios
Facebook and other large companies have leaked more than one billion user data, and it is time to pay attention to did
mysql关于自增长增长问题
MySQL master-slave replication
math_极限&微分&导数&微商/对数函数的导函数推导(导数定义极限法)/指数函数求导公式推导(反函数求导法则/对数求导法)
随机推荐
Cf464e the classic problem [shortest path, chairman tree]
Redis (replicate dictionary server) cache
Développement d'un module d'élimination des bavardages à clé basé sur la FPGA
mysql关于自增长增长问题
On Data Mining
Alibaba testers use UI automated testing to achieve element positioning
DM8 archive log file manual switching
Viewing and verifying backup sets using dmrman
LTE CSFB test analysis
Failure causes and optimization methods of LTE CSFB
[adjustable delay network] development of FPGA based adjustable delay network system Verilog
判断当天是当月的第几周
Flask learning and project practice 8: introduction and use of cookies and sessions
In Net 6 CS more concise method
Tips for using dm8huge table
Serial port-rs232-rs485-ttl
Blue Bridge Cup - day of week
UDP reliable transport protocol (quic)
/usr/bin/gzip: 1: ELF: not found/usr/bin/gzip: 3: : not found/usr/bin/gzip: 4: Syntax error:
Ethernet port &arm & MOS &push-pull open drain &up and down &high and low sides &time domain and frequency domain Fourier