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

多次有朋友问到关于ip地址的计算,通过ip地址的换算,可以反映出我们对ip地址的纯熟程,我们在做关于网络项目,都是在与ip地址打
portant; overflow-wrap: break-word !important;">多次有朋友问到关于ip地址的计算,通过ip地址的换算,可以反映出我们对ip地址的纯熟程,我们在做关于网络项目,都是在与ip地址打交道,纯熟的把握ip地址可以减少项目中出错的概率与提升工作的效率,本期弱电行业网就和大家通过这五个问题,来彻底的了解ip地址,五个关卡,你能过几关?第一关
portant; overflow-wrap: break-word !important; background-color: rgb(255, 251, 0);">portant; overflow-wrap: break-word !important; color: rgb(62, 62, 62); font-family: Optima-Regular, PingFangTC-light; font-size: 15px; letter-spacing: 0.544px; text-align: left; text-indent: 34px;">已知一个ip地址是192.168.1.1,子网掩码是255.255.255.0,那么它的网络地址是多长?
portant; overflow-wrap: break-word !important;">在了解这个问题之前,我们先需要了解下,什么是网络地址?
portant; overflow-wrap: break-word !important;">ipP地址是由两部分组成:网络地址+主机地址 。
portant; overflow-wrap: break-word !important;">网络地址可以确定ip地址的范围,ip地址其实跟身份证号比较像 。
portant; overflow-wrap: break-word !important; color: rgb(217, 33, 66);">portant; overflow-wrap: break-word !important;">一个人身份证:portant; overflow-wrap: break-word !important;">共18位:
portant; overflow-wrap: break-word !important;">前6位表示的是省、市、县区;
portant; overflow-wrap: break-word !important;">7到14位表示是出生年月,
portant; overflow-wrap: break-word !important;">15、16位表示是派出所 。
portant; overflow-wrap: break-word !important;">第17位是性别 。
portant; overflow-wrap: break-word !important;">而网络号就是相称于身份证的省、市、县区 。
portant; overflow-wrap: break-word !important;">那么如何来算出网络地址呢?
portant; overflow-wrap: break-word !important; font-size: 15px;">具体计算
portant; overflow-wrap: break-word !important; font-size: 15px;">将ip地址192.168.1.1转换为二进制
portant; overflow-wrap: break-word !important; font-size: 15px;">11000000.10101000.00000001.00000001portant; overflow-wrap: break-word !important; font-size: 15px;">
portant; overflow-wrap: break-word !important; font-size: 15px;">将子网掩码255.255.255.0转换成二进制
portant; overflow-wrap: break-word !important; font-size: 15px;">11111111.11111111.11111111.00000000
portant; overflow-wrap: break-word !important; font-size: 15px;">然后将两者相“与(and)运算:
portant; overflow-wrap: break-word !important; font-size: 15px;">inkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; letter-spacing: 0.544px; box-sizing: border-box !important; overflow-wrap: break-word !important;">11000000.inkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; letter-spacing: 0.544px; box-sizing: border-box !important; overflow-wrap: break-word !important;">10101000.inkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; letter-spacing: 0.544px; box-sizing: border-box !important; overflow-wrap: break-word !important;">00000001.inkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; letter-spacing: 0.544px; box-sizing: border-box !important; overflow-wrap: break-word !important;">00000001portant; overflow-wrap: break-word !important; font-size: 15px;">
portant; overflow-wrap: break-word !important; font-size: 15px;">11111111.11111111.11111111.00000000
portant; overflow-wrap: break-word !important; font-size: 15px;">然后得到:
portant; overflow-wrap: break-word !important; font-size: 15px;">inkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; letter-spacing: 0.544px; box-sizing: border-box !important; overflow-wrap: break-word !important;">11000000.10101000.00000001.00000000
portant; overflow-wrap: break-word !important; font-size: 15px;">转换成网络地址就是:192.168.1.0
第二关
portant; overflow-wrap: break-word !important; color: rgb(62, 62, 62); font-family: Optima-Regular, PingFangTC-light; font-size: 15px; letter-spacing: 0.544px; text-align: left; text-indent: 34px; background-color: rgb(255, 251, 0);">已知某主机的ip地址是192.168.100.200,子网掩码为255.255.255.192,其网络内可用的ip地址个数为多长?
portant; overflow-wrap: break-word !important; font-size: 15px;">具体计算
portant; overflow-wrap: break-word !important; font-size: 15px;">将子网掩码255.255.255.192转换为二进制