RIP传递默认路由的5种方法_第1页
RIP传递默认路由的5种方法_第2页
RIP传递默认路由的5种方法_第3页
RIP传递默认路由的5种方法_第4页
RIP传递默认路由的5种方法_第5页
已阅读5页,还剩4页未读, 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、RIP传递默认路由的5种方法5.jpg (18.98 KB2009-7-28 08:14在一个单出口网络内启用RIP协议,在网络出口处的路由器需要向RIP域内传播一条默认路由,这样,域内的路由器就可以通过默认路由访问外部网络。下面我们就用试验来模拟这个环境。到目前为止;通过RIP传递默认路由共有5种方法。1 default-information2 手工写一条默认路由(到NULL0) 然后重分布到RIP中3 手工写一条默认路由(到NULL0) 在进程中宣告4 ip default-network5 在接口汇总 0.0.0.0/0 到NULL0的路由*以下内容需要回复才能看到一 路由器基本配置R

2、1interface Loopback0ip address 1.1.1.1 255.255.255.0interface Serial1/0ip address 12.0.0.1 255.255.255.0router ripversion 2network 1.0.0.0network 12.0.0.0no auto-summaryR2interface Serial1/0ip address 12.0.0.2 255.255.255.0interface Serial1/1ip address 23.0.0.2 255.255.255.0router ripversion 2networ

3、k 2.0.0.0network 12.0.0.0no auto-summaryR3interface Serial1/0ip address 23.0.0.3 255.255.255.0*二 方法1 default-informationr2#sh run | b r rrouter ripversion 2network 2.0.0.0network 12.0.0.0default-information originateno auto-summaryr1#sh ip rou1.0.0.0/24 is subnetted, 1 subnetsC 1.1.1.0 is directly c

4、onnected, Loopback012.0.0.0/24 is subnetted, 1 subnetsC 12.0.0.0 is directly connected, Serial1/0R* 0.0.0.0/0 120/1 via 12.0.0.2, 00:00:09, Serial1/0 /可以看到这时在R1上产生了一条默认路由r1#ping 23.0.0.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 23.0.0.2, timeout is 2 seconds:!Success rate is 10

5、0 percent (5/5, round-trip min/avg/max = 28/41/68 ms此外,在default-information originate可以调用一个route-map来匹配一个接口或路由,当这个路由有效的时候才会传递默认路由。首先我们在R2上建立一个loopback接口,并将它宣告到RIP中,然后用ACL来匹配这个接口,建立route-map调用这个ACL,最后在 default-information originate命令后调用这个route-mapR2access-list 1 permit 2.2.2.2route-map WY permit 10ma

6、tch ip address 1r2#sh run | b r rrouter ripversion 2network 2.0.0.0network 12.0.0.0default-information originate route-map WYno auto-summaryr1#sh ip rou1.0.0.0/24 is subnetted, 1 subnetsC 1.1.1.0 is directly connected, Loopback02.0.0.0/32 is subnetted, 1 subnetsR 2.2.2.2 120/1 via 12.0.0.2, 00:00:02

7、, Serial1/012.0.0.0/24 is subnetted, 1 subnetsC 12.0.0.0 is directly connected, Serial1/0R* 0.0.0.0/0 120/1 via 12.0.0.2, 00:00:02, Serial1/0 /这时R2向R1传递了一条默认路由r2(config#int lo0r2(config-if#shutdown /这时我们将loopback接口关闭r1#sh ip rou1.0.0.0/24 is subnetted, 1 subnetsC 1.1.1.0 is directly connected, Loopb

8、ack012.0.0.0/24 is subnetted, 1 subnetsC 12.0.0.0 is directly connected, Serial1/0这时,R2不向R1传递默认路由,因为loopback接口关闭,ACL失效,route-map失效,所以 default-information originate命令不执行下面我们在R2,R3之间启用EIGRP,在R3上起一个loopback接口,并宣告到EIGRP中,这时R2可以学习到 3.3.3.0,在R2上建立ACL匹配从R3学习到的这条路由,随后建立route-map并调用ACL,同样最后在R2的RIP进程中的 defaul

9、t-information originate命令后面调用这个route-map。r2#sh run | b r erouter eigrp 90network 23.0.0.0 0.0.0.255no auto-summaryr3#sh run | b r erouter eigrp 90network 3.3.3.0 0.0.0.255network 23.0.0.0 0.0.0.255no auto-summaryr2#sh ip rou1.0.0.0/24 is subnetted, 1 subnetsR 1.1.1.0 120/1 via 12.0.0.1, 00:00:05, Se

10、rial1/02.0.0.0/32 is subnetted, 1 subnetsC 2.2.2.2 is directly connected, Loopback03.0.0.0/24 is subnetted, 1 subnetsD 3.3.3.0 90/2297856 via 23.0.0.3, 00:01:42, Serial1/123.0.0.0/24 is subnetted, 1 subnetsC 23.0.0.0 is directly connected, Serial1/112.0.0.0/24 is subnetted, 1 subnetsC 12.0.0.0 is di

11、rectly connected, Serial1/0R2access-list 1 permit 3.3.3.0 0.0.0.255route-map WY permit 10match ip address 1R2router ripversion 2network 12.0.0.0default-information originate route-map WYno auto-summaryr1#sh ip rou1.0.0.0/24 is subnetted, 1 subnetsC 1.1.1.0 is directly connected, Loopback012.0.0.0/24

12、 is subnetted, 1 subnetsC 12.0.0.0 is directly connected, Serial1/0R* 0.0.0.0/0 120/1 via 12.0.0.2, 00:00:01, Serial1/0 /这时R2向R1传递一条默认路由r3(config#int lo0r3(config-if#shutdown /在R3上关闭这个loopback接口r1#sh ip rou1.0.0.0/24 is subnetted, 1 subnetsC 1.1.1.0 is directly connected, Loopback012.0.0.0/24 is sub

13、netted, 1 subnetsC 12.0.0.0 is directly connected, Serial1/0R2不再向R1传递默认路由,同样因为loopback接口失效,导致 default-information originate命令不执行方法2 手工写一条默认路由(到NULL0)然后重分布到RIP中r2(config#ip route 0.0.0.0 0.0.0.0 null 0 /在R2上建立一条默认路由r2(config-router#redistribute static /重分布静态路由到RIP中r1#sh ip rou1.0.0.0/24 is subnetted,

14、 1 subnetsC 1.1.1.0 is directly connected, Loopback012.0.0.0/24 is subnetted, 1 subnetsC 12.0.0.0 is directly connected, Serial1/0R* 0.0.0.0/0 120/1 via 12.0.0.2, 00:00:02, Serial1/0 /这时,R2向R1传递一条默认路由方法3 手工写一条默认路由(到NULL0)在进程中宣告r2(config#ip route 0.0.0.0 0.0.0.0 null 0r2#sh run | b r rrouter ripversi

15、on 2network 12.0.0.0network 0.0.0.0 /将这条默认路由宣告到R2的RIP进程中no auto-summaryr1#sh ip rou1.0.0.0/24 is subnetted, 1 subnetsC 1.1.1.0 is directly connected, Loopback012.0.0.0/24 is subnetted, 1 subnetsC 12.0.0.0 is directly connected, Serial1/0R* 0.0.0.0/0 120/1 via 12.0.0.2, 00:00:07, Serial1/0 /R2向R1传递默认

16、路由方法4 ip default-networkr2(config#ip default-network 23.0.0.0 /建立一个缺省网络r1#sh ip rou1.0.0.0/24 is subnetted, 1 subnetsC 1.1.1.0 is directly connected, Loopback012.0.0.0/24 is subnetted, 1 subnetsC 12.0.0.0 is directly connected, Serial1/0R* 0.0.0.0/0 120/1 via 12.0.0.2, 00:00:09, Serial1/0 /R2向R1传递默认路由方法5 在接口汇总 0.0.0.0/0 到NULL0的路由r2(config#ip route 0.0.0.0 0.0.0.0 null 0 /先建立一条默认路由r2#sh run int s1/0interface Serial1/0ip address 12.0.0.2 255.255.255.0ip summary-address rip 0.0.0.0 0.0.0.0 /在接口上手工汇总这条默认路由r1#sh ip

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论