设为首页 收藏本站
查看: 1066|回复: 0

[经验分享] cisco RIP配置 汇总

[复制链接]

尚未签到

发表于 2018-7-12 14:00:56 | 显示全部楼层 |阅读模式
  今天来讲下RIP配置,希望大家多交流交流。
  拓扑图如下所示:
DSC0000.png

  R1配置如下:
  en
  conf t
  int lo0
  ip add 1.1.1.1 255.255.255.0
  int f0/0
  ip add 192.168.12.1 255.255.255.0
  no sh
  ex
  route rip
  version 2
  no auto-summary
  network 1.1.1.0
  network 192.168.12.0
  end
  R2配置如下
  en
  conf t
  int f0/0
  ip add 192.168.12.2 255.255.255.0
  no sh
  int f0/1
  ip add 192.168.23.2 255.255.255.0
  no sh
  ex
  router rip
  version 2
  no auto-summary
  network 192.168.12.0
  network 192.168.23.0
  end
  R3配置如下
  en
  conf t
  int f0/0
  ip add 192.168.23.3 255.255.255.0
  no sh
  int f0/1
  ip add 192.168.34.3 255.255.255.0
  no sh
  ex
  rouote rip
  version 2
  no auto-summary
  network 192.168.23.0
  network 192.168.34.0
  end
  R4配置如下:
  en
  conf t
  int f0/0
  ip add 192.168.34.4 255.255.255.0
  no sh
  int loopback 0
  ip add 4.4.0.4 255.255.255.0
  int loopback 1
  ip add 4.4.1.4 255.255.255.0
  int loopback 2
  ip add 4.4.2.4 255.255.255.0
  int loopback 3
  ip add 4.4.3.4 255.255.255.0
  ex
  route rip
  version 2
  no auto-summary
  network 192.168.34.0
  network 4.4.0.0
  所有路由配置完成  然后相互ping通
  我们设置的是将所有路由自动汇总关闭,首先查看一下各个路由的路由表。
  R1:
  1.0.0.0/24 is subnetted, 1 subnets
  C       1.1.1.0 is directly connected, Loopback0
  4.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
  R       4.0.0.0/8 [120/3] via 192.168.12.2, 00:00:04, FastEthernet0/0
  R       4.4.0.0/24 [120/3] via 192.168.12.2, 00:00:04, FastEthernet0/0
  R       4.4.1.0/24 [120/3] via 192.168.12.2, 00:00:04, FastEthernet0/0
  R       4.4.2.0/24 [120/3] via 192.168.12.2, 00:00:04, FastEthernet0/0
  R       4.4.3.0/24 [120/3] via 192.168.12.2, 00:00:04, FastEthernet0/0
  C    192.168.12.0/24 is directly connected, FastEthernet0/0
  R    192.168.23.0/24 [120/1] via 192.168.12.2, 00:00:04, FastEthernet0/0
  R    192.168.34.0/24 [120/2] via 192.168.12.2, 00:00:04, FastEthernet0/0
  R2:
  1.0.0.0/24 is subnetted, 1 subnets
  R       1.1.1.0 [120/1] via 192.168.12.1, 00:00:18, FastEthernet0/0
  4.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
  R       4.0.0.0/8 [120/2] via 192.168.23.3, 00:00:22, FastEthernet0/1
  R       4.4.0.0/24 [120/2] via 192.168.23.3, 00:00:22, FastEthernet0/1
  R       4.4.1.0/24 [120/2] via 192.168.23.3, 00:00:22, FastEthernet0/1
  R       4.4.2.0/24 [120/2] via 192.168.23.3, 00:00:22, FastEthernet0/1
  R       4.4.3.0/24 [120/2] via 192.168.23.3, 00:00:22, FastEthernet0/1
  C    192.168.12.0/24 is directly connected, FastEthernet0/0
  C    192.168.23.0/24 is directly connected, FastEthernet0/1
  R    192.168.34.0/24 [120/1] via 192.168.23.3, 00:00:22, FastEthernet0/1
  R3:
  1.0.0.0/24 is subnetted, 1 subnets
  R       1.1.1.0 [120/2] via 192.168.23.2, 00:00:07, FastEthernet0/0
  4.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
  R       4.0.0.0/8 [120/1] via 192.168.34.4, 00:00:33, FastEthernet0/1
  R       4.4.0.0/24 [120/1] via 192.168.34.4, 00:00:05, FastEthernet0/1
  R       4.4.1.0/24 [120/1] via 192.168.34.4, 00:00:05, FastEthernet0/1
  R       4.4.2.0/24 [120/1] via 192.168.34.4, 00:00:05, FastEthernet0/1
  R       4.4.3.0/24 [120/1] via 192.168.34.4, 00:00:05, FastEthernet0/1
  R    192.168.12.0/24 [120/1] via 192.168.23.2, 00:00:07, FastEthernet0/0
  C    192.168.23.0/24 is directly connected, FastEthernet0/0
  C    192.168.34.0/24 is directly connected, FastEthernet0/1
  R4:
  1.0.0.0/24 is subnetted, 1 subnets
  R       1.1.1.0 [120/3] via 192.168.34.3, 00:00:05, FastEthernet0/0
  4.0.0.0/24 is subnetted, 4 subnets
  C       4.4.0.0 is directly connected, Loopback0
  C       4.4.1.0 is directly connected, Loopback1
  C       4.4.2.0 is directly connected, Loopback2
  C       4.4.3.0 is directly connected, Loopback3
  R    192.168.12.0/24 [120/2] via 192.168.34.3, 00:00:05, FastEthernet0/0
  R    192.168.23.0/24 [120/1] via 192.168.34.3, 00:00:05, FastEthernet0/0
  C    192.168.34.0/24 is directly connected, FastEthernet0/0
  此时我们可以看到所有路由的路由条目上将4.4.0.0/24 4.、4.4.1.0/24、4.4.2.0/24、4.4.3.0/244个网段每个都作为一条单独的路由条目,此时比较麻烦,若我们将之汇总时怎样一种情况呢!
  我们在R4上配置
  R4:
  en
  conf t
  router rip
  auto-summary
  end
  然后清空各个路由的路由表,不然的话就得等很长时间才会看到路由表的变化。
  R1:
  en
  clear ip router * (清空后等待30秒刷新)
  show ip route
  1.0.0.0/24 is subnetted, 1 subnets
  C       1.1.1.0 is directly connected, Loopback0
  R    4.0.0.0/8 [120/3] via 192.168.12.2, 00:00:03, FastEthernet0/0
  C    192.168.12.0/24 is directly connected, FastEthernet0/0
  R    192.168.23.0/24 [120/1] via 192.168.12.2, 00:00:03, FastEthernet0/0
  R    192.168.34.0/24 [120/2] via 192.168.12.2, 00:00:03, FastEthernet0/0
  R2:
  en
  clear ip route *
  show ip route
  1.0.0.0/24 is subnetted, 1 subnets
  R       1.1.1.0 [120/1] via 192.168.12.1, 00:00:15, FastEthernet0/0
  R    4.0.0.0/8 [120/2] via 192.168.23.3, 00:00:03, FastEthernet0/1
  C    192.168.12.0/24 is directly connected, FastEthernet0/0
  C    192.168.23.0/24 is directly connected, FastEthernet0/1
  R    192.168.34.0/24 [120/1] via 192.168.23.3, 00:00:03, FastEthernet0/1
  R3:
  en
  clear ip route *
  1.0.0.0/24 is subnetted, 1 subnets
  R       1.1.1.0 [120/2] via 192.168.23.2, 00:00:40, FastEthernet0/0
  R    4.0.0.0/8 [120/1] via 192.168.34.4, 00:00:22, FastEthernet0/1
  R    192.168.12.0/24 [120/1] via 192.168.23.2, 00:00:14, FastEthernet0/0
  C    192.168.23.0/24 is directly connected, FastEthernet0/0
  C    192.168.34.0/24 is directly connected, FastEthernet0/1
  R4:
  en
  clear ip route *
  1.0.0.0/24 is subnetted, 1 subnets
  R       1.1.1.0 [120/3] via 192.168.34.3, 00:00:16, FastEthernet0/0
  4.0.0.0/24 is subnetted, 4 subnets
  C       4.4.0.0 is directly connected, Loopback0
  C       4.4.1.0 is directly connected, Loopback1
  C       4.4.2.0 is directly connected, Loopback2
  C       4.4.3.0 is directly connected, Loopback3
  R    192.168.12.0/24 [120/2] via 192.168.34.3, 00:00:16, FastEthernet0/0
  R    192.168.23.0/24 [120/1] via 192.168.34.3, 00:00:16, FastEthernet0/0
  C    192.168.34.0/24 is directly connected, FastEthernet0/0
  在R4上开启自动汇总后会发现R1、R2、R3上4.0.0.0/8的网段在路由表里面都汇总了
  大家可以看我标出的红色字体,就是汇总的条目。至于R4为什么没有汇总,因为这4个路由条目是R4直连的,且汇总时从R4的f0/0接口发出去的,且R4上汇总的话,数据发往何地R4都不清楚了。
  希望大家多指点,交流,谢谢!

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-536552-1-1.html 上篇帖子: Linux(CentOS 6.5)shell下安装Cisco *** 下篇帖子: CISCO7200 PPPOE配置
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表