您的位置:首页 > 其它

HP DL 140 G3磁盘阵列的配置

2011-05-30 08:29 609 查看
ip classless 可以改变路由选路的方式,那具体对实际的应用有什么影响呢?网上流传的版本挺多,但是通过自己的实验发现其实他们说的都不是太全面,官方文档也找不出适合的解释,还是通过实验找到了自己想要的答案,下面就和大家分享下我做的实验吧
一. 实验目的
通过实验验证 Ip classless 和no ip classless 对路由选路的影响
二. 实验拓扑



三. 实验配置
在这里只给了主要配置,地址在图中已经标明了,也不用浪费篇幅了。
R12(config)#ip route 0.0.0.0 0.0.0.0 16.16.16.1

四. 验证结果
R12#show ip route
10.0.0.0/24 is subnetted, 3 subnets
C 10.3.1.0 is directly connected, Loopback2
C 10.2.1.0 is directly connected, Loopback1
C 10.1.1.0 is directly connected, Loopback0
C 16.16.16.0/24 is directly connected, Serial0
S* 0.0.0.0/0 [1/0] via 16.16.16.1

R16#show ip route
10.0.0.0/24 is subnetted, 1 subnets
C 10.4.1.0 is directly connected, Loopback0
11.0.0.0/24 is subnetted, 1 subnets
C 11.4.1.0 is directly connected, Loopback1
C 16.16.16.0/24 is directly connected, Serial0

① 在R12上关闭ip classless
R12(config)#no ip class
R12(config)#end
R12#ping 10.4.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.4.1.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)

R12#
R12#debug ip pac
IP packet debugging is on
R12#ping 10.4.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.4.1.1, timeout is 2 seconds:

00:10:37: IP: s=10.1.1.1 (local), d=10.4.1.1, len 100, unroutable.
00:10:39: IP: s=10.1.1.1 (local), d=10.4.1.1, len 100, unroutable.
00:10:41: IP: s=10.1.1.1 (local), d=10.4.1.1, len 100, unroutable.
00:10:43: IP: s=10.1.1.1 (local), d=10.4.1.1, len 100, unroutable.
00:10:45: IP: s=10.1.1.1 (local), d=10.4.1.1, len 100, unroutable.
Success rate is 0 percent (0/5)

② 在R12上开启ip classless
R12(config)#ip class
R12(config)#end
R12#
00:11:03: %SYS-5-CONFIG_I: Configured from console by console
R12#ping 10.4.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.4.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 40/40/44 ms
R12#
00:11:11: IP: s=16.16.16.2 (local), d=10.4.1.1 (Serial0), len 100, sending
00:11:12: IP: s=10.4.1.1 (Serial0), d=16.16.16.2 (Serial0), len 100, rcvd 3
00:11:12: IP: s=16.16.16.2 (local), d=10.4.1.1 (Serial0), len 100, sending
00:11:12: IP: s=10.4.1.1 (Serial0), d=16.16.16.2 (Serial0), len 100, rcvd 3
00:11:12: IP: s=16.16.16.2 (local), d=10.4.1.1 (Serial0), len 100, sending
00:11:12: IP: s=10.4.1.1 (Serial0), d=16.16.16.2 (Serial0), len 100, rcvd 3
00:11:12: IP: s=16.16.16.2 (local), d=10.4.1.1 (Serial0), len 100, sending
00:11:12: IP: s=10.4.1.1 (Serial0), d=16.16.16.2 (Serial0), len 100, rcvd 3
00:11:12: IP: s=16.16.16.2 (local), d=10.4.1.1 (Serial0), len 100, sending
00:11:12: IP: s=10.4.1.1 (Serial0), d=16.16.16.2 (Serial0), len 100, rcvd 3

五. 结论
①关闭ip classless 之后,首先路由器会在自己的路由表寻找隶属的标准网段,如果找到自己隶属的标准网段,就在此标准网段里找是否有适合自己的路由条目,如果符合就转发,不符合就会丢弃,就算配置了默认路由也不会使用。
②开启ip classless 之后,如果路由器找不到隶属的标准网段,就会使用默认路由进行转发。
但是做过实验验证的会发现,和上面的结果不一样,那就是IOS版本的问题了

经过我做实验发现,在V12.3和其之前的版本:结果和上面的一致,关闭ip classless 之后不会向外发包,

但 是版本V12.4就变了,关闭 ip classless之后,数据包还往是会往外发,只不过默认ping包发送的源地址是环回接口,并不是正常的送出接口。这时候如果对端配置了回来的路由, 就依旧可以ping通。但是在对端没有路由的情况下,关闭ip classless就不可以ping通了。这就是为什么对方配置了静态路由,自己也关闭了ip classless还是可以ping通的原因!

好了,问题解决了!希望对大家有所帮助!

原创文章如转载,请注明:转载自free的网络工程师博客 [ http://www.free1990.com/ ]

本文链接地址:http://www.free1990.com/cisco/19.html本文出自 “我的博客” 博客,请务必保留此出处http://chinafree.blog.51cto.com/1370932/480348
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: