azl397985856 / fe-interview

宇宙最强的前端面试指南 (https://lucifer.ren/fe-interview)
Apache License 2.0
2.84k stars 260 forks source link

【每日一题】– 2019-10-21 - 某主机的IP地址为202.117.131.12/20,其子网掩码是多少 #44

Closed azl397985856 closed 5 years ago

azl397985856 commented 5 years ago

头条面试题

HEternally commented 5 years ago

'/'后面的数字表示子网掩码的位数; 202.117.131.12/20代表前20位代表网络号,后12位代表主机号; 前20位全1,后12位全零的IP地址为255.255.240.0(子网掩码) 把主机号全换成1就是202.117.137.12/20的最多主机数ip地址,范围为:202.117.137.12-202.117.207.255

azl397985856 commented 5 years ago

关于子网掩码的介绍可以看这里 https://lucifer.ren/fe-interview/#/./topics/network/net-mask