当前位置:网站首页>IP address and subnet division
IP address and subnet division
2022-08-05 06:13:00 【Magic star】
IPThe division of addresses and subnets
一级目录
二级目录
三级目录
IP地址
IPWhat is the address and what it does
IPAn address is an inInternetThe address on which the host is uniformly addressed
格式,也称为网络协议(IP协议)地址.
It assigns a logic to every network and every host on the Internet
地址,Two computers need to communicate,都需要有一个ip地址 虚拟地址,网络中的每台设备 ,Each host must have a unique oneIP地址.
IP地址分类
ipv6:2001:0db8:3c4d:0015:0000:0000:1a2f:1a2b
IPv6由128位二进制组成,由八个16 位字段组成,相邻
字段用冒号分隔.
ipv4:in computer binary,1个字节 = 8位 = 8bit(比特),IP地址(IPv4)由32位二进制数组成,分为4段(4个字节),每一段为8位二进制数(1个字节)
11111111.11111111.11111111.11111111
255.255.255.255
IP地址的组成

IP地址分类

- A、B、C类——单播IP地址、可以配置PC、网络设备、接口
- 网络段:When the host is all for0是网段
- 广播地址:当主机位全为1是广播地址

私网地址
The private network address refers to the internal network or hostIP地址,不直接用于互联网,通常在局域网中使用.
- A类地址:10.0.0.0~10.255.255.255
- B类地址:128.16.0.0~172.31.255.255
- C类地址:192.168.0.0~192.168.255.255
特殊地址
- 0.0.0.0:不是一个真正意义上的IP地址,It represents all hosts and destination networks
- 255.255.255.255:限制广播地址.对本机来说,这个地址指本网段内(同一广播域)的所有主机
- 127.0.0.1~127.255.255.254 (127.1):本机回环地址,主要用于测试.The destination address should never appear on a transmission meson“127.0.0.1”的数据包
- 224.0.0.0~239.255.255.255:组播地址,224.0.0.1特指所有主机,224.0.0.2特指所有路由器.224.0.0.5指OSPF路由器,The address is mostly used for some specific programs and multimedia programs
- 169.255.x.x:如果Windows主机使用了DHCP自动分配IP地址,而又无法从DHCP服务器获取地址,系统会为主机分配这样地址
netmask子网掩码
32位(ipv4)或128位(ipv6)的数字,和IP成对使用,用来确认IP地址中的网络ID和主机ID,The bits corresponding to the network1,对应主机ID的位为0,
范例:255.255.255.0,
Indicates that the consecutive high bits are1,Consecutive low bits are0
作用:Distinguish between network segments and host bits
相关公式:
- The number of all available hosts for a network=2^主机ID位数 -2
- 网络(段)数=2^网络ID中可变的位数
- 网络ID=IP与netmask做与运算(Can be seen as multiplication)
判断对方主机是否在同一网段:
A:192.168.1.1/24
B:192.168.1.33/27
主机A与主机B能否通信?
A:192.168.1.00000001
A的网络id为:192.168.1.0
B:33=32+1
192.168.1.001 00001
192.168.1.111 00000
192.168.1.001 00000
B的网络id为:192.168.1.32
A、B网络id不同,所以无法通信
总:Use your own subnet mask separately and your ownIPand the oppositeIP相与,比较结果,相同则同一网络,不同则不同网段
子网划分


例1:192.168.1.0/24,equally divided among the four departments(Four subnetworks
段)使用 256
写出 The scope of each network segment、网络地址、广播地址 .
答:256/4=64=2^6
So the phase host bit is borrowed2位
192.168.1.00 000000
网段范围:192.168.1.1~192.168.1.63 网络地址:192.168.1.0 广播地址:192.168.1.64
192.168.1.01 000000
网段范围:192.168.1.64~192.168.1.127 网络地址:192.168.1.64 广播地址:192.168.1.128
192.168.1.10 000000
网段范围:192.168.1.128~192.168.1.191 网络地址:192.168.1.128 广播地址:192.168.1.192
192.168.1.11 000000
网段范围:192.168.1.192~192.168.1.254 网络地址:192.168.1.192 广播地址:192.168.1.255
边栏推荐
- spark source code-RPC communication mechanism
- VRRP principle and command
- 调用TensorFlow Objection Detection API进行目标检测并将检测结果保存至本地
- Apache配置反向代理
- Servlet跳转到JSP页面,转发和重定向
- spark operator-parallelize operator
- Call the TensorFlow Objection Detection API for object detection and save the detection results locally
- [Day8] Commands involved in using LVM to expand
- The spark operator - coalesce operator
- TensorFlow ObjecDetectionAPI在win10系统Anaconda3下的配置
猜你喜欢
D45_摄像机组件Camera

【Day1】(超详细步骤)构建软RAID磁盘阵列

dsf5.0新建页面访问时重定向到首页的问题

Autoware中安装Yolo3目标检测模块遇到的问题
时间复杂度和空间复杂度
![[Day6] File system permission management, file special permissions, hidden attributes](/img/ec/7fb3fa671fac8abf389844c0f4fbe7.png)
[Day6] File system permission management, file special permissions, hidden attributes

lvm logical volume and disk quota

The problem of redirecting to the home page when visiting a new page in dsf5.0

正则表达式小实例--验证邮箱地址

网络布线与数制转换
随机推荐
无影云桌面
spark source code - task submission process - 1-sparkSubmit
To TrueNAS PVE through hard disk
Cocos Creator开发中的事件响应
vim的三种模式
dsf5.0 弹框点确定没有返回值的问题
硬核!Cocos开发面试必备十问,让你offer拿到手软
千亿IT运维市场,产品要凭实力说话
OpenCV3.0 is compatible with VS2010 and VS2013
spark算子-wholeTextFiles算子
网站ICP备案是什么呢?
ROS video tutorial
入门文档11 自动添加版本号
Spark source code - task submission process - 4-container to start executor
云计算——osi七层与TCP\IP协议
[Pytorch study notes] 8. How to use WeightedRandomSampler (weight sampler) when the training category is unbalanced data
Image compression failure problem
Unity3D中的ref、out、Params三种参数的使用
VRRP原理及命令
D45_摄像机组件Camera