1 / 9

子网掩码与子网的划分

子网掩码与子网的划分. 与运算. 运算规则: 相与的两个数都为 1 ,结果为 1 ,否则结果就为 0 。 例如: 1 与 1=1 1 与 0=0 0 与 1=0 0 与 0=0. 子网掩码的作用. 计算机是通过将子网掩码与 IP 地址相 “ 与运算 ” 来区分出计算机的网络号和主机号。 例如: IP 地址为: 210.41.237.10 ,其子网掩码为 255.255.255.0 ,则进行如下 “ 与运算 ” : IP: 11010010.00101001.11101101.00001010

alexis
Télécharger la présentation

子网掩码与子网的划分

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 子网掩码与子网的划分

  2. 与运算 • 运算规则: 相与的两个数都为1,结果为1,否则结果就为0。 • 例如: 1与1=1 1与0=0 0与1=0 0与0=0

  3. 子网掩码的作用 • 计算机是通过将子网掩码与IP地址相“与运算”来区分出计算机的网络号和主机号。 • 例如:IP地址为:210.41.237.10,其子网掩码为255.255.255.0,则进行如下“与运算”: IP:11010010.00101001.11101101.00001010 M :11111111.11111111.11111111.00000000 与: 11010010.00101001.11101101.00000000 反: 00000000.00000000.00000000.00001010

  4. 子网的划分 • 什么时候需要划分子网? 当需要将一个给定的网络划分为各个互不相关的网络时,就需要划分子网。 • 怎样划分子网? 将IP地址中的主机号部分再拿出某几位来作为网络号,剩下的部分作为主机号。

  5. 划分子网的实例 • 例如:现给定一个C类网210.41.237.X,此时X代表从1—254。由于有四个不同的部门要使用这段IP,为了不让各个部门之间相互干扰,我们需要将原来给出的一个网络划分为四个子网,以使得各个子网间互不影响。

  6. 确定各子网IP • IP:11010010.00101001.11101101.xxxxxxxx 我们将IP地址的主机部分中(8位) xxxxxxxx拿出前面2位来作为我们的子网网络号部分,因此用作主机的位数就只有剩下的6位。 00xxxxxx:00000001----00111110 1--62 01xxxxxx:01000001----01111110 65--126 10xxxxxx:10000001----10111110 129--190 11xxxxxx:11000001----11111110 193--254

  7. 确定子网掩码 由于我们将原来IP地址中主机号的前两位用来作为了网络号部分,因此,为了让计算机能知道这两位是网络号,所以我们需要将相应的子网掩码中对应的这两位设置为1。 IP:11010010.00101001.11101101.00001010 M :11111111.11111111.11111111.11000000 最后我们得到的子网掩码即为: 255.255.255.192 (非标准类型)

  8. 划分的结果 • 第一个子网: IP:210.41.237.(1—62) M: 255.255.255.192 • 第二个子网: IP:210.41.237.(65—126) M: 255.255.255.192 • 第三个子网: IP:210.41.237.(129—190) M: 255.255.255.192 • 第一个子网: IP:210.41.237.(193—254) M: 255.255.255.192

  9. 思考与练习 • 如果要划分6个子网怎么办? • 如果要考虑特殊的IP怎么办?

More Related