The relationship between IP address and subnet mask

Subnet mask is used to determine the IP address of any two computers is the same sub-network basis.

The most simple is the two computers to understand their own IP address and subnet mask for the AND operation, if the result is the same, then the two computers are in the same sub-network, direct communication can be . It's that simple.

Consider the following example:

Operational demonstration of: aa

IP address 192.168.0.1

Subnet Mask 255.255.255.0

Be converted into binary operations:

IP Address 11010000.10101000.00000000.00000001

Subnet mask 11111111.11111111.11111111.00000000

AND operation

11000000.10101000.00000000.00000000
After conversion to decimal:

192.168.0.0

Presentation of the two operations:

IP address 192.168.0.254

Subnet Mask 255.255.255.0

Be converted into binary operations:

IP Address 11010000.10101000.00000000.11111110

Subnet mask 11111111.11111111.11111111.00000000

AND operation

11000000.10101000.00000000.00000000
After conversion to decimal:

192.168.0.0

Presentation of the three operations:

IP address 192.168.0.4

Subnet Mask 255.255.255.0

Be converted into binary operations:

IP Address 11010000.10101000.00000000.00000100

Subnet mask 11111111.11111111.11111111.00000000

AND operation

11000000.10101000.00000000.00000000

After conversion to decimal:

192.168.0.0

Through the above three groups of computer IP address and subnet mask AND operation, we can see that it is the same as the result of the operation. Are 192.168.0.0

So this computer will be the same as three sub-networks computer, and then to communicate.

分类:Internet 时间:2011-08-14 人气:308
分享到:
blog comments powered by Disqus

相关文章

  • Ip address subnet mask, and the relationship between the special purpose of the IP address & description 2010-06-22

    Subnet mask is used to determine the IP address of any two computers is the same sub-network basis. The most simple is the two computers to understand their own IP address and subnet mask AND operation, if the result is the same, it indicates that th

  • 为什么局域网的IP普遍是192.168开头? 2015-02-15

    IPv4地址分为A.B.C.D.E五类,出去特殊作用的D.E两类,剩下的A.B.C三类地址是我们常见的IP地址段.A类地址的容量最大,可以容纳16777214个主机,B类地址可以容纳65534个主机,C类地址可以容纳254个主机. 在这三类地址中,绝大多数的IP地址都是 公有地址,需要向国际互联网信息中心申请注册.但是在IPv4地址协议中预留了3个IP地址段,作为 私有地址,供组织机构内部使用. 这三个地址段分别位于A.B.C三类地址内: A类地址:10.0.0.0--10.255.255.25

  • Discuz 5.0 中读取纯真IP数据库函数分析 2014-02-14

    Discuz 5.0 不在使用自己的IP数据,而是使用纯真IP的数据格式, 存取纯真IP数据库稍微有点麻烦,它的存储格式比较特殊也很有趣,具体的格式分析参考下面两个链接,其他语言实现参考文章末的链接. <纯真IP数据库格式详解> 链接一:http://blog.csdn.net/heiyeshuwu/archive/2006/05/12/725675.aspx 链接二:http://lumaqq.linuxsir.org/article/qqwry_format_detail.html 纯真I

  • Router of 192.168.1.1 2010-03-19

    MAC MAC (Media Access Control, Medium Access Control ) MAC address is burning in the Network Interface Card (NIC, NIC) inside. MAC address, also known as the hardware address is 48 bits long (6 bytes), 16 hex .0-23 bit numbers assigned by the manufac

  • mysql odbc does not recognize 192.168.1.22 2011-07-14

    Today, the reverse with the power designer mysql database and found that actually can not establish 192.168.1.22 mysql odbc data source, reports: Connection Fialed: [HY000] [MySQL] [ODBC 5.1 Driver] Access denied for user 'xxx' @ '192 .168. 19.105 '(

  • Authorized to resolve Host '192 .168.1.180 'is not allowed to connect to this MySQL server 2011-04-19

    Authorized to resolve Host '192 .168.1.180 'is not allowed to connect to this MySQL server GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY' mypassword 'WITH GRANT OPTION

  • RROR 1045 (28000): Access denied for user 'root' @ '192 .168.2.12 (using password: 2011-04-21

    This is a mysql permissions not reported on a solution: 1, landing mysql, mysql-uroot-hlocalhost-p 2, use mysql (must be the library system) 3, update user set host = '%' where user = 'root'; (can be anonymous and no password will be able to clear the lan

  • ubuntu 11.10 eclipse svn https://192.168.1.225:... 2012-05-29

    如题 在ubuntu下svn 连接本来好好的,后来svn迁移,切换到https下面的,然后在添加新资源库的时候报ssl shake hands fail....RA错误 等错误吧. 解决办法 :windon->preferences->Team->SVN ,SVN 接口处 Client 选择 SVNKit(Pure Java) ..... .原来此处选择的subclipse推荐的javaHL(JNI).... ..OK 确定 再次添加新资源库即可 .

  • 弹出界面 eth0: Determining if ip address 192.168.232.1 2014-04-16

    题记: Linux网络配置 #执行重启网络命令 [root@node2 桌面]# service network restart 显示如下信息: 解决方案: 1.在Linux ip配置文件中添加如下语句: ARPCHECK=no 2.重启网络,解决问题.

iOS 开发

Android 开发

Python 开发

JAVA 开发

开发语言

PHP 开发

Ruby 开发

搜索

前端开发

数据库

开发工具

开放平台

Javascript 开发

.NET 开发

云计算

服务器

Copyright (C) codeweblog.com, All Rights Reserved.

CodeWeblog.com 版权所有 黔ICP备15002463号-1

processed in 0.286 (s). 12 q(s)