千家论坛_智能建筑与智能家居技术交流社区

标题: 用路由器连通两个不同网段局域网遇到困难,求救 [打印本页]

作者: noblame    时间: 2004-1-14 10:28
标题: 用路由器连通两个不同网段局域网遇到困难,求救
我有两个局域网A和B,分别是192.168.0.0(255.255.255.0) 和192.168.3.0(255.255.255.0).另外有cisco 2611xm 路由器一台。 由于初次接触路由器,我想尝试用路由器的一个端口连接两个局域网(用secondary). 网络结构描述如下: A和B使用同一个交换机,然后我将2611接到交换机上。并设置2611的fastethernet端口...具体配置如下: Building configuration... Current configuration : 816 bytes ! version 12.2 service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname xlxrouter ! boot system flash enable secret 5 $1$W43e$SQtiSyzIrkKzZZE7Ye3Q.. enable password ********** ! ip subnet-zero no ip source-route ! interface FastEthernet0/0 ip address 192.168.3.1 255.255.255.0 secondary ip address 192.168.0.200 255.255.255.0 no ip mroute-cache speed auto full-duplex ! interface FastEthernet0/1 no ip address ip broadcast-address 0.0.0.0 no ip mroute-cache shutdown duplex auto speed auto ! router rip version 2 redistribute connected network 192.168.0.0 network 192.168.3.0 ! ip classless no ip http server ip pim bidir-enable ! ! snmp-server community public RO ! line con 0 line aux 0 line vty 0 4 password *********** login ! ! end 然后A网的机器设置网关:192.168.0.200,B网的机器设置网关:192.168.3.1 现在的问题是:A网的机器能够ping通A网的机器,也能ping通B网的机器,一切正常,但是B网的机器只能ping通192.168.0.200,却不能ping通A网段的其他机器,请问这是什么原因?该如何解决? 很少接触路由器,不好意思给各位添麻烦了,谢谢!
作者: noblame    时间: 2004-1-14 10:49
与secondary地址有没有关系?
作者: beload    时间: 2004-1-14 11:19
你可以把fastethernet口设成子端口,每个端口分别分配一个子网不就行了, 如: int fast 0/0.1 ip address 192.168.3.1 255.255.255.0 int fast 0/0.2 ip address 192.168.0.200 255.255.255.0 而且不必启用动态路由(RIP)。
作者: noblame    时间: 2004-1-14 14:39
我在B网段的机器(192.168.3.199)上 pathping 192.168.0.1 (A网段的机器),显示经过的路径为: 0 192.168.3.199 1 192.168.0.200 2 ... 然后后面现示数据包到了192.168.0.200后就丢失了。 我在B网段的机器设置的网关为:192.168.3.1,为什么数据报不是先发到192.168.3.1上面? 既然上面已经显示数据报到了192.168.0.200了,为什么不转发到192.168.0.1? 而我在A网段的机器192.168.0.1上pathping 192.168.3.156 (B网段的机器)显示如下: 0 192.168.0.1 1 192.168.0.200 2 192.168.3.156 然后就是computing statistics for 50 seconds... 显示数据报没有任何丢失,一切正常。
作者: terles    时间: 2004-1-14 15:27
楼上的正解...不然划个2个VLAN然后通过动态路由访问也行 .
作者: noblame    时间: 2004-1-14 15:35
A中的任何一台机器都可以ping通B网中任何一台机器,而B网中的任何一台机器不能ping通A网中的任何机器。 vlan怎么划?可以详细说一下吗?
作者: ycjzg    时间: 2004-1-14 19:34
我想问题应该出在RIP的V2上吧,你在RIP上把子网掩码加上试试。




欢迎光临 千家论坛_智能建筑与智能家居技术交流社区 (http://bbs.qianjia.com/) Powered by Discuz! X3.2