英语
Subnet 子网 A small company has obtained the IP network address 199.1.2.0/24 and needs to create five subnets,each subnet capable of accommodating at least 20 hosts.Which of the following is the appropriate subnet mask?答案是255.255.255..224 如果是算host的话我懂,但是怎么算

2019-04-26

Subnet 子网
A small company has obtained the IP network address 199.1.2.0/24 and needs to create five subnets,each subnet capable of accommodating at least 20 hosts.Which of the following is the appropriate subnet mask?
答案是255.255.255..224
如果是算host的话我懂,但是怎么算subnet?
优质解答
由题目可知要有5个子网,每个子网至少能容纳20台主机.
由网络地址199.1.2.0/24可知网络前缀是24位.所以子网段加主机段为8位.
分成5个子网,则网络地址必须要拿出3位才够.
则剩下5位,能够最大容纳31台主机.大于20台.
所以网络地址视为24+3=27位.即子网掩码为255.255.255..224
(PS:这种算子网掩码的技巧是 子网掩码=网络前缀+子网段)
由题目可知要有5个子网,每个子网至少能容纳20台主机.
由网络地址199.1.2.0/24可知网络前缀是24位.所以子网段加主机段为8位.
分成5个子网,则网络地址必须要拿出3位才够.
则剩下5位,能够最大容纳31台主机.大于20台.
所以网络地址视为24+3=27位.即子网掩码为255.255.255..224
(PS:这种算子网掩码的技巧是 子网掩码=网络前缀+子网段)
相关问答