本帖最后由 java510 于 2014-10-17 11:56 编辑
拓扑图如上图,做静态路由实验,首先对R1添加静态路由
r1>enable r1#configureterminal Enterconfiguration commands, one per line. End with CNTL/Z. r1(config)#iproute 2.2.2.0 255.255.255.0 12.1.1.2 r1(config)#iproute 23.1.1.0 255.255.255.0 13.1.1.3 r1(config)#ip route 3.3.3.0 255.255.255.0 13.1.1.3 现在R1可以PING通 23.1.1.3和 3.3.3.3,然后把把r1(config)#ip route 23.1.1.0 255.255.255.0 13.1.1.3 改为r1(config)#ip route 23.1.1.0 255.255.255.0 fastethernet 0/0,r1(config)#ip route 3.3.3.0 255.255.255.0 fastethernet 0/0;也就是把以太网那个网段的下一跳IP都改成本地路由接口。接着验证R1是否还可以PING通 23.1.1.3和 3.3.3.3,结果是还PING的通。 下一步:在R1 r1#show arp Protocol |Address |Age(min) |Hardware Addr Type Interface Internet 3.3.3.3 0 0001.C95A.4947 ARPA FastEthernet0/0 Internet 13.1.1.1 - 0090.0C1D.E04B ARPA FastEthernet0/0 Internet 13.1.1.3 5 0001.C95A.4947 ARPA FastEthernet0/0 Internet 23.1.1.3 3 0001.C95A.4947 ARPA FastEthernet0/0 r1#clear arp 关闭路由器R3的代理ARP R3(config)#interface fastEthernet 0/0 R3(config-if)#no ip proxy-arp 在在验证R1 PING 23.1.1.3能否通?R1 PING 3.3.3.3能否通?现在按照教材上的结果应该是PING不同的,但是我在实验中依然可以PING通,于是我开始检查,用r1#show ip route,结果显示如下:
1.0.0.0/24 is subnetted, 1 subnets C 1.1.1.0 is directly connected, Loopback0 2.0.0.0/24 is subnetted, 1 subnets S 2.2.2.0 [1/0] via 12.1.1.2 3.0.0.0/24 is subnetted, 1 subnets S 3.3.3.0 [1/0] via 13.1.1.3 is directly connected, FastEthernet0/0 12.0.0.0/24 is subnetted, 1 subnets C 12.1.1.0 is directly connected, Serial2/0 13.0.0.0/24 is subnetted, 1 subnets C 13.1.1.0 is directly connected, FastEthernet0/0 23.0.0.0/24 is subnetted, 1 subnets S 23.1.1.0 [1/0] via 13.1.1.3 is directly connected, FastEthernet0/0 个人认为问题出在S 3.3.3.0 [1/0] via 13.1.1.3 is directly connected, FastEthernet0/0 和 3.0.0.0/24 is subnetted, 1 subnets S 23.1.1.0 [1/0] via 13.1.1.3 is directly connected, FastEthernet0/0 我觉得应该是显示S 3.3.3.0 [1/0] FastEthernet0/0 S 23.1.1.0 [1/0] FastEthernet0/0 如果按照我预先的显示,只显示本地接口,不显示下一跳IP,那么肯定是应该PING不通的,我已经用r1(config)#ip route 23.1.1.0 255.255.255.0 fastethernet 0/0覆盖了r1(config)#ip route 23.1.1.0 255.255.255.0 13.1.1.3为什么这个下一跳还显示在上面呢?求解答?????或者我是那个地方做错了呢??或者想错了??????
由于论坛要对图片打标记,把R3的LOOPBACK 0接口遮住了,这个接口的IP地址为3.3.3.3/24 |