📄 00000003.htm
字号:
<HTML><HEAD> <TITLE>BBS水木清华站∶精华区</TITLE></HEAD><BODY><CENTER><H1>BBS水木清华站∶精华区</H1></CENTER>发信人: omega (leo), 信区: Linux <BR>标 题: Re: [求助]子网配置: 与omega讨论 <BR>发信站: BBS 水木清华站 (Sun Sep 21 15:18:12 1997) <BR> <BR>【 在 aguest (aguest) 的大作中提到: 】 <BR>∶<I> 想和omega兄讨论一下子网问题 </I><BR>∶<I> 1:如果router的两块网卡的ip, netmask分别设为 </I><BR>∶<I> A: XXX.XXX.XXX.A, 255.255.255.0 (外部) </I><BR>∶<I> b: XXX.XXX.XXX.B, 255.255.255.240 (内部) </I><BR>∶<I> 由于内部的ip的前部分xxx.xxx.xxx与外部的相同,那么由netmask </I><BR>∶<I> 判断,内部的ip显然也属于外部网址,如果没有优先级之类的分辨 </I><BR>∶<I> 方法,显然存在冲突。这种变长子网,在linux上已经实现了吗? </I><BR>∶<I> 这样造成的子网冲突如何解决? </I><BR>/sbin/route add -net XXX.XXX.XXX.B netmask 255.255.255.240 dev eth0 or eth1 <BR>the problem is with the external part, it is safer to do <BR>/sbin/route add -net XXX.XXX.XXX.0 netmask 255.255.255.240 dev eth1 or eth0 <BR>/sbin/route add -net XXX.XXX.XXX.16 netmask 255.255.255.240 dev eth1 or eth0 <BR>and so on <BR>∶<I> 2: 如果上级router不改变路由表,他就不知道存在子网B, 则必然 </I><BR>∶<I> arp得不到正确的子网内机器的mac地址。如果proxy arp能使上级 </I><BR>∶<I> 路由将所有送到子网B的包都送到该router, 然后再转给子网内的 </I><BR>∶<I> 机器。设proxy arp时相关router的设置有什么? </I><BR>∶<I> 请omega详细解释一下 </I><BR>you can use arp proxy like this <BR>/sbin/arp -s XXX.XXX.XXX.XXX.b <mac addr. of the card in external part> \ <BR>netmask 255.255.255.240 pub <BR> <BR>That is to tell all hosts in the department network that your A card should <BR>answer for subnet B. <BR> <BR>Any the way is to use ip_masquerating, in this case the external network will <BR>not see your subnet, external hosts consider they are talking just with your <BR>subnet router. <BR> <BR>Depends what exactly you want to do, if you want to restrict the access to <BR>external netwaork and protecting your subnet, the ip_masquerating is better. <BR> <BR>If you just want to ensure Inetrnet access to hosts on your subnet, an easier <BR>way is to set your router as a IP bridge, Linux supports is. In this case all <BR>the hosts on your subnet act just as the was directly connected to the <BR>deparment network. <BR> <BR>Good luck! <BR> <BR>-- <BR>※ 来源:·BBS 水木清华站 bbs.net.tsinghua.edu.cn·[FROM: pics16.cis.PKU.] <BR><CENTER><H1>BBS水木清华站∶精华区</H1></CENTER></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -