一场无路由协议引发的血案
2008-07-04 17:34
405 查看
当今,有这么一说法:“会路由者,聚天下也!”。现在好了,有人想挑战这一说法。下面是拓扑图,不起任何路由协议(静态和动态协议),想从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 shutR2的配置
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 shutR3的配置
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, Serial0R3的配置
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
嘿嘿,实验成功了,不知道还有其它方法吗?
我有二种实现方法:
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 shutR2的配置
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 shutR3的配置
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, Serial0R3的配置
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
嘿嘿,实验成功了,不知道还有其它方法吗?
相关文章推荐
- Android 4.0 中由ProGuard引发的一场血案
- 一场Socket四次握手引发的血案
- WSAPoll引发的一场血案(1)
- 由Cstring转LPWSTR而引发的一场血案
- Android 4.0 中由ProGuard引发的一场血案
- Android 4.0 中由ProGuard引发的一场血案
- 一场由过滤器Filter引发的血案
- 由Unity5.3.3f1引发的一场血案
- Gitlab:一场“删库”血案引发的反思
- 记:由opencv中的waitkey引发的一场血案
- Android 4.0 中由ProGuard引发的一场血案
- Android 4.0 中由ProGuard引发的一场血案
- 一场版本升级引发的性能血案的追凶过程
- 一场.user.ini引发的血案
- 一场由股票提醒助手插件引发的血案——浅入浅出 jquery autocomplete
- 一场版本升级引发的性能血案 - 之数据历险
- 浅谈虚拟机(1)继承引发了一场血案の实例化中的继承
- 由某云盘下载速度慢而引发的一场血案!!!
- JavaEE项目bug修复记——一场由特殊空字符(160号ASCII码)引发的血案
- PHP队列--选举引发的一场血案