⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 subject_39108.htm

📁 一些关于vc的问答
💻 HTM
字号:
<p>
序号:39108 发表者:xiongli 发表日期:2003-05-08 10:40:56
<br>主题:变长子网掩码如何路由?
<br>内容:我对变长子网掩码比较迷惑:<BR><BR>比如我的局域网里面有两个掩码不同的子网,掩码分别是<BR>255.255.255.11 000000<BR>255.255.255.111 00000<BR><BR>一台具有路由功能的电脑,两块分处在这两个子网下面,ip设定如下<BR><BR>192.168.1.00 100000&nbsp;&nbsp; submask:255.255.255.11 000000<BR>192.168.1.001 11100&nbsp;&nbsp; submask:255.255.255.111 00000<BR><BR>现在如有有一个ip报,不管是路由转法还是本机发出,比如要访问192.168.1.00101000<BR>因为192.168.1.00101000即可以看成<BR>192.168.1.00 101000<BR>也可以看成<BR>192.168.1.001 01000<BR>那么他应该如何决定192.168.1.00101000到底是属于哪一个子网呢?<BR>是通过路由表的先后来设定的吗?<BR><BR>谢谢大家<BR><BR><BR>
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:Neil Gan 回复日期:2003-05-08 11:04:18
<br>内容:Very interesting, I discussed the same question with one of my colleagues 12 hours ago. I have the theory knowledge of TCP/IP and he is a Net Admin.<BR><BR>Our problem is: The ISP gave us a set of address: 1.2.3.0/255.255.255.0 and he wants to use it as two subnets, one contains several computers and the other contains many.<BR><BR>My solution is: put two entries to the route table of the router: one is 255.255.255.240 and the interface is to the smaller subnet, the other is 255.255.255.0 and the interface is to the larger one. The key is the order of these two entries, 255.255.255.240 goes first. That means: "1.all chinese come here 2. all human being go there" because 2 is the later one, it actually says "all non-chinese human being goes there".<BR><BR>The same two entries also need to be added to all the computers in these two subnets.<BR><BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -