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

[经验分享] Cisco 路由器 secondary address实现RIPV1不连续子网

[复制链接]

尚未签到

发表于 2018-7-20 12:42:01 | 显示全部楼层 |阅读模式
实验过程:  1、按照图中的示例配置IP地址,使用ping命令确保网络连通性
  2、在R3 R4 R5上分别查看路由
  R3(config-router)#do sh ip route
  10.0.0.0/24 is subnetted, 2 subnets
  R       10.1.45.0 [120/1] via 10.1.34.2, 00:00:25, Serial1/1
  C       10.1.34.0 is directly connected, Serial1/1
  192.168.1.0/24 is  variably subnetted, 4 subnets, 2 masks
  R       192.168.1.8/29 [120/1] via 192.168.1.18, 00:00:11,  FastEthernet0/0
  C       192.168.1.0/30 is directly connected, Loopback0
  R       192.168.1.0/29 [120/1] via 192.168.1.17, 00:00:04,  FastEthernet0/0
  C       192.168.1.16/29 is directly connected, FastEthernet0/0
  //R3上没有收到来自于R4的关于192.168.1.0的路由
  R4(config-router)#do sh ip route
  Gateway of last resort is not set
  10.0.0.0/24 is subnetted, 2 subnets
  C       10.1.45.0 is directly connected, Serial1/1
  C       10.1.34.0 is directly connected, Serial1/0
  R    192.168.1.0/24 [120/1] via 10.1.34.1, 00:00:25, Serial1/0
  [120/1] via 10.1.45.2, 00:00:01, Serial1/1
  //R4从R3,R5分别收到路由,因此有两个关于192.168.1.0 的路由,metric都为1,RIP默认进行负载均衡。
  R5(config-router)#do sh ip route
  10.0.0.0/24 is subnetted, 2 subnets
  C       10.1.45.0 is directly connected, Serial1/0
  R       10.1.34.0 [120/1] via 10.1.45.1, 00:00:15, Serial1/0
  192.168.1.0/29 is subnetted, 1 subnets
  C       192.168.1.24 is directly connected, Loopback0
  //R5上也只有一条关于192.168.1.0的路由
  3、为了实现R1 R2上的路由能够正确的传到R5,需要在沿途确保连续的子网没有被分割。配置secondary address
  R3(config)#int s1/1
  R3(config-if)#ip add 192.168.1.33 255.255.255.248 sec
  R4(config)#int s1/0
  R4(config-if)#ip add 192.168.1.34 255.255.255.248 sec
  R4(config-if)#
  R4(config-if)#
  R4(config-if)#int s1/1
  R4(config-if)#ip add 192.168.1.41 255.255.255.248 sec
  R4(config-if)#exit
  R4(config)#router rip
  R4(config-router)#net 192.168.1.0
  R5(config)#int s1/0
  R5(config-if)#ip add 192.168.1.42 255.255.255.248 sec
4、在R1  R3 R4 上查看路由表

R1(config-router)#do sh ip route  Gateway of last resort is not set
  R    10.0.0.0/8 [120/1] via  192.168.1.19, 00:00:14, FastEthernet0/0
  192.168.1.0/29 is subnetted, 6 subnets
  R       192.168.1.40 [120/2] via 192.168.1.19, 00:00:14, FastEthernet0/0
  R       192.168.1.32 [120/1] via 192.168.1.19, 00:00:14, FastEthernet0/0
  R       192.168.1.8 [120/1] via 192.168.1.18, 00:00:10, FastEthernet0/0
  C       192.168.1.0 is directly connected, Loopback0
  R       192.168.1.24 [120/3] via 192.168.1.19,  00:00:14, FastEthernet0/0
  C       192.168.1.16 is directly connected, FastEthernet0/0
  //子网192.168.1.24通过RIP传递过来,metric为3跳
  R3(config-router)#do sh ip route
  Gateway of last resort is not set
  10.0.0.0/24 is subnetted, 3  subnets
  R       10.0.0.0 [120/1] via 192.168.1.34, 00:00:00, Serial1/1
  R       10.1.45.0 [120/1] via 10.1.34.2, 00:00:00, Serial1/1
  C       10.1.34.0 is directly connected, Serial1/1
  192.168.1.0/24 is variably subnetted, 7 subnets, 2 masks
  R       192.168.1.40/29 [120/1] via 192.168.1.34, 00:00:00, Serial1/1
  C       192.168.1.32/29 is directly connected, Serial1/1
  R       192.168.1.8/29 [120/1] via 192.168.1.18, 00:00:07,  FastEthernet0/0
  C       192.168.1.0/30 is directly connected, Loopback0
  R       192.168.1.0/29 [120/1] via 192.168.1.17, 00:00:01,  FastEthernet0/0
  [120/1] via 10.1.34.2, 00:00:00, Serial1/1
  R       192.168.1.24/29 [120/2] via 192.168.1.34, 00:00:00, Serial1/1
  C       192.168.1.16/29 is directly connected, FastEthernet0/0
  //此时在R3上可以看到关于192.168.1.0各个子网的明细路由。
  R4(config-router)#do sh ip route
  10.0.0.0/24 is subnetted, 2  subnets
  C       10.1.45.0 is directly connected, Serial1/1
  C       10.1.34.0 is directly connected, Serial1/0
  192.168.1.0/29 is subnetted, 6 subnets
  C       192.168.1.40 is directly connected, Serial1/1
  C       192.168.1.32 is directly connected, Serial1/0
  R       192.168.1.8 [120/2] via 192.168.1.33, 00:00:01, Serial1/0
  R       192.168.1.0 [120/1] via 10.1.34.1, 00:00:01, Serial1/0
  [120/1] via 10.1.45.2, 00:00:15, Serial1/1
  R       192.168.1.24 [120/1] via 192.168.1.42, 00:00:15, Serial1/1
  R       192.168.1.16 [120/1] via 192.168.1.33, 00:00:01, Serial1/0
  //R4上也收到了明细路由
实验总结:


RIPV1默认在网络边界汇总网络,这样的话在R3上10.0.0.0网络边界会将192.168.1.0的各个子网汇总为192.168.1.0,因此整个网络的路由是不正确的。

通过配置 了secondary address之 后,在网络边界延续29位的子网,使得整 个网络的路由能够正常传递。

运维网声明 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.iyunv.com/thread-539214-1-1.html 上篇帖子: cisco交换机IP/MAC***防范 下篇帖子: Cisco 路由器 基于策略路由的配置工程实例
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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

扫描微信二维码查看详情

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


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


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


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



合作伙伴: 青云cloud

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