设为首页 收藏本站
查看: 1216|回复: 1

[经验分享] Cisco RIPv2汇总实验

[复制链接]

尚未签到

发表于 2018-7-17 09:36:00 | 显示全部楼层 |阅读模式
实验内容:  1.路由器的基本配置
  R1上的基本配置
  interface Loopback1
  ip address 1.1.1.1 255.255.255.0
  !
  (为了测试RIPV2的汇总我们在这里起用了5个环回接口)
  interface Loopback2
  ip address 10.1.1.1 255.255.255.0
  !
  interface Loopback3
  ip address 10.1.2.1 255.255.255.0
  !
  interface Loopback4
  ip address 10.1.3.1 255.255.255.0
  !
  interface Loopback5
  ip address 10.1.4.1 255.255.255.0
  !
  interface Loopback6
  ip address 10.1.5.1 255.255.255.0
  !
  interface Ethernet0
  ip address 192.168.10.1 255.255.255.0
  interface Serial0
  ip address 192.168.2.1 255.255.255.0
  clockrate 64000
  R2上的基本配置
  interface Serial0
  ip address 192.168.3.1 255.255.255.0
  clockrate 64000
  !
  interface Serial1
  ip address 192.168.2.2 255.255.255.0
  R3上的基本配置
  interface Loopback0
  ip address 3.3.3.3 255.255.255.0
  !
  interface Ethernet0
  ip address 192.168.10.2 255.255.255.0
  !
  interface Serial0
  no ip address
  shutdown
  !
  interface Serial1
  ip address 192.168.3.2 255.255.255.0
  2.配置RIP,并提升为v2版本,为各个路由器起RIP
  将RIP提升为V2版本的命令如下:
  router(config )#router rip
  router(config-route)#version 2
  R1上的RIP配置
  router rip
  version 2(注:比较与RIPV1的不同,此处多了一个version 2)
  network 1.0.0.0
  network 10.0.0.0
  network 192.168.2.0
  network 192.168.10.0
  R2上的RIP配置
  router rip
  version 2
  network 192.168.2.0
  network 192.168.3.0
  R3上的RIP配置
  router rip
  version 2
  network 3.0.0.0
  network 192.168.3.0
  network 192.168.10.0
  3.查看此时的路由表
  R1上的路由表
  R1#show ip route
  Codes: C - connected, S - static, I - IGRP, R - RIP, M  - mobile, B - BGP
  D - EIGRP, EX - EIGRP external, O - OSPF, IA -  OSPF inter area
  N1 - OSPF NSSA external type 1, N2 - OSPF NSSA  external type 2
  E1 - OSPF external type 1, E2 - OSPF external type  2, E - EGP
  i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2,  ia - IS-IS inter area
  * - candidate default, U - per-user static route, o  - ODR
  P - periodic downloaded static route
  Gateway of last resort is not set
  1.0.0.0/24 is subnetted, 1 subnets
  C          1.1.1.0 is directly connected, Loopback1
  R       3.0.0.0/8 [120/1] via 192.168.10.2, 00:00:02,  Ethernet0
  C       192.168.10.0/24 is directly connected, Ethernet0
  10.0.0.0/24 is subnetted, 5 subnets
  C          10.1.3.0 is directly connected, Loopback4
  C          10.1.2.0 is directly connected, Loopback3
  C          10.1.1.0 is directly connected, Loopback2
  C          10.1.5.0 is directly connected, Loopback6
  C          10.1.4.0 is directly connected, Loopback5
  C       192.168.2.0/24 is directly connected, Serial0
  R       192.168.3.0/24 [120/1] via 192.168.2.2, 00:00:11,  Serial0
  R2上的路由表
  R2#show ip route
  Codes: C - connected, S - static, I - IGRP, R - RIP, M -  mobile, B - BGP
  D - EIGRP, EX - EIGRP external, O - OSPF, IA -  OSPF inter area
  N1 - OSPF NSSA external type 1, N2 - OSPF NSSA  external type 2
  E1 - OSPF external type 1, E2 - OSPF external type  2, E - EGP
  i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2,  ia - IS-IS inter area
  * - candidate default, U - per-user static route, o  - ODR
  P - periodic downloaded static route
  Gateway of last resort is not set
  R       1.0.0.0/8 [120/1] via 192.168.2.1, 00:00:02, Serial1
  R       3.0.0.0/8 [120/1] via 192.168.3.2, 00:00:29, Serial0
  R       192.168.10.0/24 [120/1] via 192.168.2.1, 00:00:02,  Serial1
  R       10.0.0.0/8 [120/1] via 192.168.2.1, 00:00:02,  Serial1
  C       192.168.2.0/24 is directly connected, Serial1
  C       192.168.3.0/24 is directly connected, Serial0
  R3上的路由表
  R3#show ip route
  Codes: C - connected, S - static, I - IGRP, R - RIP, M -  mobile, B - BGP
  D - EIGRP, EX - EIGRP external, O - OSPF, IA -  OSPF inter area
  N1 - OSPF NSSA external type 1, N2 - OSPF NSSA  external type 2
  E1 - OSPF external type 1, E2 - OSPF external type  2, E - EGP
  i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2,  ia - IS-IS inter area
  * - candidate default, U - per-user static route, o  - ODR
  P - periodic downloaded static route
  Gateway of last resort is not set
  R       1.0.0.0/8 [120/1] via 192.168.10.1, 00:00:04,  Ethernet0
  3.0.0.0/24 is subnetted, 1 subnets
  C          3.3.3.0 is directly connected, Loopback0
  C       192.168.10.0/24 is directly connected, Ethernet0
  R       10.0.0.0/8 [120/1] via 192.168.10.1, 00:00:04,  Ethernet0
  R       192.168.2.0/24 [120/1] via 192.168.3.1, 00:00:13,  Serial1
  C       192.168.3.0/24 is directly connected, Serial1
  因为RIPV2汇总默认是启动的,所以我们在这里看到,在R2上还是汇总以后的路由表。
  4.R1上去掉自动路由汇总,然后观察路由表
  去掉路由自动汇总的命令:
  router(config)#router rip
  router(config-route)#no auto-summary
  此时再看路由表
  R1上的路由表
  R1#show ip route
  Codes: C - connected, S - static, I - IGRP, R - RIP, M  - mobile, B - BGP
  D - EIGRP, EX - EIGRP external, O - OSPF, IA -  OSPF inter area
  N1 - OSPF NSSA external type 1, N2 - OSPF NSSA  external type 2
  E1 - OSPF external type 1, E2 - OSPF external type  2, E - EGP
  i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2,  ia - IS-IS inter area
  * - candidate default, U - per-user static route, o  - ODR
  P - periodic downloaded static route
  Gateway of last resort is not set
  1.0.0.0/24 is subnetted, 1 subnets
  C          1.1.1.0 is directly connected, Loopback1
  R       3.0.0.0/8 [120/1] via 192.168.10.2, 00:00:02,  Ethernet0
  C       192.168.10.0/24 is directly connected, Ethernet0
  10.0.0.0/24 is subnetted, 5 subnets
  C          10.1.3.0 is directly connected, Loopback4
  C          10.1.2.0 is directly connected, Loopback3
  C          10.1.1.0 is directly connected, Loopback2
  C          10.1.5.0 is directly connected, Loopback6
  C          10.1.4.0 is directly connected, Loopback5
  C       192.168.2.0/24 is directly connected, Serial0
  R       192.168.3.0/24 [120/1] via 192.168.2.2, 00:00:11,  Serial0
  R2上的路由表
  R2#show ip route
  Codes: C - connected, S - static, I - IGRP, R - RIP, M -  mobile, B - BGP
  D - EIGRP, EX - EIGRP external, O - OSPF, IA -  OSPF inter area
  N1 - OSPF NSSA external type 1, N2 - OSPF NSSA  external type 2
  E1 - OSPF external type 1, E2 - OSPF external type  2, E - EGP
  i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2,  ia - IS-IS inter area
  * - candidate default, U - per-user static route, o  - ODR
  P - periodic downloaded static route
  Gateway of last resort is not set
  1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
  R          1.1.1.0/24 [120/1] via 192.168.2.1, 00:00:01,  Serial1
  R          1.0.0.0/8 [120/2] via 192.168.3.2, 00:00:01,  Serial0
  R       3.0.0.0/8 [120/1] via 192.168.3.2, 00:00:01, Serial0
  R       192.168.10.0/24 [120/1] via 192.168.3.2, 00:00:01,  Serial0
  10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
  R          10.1.3.0/24 [120/1] via 192.168.2.1, 00:00:01,  Serial1
  R          10.1.2.0/24 [120/1] via 192.168.2.1, 00:00:02,  Serial1
  R          10.1.1.0/24 [120/1] via 192.168.2.1, 00:00:02,  Serial1
  R          10.0.0.0/8 [120/2] via 192.168.3.2, 00:00:02,  Serial0
  R          10.1.5.0/24 [120/1] via 192.168.2.1, 00:00:02,  Serial1
  R          10.1.4.0/24 [120/1] via 192.168.2.1, 00:00:02,  Serial1
  C       192.168.2.0/24 is directly connected, Serial1
  C       192.168.3.0/24 is directly connected, Serial0
  R3上的路由表
  R3#show ip route
  Codes: C - connected, S - static, I - IGRP, R - RIP, M -  mobile, B - BGP
  D - EIGRP, EX - EIGRP external, O - OSPF, IA -  OSPF inter area
  N1 - OSPF NSSA external type 1, N2 - OSPF NSSA  external type 2
  E1 - OSPF external type 1, E2 - OSPF external type  2, E - EGP
  i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2,  ia - IS-IS inter area
  * - candidate default, U - per-user static route, o  - ODR
  P - periodic downloaded static route
  Gateway of last resort is not set
  R       1.0.0.0/8 [120/1] via 192.168.10.1, 00:00:04,  Ethernet0
  3.0.0.0/24 is subnetted, 1 subnets
  C          3.3.3.0 is directly connected, Loopback0
  C       192.168.10.0/24 is directly connected, Ethernet0
  R       10.0.0.0/8 [120/1] via 192.168.10.1, 00:00:04,  Ethernet0
  R       192.168.2.0/24 [120/1] via 192.168.3.1, 00:00:13,  Serial1
  C       192.168.3.0/24 is directly connected, Serial1
  观察R2上的路由表变化,当我们去掉R1上的自动汇总以后,R1传给R2的路由将不再是汇总的。
  R1上设置手动汇总,观察手动汇总的结果
  手动汇总的命令:
  R1(config-if)#int s0
  R1(config-if)#ip summary-address rip 10.1.0.0 255.255.0.0
  观察路由表
  R1#show ip route
  Codes: C - connected, S - static, I - IGRP, R - RIP, M  - mobile, B - BGP
  D - EIGRP, EX - EIGRP external, O - OSPF, IA -  OSPF inter area
  N1 - OSPF NSSA external type 1, N2 - OSPF NSSA  external type 2
  E1 - OSPF external type 1, E2 - OSPF external type  2, E - EGP
  i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2,  ia - IS-IS inter area
  * - candidate default, U - per-user static route, o  - ODR
  P - periodic downloaded static route
  Gateway of last resort is not set
  1.0.0.0/24 is subnetted, 1 subnets
  C          1.1.1.0 is directly connected, Loopback1
  R       3.0.0.0/8 [120/1] via 192.168.10.2, 00:00:02,  Ethernet0
  C       192.168.10.0/24 is directly connected, Ethernet0
  10.0.0.0/24 is subnetted, 5 subnets
  C          10.1.3.0 is directly connected, Loopback4
  C          10.1.2.0 is directly connected, Loopback3
  C          10.1.1.0 is directly connected, Loopback2
  C          10.1.5.0 is directly connected, Loopback6
  C          10.1.4.0 is directly connected, Loopback5
  C       192.168.2.0/24 is directly connected, Serial0
  R       192.168.3.0/24 [120/1] via 192.168.2.2, 00:00:11,  Serial0
  R2上的路由表
  R2#show ip route
  Codes: C - connected, S - static, I - IGRP, R - RIP, M -  mobile, B - BGP
  D - EIGRP, EX - EIGRP external, O - OSPF, IA -  OSPF inter area
  N1 - OSPF NSSA external type 1, N2 - OSPF NSSA  external type 2
  E1 - OSPF external type 1, E2 - OSPF external type  2, E - EGP
  i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2,  ia - IS-IS inter area
  * - candidate default, U - per-user static route, o  - ODR
  P - periodic downloaded static route
  Gateway of last resort is not set
  1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
  R          1.0.0.0/8 [120/2] via 192.168.3.2, 00:00:01,  Serial0
  R          1.1.1.0/24 [120/1] via 192.168.2.1, 00:00:01,  Serial1
  R       3.0.0.0/8 [120/1] via 192.168.3.2, 00:00:01, Serial0
  R       192.168.10.0/24 [120/1] via 192.168.2.1, 00:00:01,  Serial1
  10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
  R          10.0.0.0/8 [120/2] via 192.168.3.2, 00:00:01,  Serial0
  R          10.1.0.0/16 [120/1] via 192.168.2.1, 00:00:02,  Serial1
  C       192.168.2.0/24 is directly connected, Serial1
  C       192.168.3.0/24 is directly connected, Serial0
  再次观察R2上的路由表与手动汇总之前的不同,显然手动汇总已经起了作用。
  R3上的路由表
  R3#show ip route
  Codes: C - connected, S - static, I - IGRP, R - RIP, M -  mobile, B - BGP
  D - EIGRP, EX - EIGRP external, O - OSPF, IA -  OSPF inter area
  N1 - OSPF NSSA external type 1, N2 - OSPF NSSA  external type 2
  E1 - OSPF external type 1, E2 - OSPF external type  2, E - EGP
  i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2,  ia - IS-IS inter area
  * - candidate default, U - per-user static route, o  - ODR
  P - periodic downloaded static route
  Gateway of last resort is not set
  R       1.0.0.0/8 [120/1] via 192.168.10.1, 00:00:04,  Ethernet0
  3.0.0.0/24 is subnetted, 1 subnets
  C          3.3.3.0 is directly connected, Loopback0
  C       192.168.10.0/24 is directly connected, Ethernet0
  R       10.0.0.0/8 [120/1] via 192.168.10.1, 00:00:04,  Ethernet0
  R       192.168.2.0/24 [120/1] via 192.168.3.1, 00:00:13,  Serial1
  C       192.168.3.0/24 is directly connected, Serial1
  实验总结:
  我们通过RIPv2的属性,来看到VLSM的特征,我们使用关闭自动汇总的属性来看到RIPv2的特点,这个实验希望大家能够掌握。

运维网声明 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-537908-1-1.html 上篇帖子: cisco路由器IOS 恢复 下篇帖子: Cisco NAT—网络地址翻译(cisco NAT 的配置例子)
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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

扫描微信二维码查看详情

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


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


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


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



合作伙伴: 青云cloud

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