当前位置:网站首页>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
边栏推荐
- 腾讯云消息队列CMQ
- ACL 和NAT
- Spark source code - task submission process - 6-sparkContext initialization
- 运维工程师,快来薅羊毛
- 入门文档07 分阶段输出
- 交换机原理
- 2020年手机上最好的25种免费游戏
- [Day6] File system permission management, file special permissions, hidden attributes
- spark operator-textFile operator
- Spark源码-任务提交流程之-6.1-sparkContext初始化-创建spark driver端执行环境SparkEnv
猜你喜欢
随机推荐
[Day5] Soft and hard links File storage, deletion, directory management commands
腾讯内部技术:《轩辕传奇》服务器架构演变
Getting Started Doc 06 Adding files to a stream
D39_坐标转换
lvm logical volume and disk quota
【Day8】Knowledge about disk and disk partition
Three modes of vim
调用TensorFlow Objection Detection API进行目标检测并将检测结果保存至本地
spark source code - task submission process - 5-CoarseGrainedExecutorBackend
I217-V在openwrt软路由下大流量断网问题
Getting Started Document 09 Standalone watch
D41_缓冲池
静态路由
PVE 直通硬盘到TrueNAS
js动态获取屏幕宽高度
spark operator-textFile operator
CIPU,对云计算产业有什么影响
spark operator - map vs mapPartitions operator
【Day1】VMware软件安装
spark源码-任务提交流程之-4-container中启动executor