当今,有这么一说法:“会路由者,聚天下也!”。现在好了,有人想挑战这一说法。下面是拓扑图,不起任何路由协议(静态和动态协议),想从R2的S0Ping通R3的S0。怎么做呢?




我有二种实现方法:

1)把R2和R3的路由关掉,做UNIX下工作站使用
R1的配置
R1(config)#int s0
R1(config-if)#ip add 192.1.12.1 255.255.255.0
R1(config-if)#clock rate 64000
R1(config-if)#no shut
R1(config-if)#int s1
R1(config-if)#ip add 192.1.13.1 255.255.255.0
R1(config-if)#clock rate 64000
R1(config-if)#no shut
R2的配置
R2(config)#no ip routing                                          //关闭路由功能
R2(config)#ip default-gateway 192.1.12.1                  //指向默认网关
R2(config)#int s0
R2(config-if)#ip add 192.1.12.2 255.255.255.0
R2(config-if)#no shut
R3的配置
R3(config)#no ip routing                                          //关闭路由功能
R3(config)#ip default-gateway 192.1.13.1                  //指向默认网关
R3(config)#int s0
R3(config-if)#ip add 192.1.13.2 255.255.255.0
R3(config-if)#no shut
测试下:
R2#ping 192.1.13.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.1.13.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 168/20
查看一下R2的路由表
R2#sh ip route
Default gateway is 192.1.12.1
Host               Gateway           Last Use    Total Uses  Interface
ICMP redirect cache is empt
查看一下R3的路由表
R3#sh ip route
Default gateway is 192.1.13.1
Host               Gateway           Last Use    Total Uses  Interface
ICMP redirect cache is empt
2)利用子网掩码的不同来实现
R2的配置
R2(config)#int  s0
R2(config-if)#ip add 192.1.12.2 255.255.0.0              //注意子网掩码
R2(config-if)#no shut
R2的路由表
R2#sh ip route
Gateway of last resort is not set
C 192.1.0.0/16 is directly connected, Serial0
R3的配置
R3(config)#int  s0
R3(config-if)#ip add 192.1.13.2 255.255.0.0               //注意子网掩码
R3(config-if)#no shut
R3的路由表
R3#sh ip route
Gateway of last resort is not set
C 192.1.0.0/16 is directly connected, Serial0           
R1的配置
R1(config)#int s0
R1(config-if)#ip add 192.1.12.1 255.255.255.0           //注意子网掩码
R1(config-if)#clock rate 64000
R1(config-if)#no shut
R1(config-if)#int s1
R1(config-if)#ip add 192.1.13.1 255.255.255.0           //注意子网掩码
R1(config-if)#clock rate 64000
R1(config-if)#no sh
R1的路由表
R1#sh ip route
Gateway of last resort is not set
C    192.1.12.0/24 is directly connected, Serial1/0
C    192.1.13.0/24 is directly connected, Serial1/1
测试下
R2#ping 192.1.13.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.1.13.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 144/205/264 ms

嘿嘿,实验成功了,不知道还有其它方法吗?