IP Subnet Mask Numbers

本文介绍了IP子网掩码的原理,它用于将互联网地址划分为子网。子网掩码通过CIDR格式(如/24)或传统掩码(如255.255.255.0)表示,确定网络地址和广播地址,并指出网络地址+1或广播地址-1通常作为互联网网关。提供了一个示例及不同掩码数值对应的IP范围。
摘要由CSDN通过智能技术生成

ZT:http://xtronics.com/reference/ip-subnetmasks.htm

IP-Subnet-Mask numbers


IP mask numbers are used to divide internet addresses into blocks called subnets. The mask number represents the number of 1s in the binary of the address that is 'masked" against the address So that it ignores the last bits which as for the group of IP addresses in the masked address. 

The first address of a subnet block (all 0s) is called the network address or network ID.  The last address (all 1s) is the broadcast address of the network. Typically the network address +1 or the broadcast address -1 is the gateway to the internet. The 'slash' notation (ie /24) is known as CIDR
format, while the more conventional 255.255.255.0 notation is considered a subnet mask.

Net bits

Subnet mask total-addresses

/20

255.255.240.0

4096

/21

255.255.248.0

2048

/22

255.255.252.0

1024

/23

255.255.254.0

512

/24

255.255.255.0

256

/25

255.255.255.128

128

/26

255.255.255.192

64

/27

255.255.255.224

32

/28

255.255.255.240

16

/29

255.255.255.248

8

/30

255.255.255.252

4

The first address of a subnet block (all 0s) is called the network address or network ID.  The last address (all 1s) is the broadcast address of the network. Typically the network address +1 or the broadcast address -1 is the gateway to the internet. This leaves us with total number of IP numbers -3 left over for host address with in a sub net block. That's why you either get 1 IP (4-3= 1) or if you ask for one mo

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值