portant; overflow-wrap: break-word !important; font-size: 15px;">一个A类ip地址的子网掩码是255.2。从这五个问题,来彻底了解ip地址的计算( 三 )。" />

从这五个问题,来彻底了解ip地址的计算( 三 )


第四关
portant; overflow-wrap: break-word !important; background-color: rgb(255, 251, 0);">portant; overflow-wrap: break-word !important; font-size: 15px;">一个A类ip地址的子网掩码是255.255.240.0,共有几位被用来划分子网?portant; overflow-wrap: break-word !important; font-size: 15px;">且可以划分多长个子网?每个子网ip地址数量是多长?
portant; overflow-wrap: break-word !important; font-size: 15px;">具体计算
portant; overflow-wrap: break-word !important; font-size: 15px;">将子网掩码255.255.240.0转换为二进制
portant; overflow-wrap: break-word !important; font-size: 15px; letter-spacing: 0.544px;">11111111.11111111.11110000.00000000
portant; overflow-wrap: break-word !important; font-size: 15px; letter-spacing: 0.544px;">子网掩码共有20位,而一个A类的ip地址的子网掩码是8位,即有12位被用来划分子网 。
portant; overflow-wrap: break-word !important; font-size: 15px; letter-spacing: 0.544px;">所以子网数为:2的12次方=4096个子网 。
portant; overflow-wrap: break-word !important; color: rgb(217, 33, 66);">portant; overflow-wrap: break-word !important; font-size: 15px;">那么每个子网的主机数是多长呢?
portant; overflow-wrap: break-word !important; font-size: 15px; letter-spacing: 0.544px;">因为ip地址为32位,网络号已为20位,则主机数12位 。portant; overflow-wrap: break-word !important; font-size: 15px; letter-spacing: 0.544px;">每个子网中的ip数量为portant; overflow-wrap: break-word !important; letter-spacing: 0.544px;">2^12=4096,但是能够分配给计算机使用的只有4096-2=4094个,(减去一个网络地址与一个广播地址) 。
第五关
portant; overflow-wrap: break-word !important; background-color: rgb(255, 251, 0);">portant; overflow-wrap: break-word !important; color: rgb(0, 0, 0); font-size: 15px;">10.135.255.19/255.255.255.248的广播地址是什么?
portant; overflow-wrap: break-word !important; font-size: 15px;">计算思路,要得到广播,先得出网络地址,然后把网络地址的主机位全换成1,便就是广播地址 。
portant; overflow-wrap: break-word !important; font-size: 15px;">具体计算
portant; overflow-wrap: break-word !important; font-size: 15px;">将ip地址10.135.255.19转换为二进制
portant; overflow-wrap: break-word !important; font-size: 15px;">00001010.10001001.11111111.00010011
portant; overflow-wrap: break-word !important; font-size: 15px;">将子网掩码255.255.255.248转换成二进制
portant; overflow-wrap: break-word !important; font-size: 15px;">11111111.11111111.11111111.11111000
portant; overflow-wrap: break-word !important; font-size: 15px;">然后将两者相“与(and)运算:
portant; overflow-wrap: break-word !important; font-size: 15px;">portant; overflow-wrap: break-word !important; letter-spacing: 0.544px;">00001010.10001001.11111111.portant; overflow-wrap: break-word !important; letter-spacing: 0.544px;">00010011
portant; overflow-wrap: break-word !important; font-size: 15px;">11111111.11111111.11111111.11111000
portant; overflow-wrap: break-word !important; font-size: 15px;">然后得到:
portant; overflow-wrap: break-word !important; font-size: 15px;">portant; overflow-wrap: break-word !important; letter-spacing: 0.544px;">00001010.10001001.11111111.portant; overflow-wrap: break-word !important; letter-spacing: 0.544px;">00010000
portant; overflow-wrap: break-word !important; font-size: 15px;">转换成网络地址就是:10.135.255.16
portant; overflow-wrap: break-word !important; font-size: 15px;">那么广播地址是多长呢?portant; overflow-wrap: break-word !important; font-size: 15px;">
portant; overflow-wrap: break-word !important; font-size: 15px;">从子网掩码可以看出,这个子网掩码是29位 。
portant; overflow-wrap: break-word !important; font-size: 15px; color: rgb(217, 33, 66);">11111111.11111111.11111111.11111portant; overflow-wrap: break-word !important; font-size: 15px;">000
portant; overflow-wrap: break-word !important; font-size: 15px;">也就是主机数还有3位可用 。portant; overflow-wrap: break-word !important; font-size: 15px; color: rgb(217, 33, 66);">portant; overflow-wrap: break-word !important; letter-spacing: 0.544px;">00001010.10001001.11111111.00010portant; overflow-wrap: break-word !important; font-size: 15px;">000
portant; overflow-wrap: break-word !important; font-size: 15px;">把网络地址的后面三个零全换成1 。
【从这五个问题,来彻底了解ip地址的计算】portant; overflow-wrap: break-word !important; font-size: 15px;">即可得出广播地址为:portant; overflow-wrap: break-word !important; font-size: 15px; letter-spacing: 0.544px;">10.135.255.2portant; overflow-wrap: break-word !important; font-size: 15px; letter-spacing: 0.544px;">3