当前位置: 首页 > news >正文

hcip——路由策略

要求:

 基础配置

AR1

[R1]int g 0/0/0
[R1-GigabitEthernet0/0/0]ip add 12.0.0.1 24[R1-GigabitEthernet0/0/0]int g 0/0/1
[R1-GigabitEthernet0/0/1]ip add 14.0.0.1 24[R1]int loop0
[R1-LoopBack0]ip add 1.1.1.1 24[R1]rip 1
[R1-rip-1]vers 2
[R1-rip-1]netw 12.0.0.0
[R1-rip-1]netw 14.0.0.0
[R1-rip-1]netw 1.0.0.0

AR2

[R2]int g 0/0/0
[R2-GigabitEthernet0/0/0]ip add 12.0.0.2 24[R2-GigabitEthernet0/0/0]int s 4/0/0
[R2-Serial4/0/0]ip add 23.0.0.2 24[R2]int LoopBack 0
[R2-LoopBack0]ip add 2.2.2.1 24[R2]rip 1
[R2-rip-1]vers 2
[R2-rip-1]network 12.0.0.0
[R2-rip-1]network 2.0.0.0[R2]ospf 1 router-id 2.2.2.2
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 23.0.0.0 0.0.0.255

AR3

[R3]int s 4/0/0
[R3-Serial4/0/0]ip add 23.0.0.3 24[R3-Serial4/0/0]int s 4/0/1
[R3-Serial4/0/1]ip add 34.0.0.3 24[R3]int LoopBack 0
[R3-LoopBack0]ip add 3.3.3.1 24
[R3-LoopBack0]ospf network-type broadcast [R3]ospf 1 router-id 3.3.3.3
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]network 23.0.0.0 0.0.0.255
[R3-ospf-1-area-0.0.0.0]network 34.0.0.0 0.0.0.255
[R3-ospf-1-area-0.0.0.0]network 3.3.3.0 0.0.0.255

AR4

[R4]int s 4/0/0
[R4-Serial4/0/0]ip add 34.0.0.4 24[R4-Serial4/0/0]int g 0/0/0
[R4-GigabitEthernet0/0/0]ip add 14.0.0.4 24[R4]int LoopBack 0
[R4-LoopBack0]ip add 4.4.4.1 24
[R4-LoopBack0]ospf network-type broadcast [R4]rip 1
[R4-rip-1]vers 2[R4-rip-1]network 14.0.0.0[R4]ospf 1 router-id 4.4.4.4
[R4-ospf-1]area 0
[R4-ospf-1-area-0.0.0.0]network 34.0.0.0 0.0.0.255
[R4-ospf-1-area-0.0.0.0]network 4.4.4.0 0.0.0.255

多点双向重发布

AR2

[R2]rip 1	
[R2-rip-1]import-route ospf 1[R2]ospf 1
[R2-ospf-1]import-route rip 1

AR4

[R4]rip 1
[R4-rip-1]import-route ospf 1[R4]ospf 1
[R4-ospf-1]import-route rip 1

查看

策略

由于需要存在备份路由所以采用route-policy

AR1

在此所有策略在ASBR上配置

 分析:3.3.3.0 走负载均衡 ;4.4.4.0 走14.0.0.4为主路 ;23.0.0.0 走12.0.0.2 为主路 

34.0.0.0 走14.0.0.4为主路 

R2---------------------------------------------------
[R2]ip ip-prefix 11 permit 4.4.4.0 24
[R2]ip ip-prefix 12 permit 34.0.0.0 24[R2]route-policy 1 permit node 5
Info: New Sequence of this List.
[R2-route-policy]if-match ip-prefix 11
[R2-route-policy]apply cost-type type-1
[R2-route-policy]apply cost 10[R2]route-policy 1 permit node 10
Info: New Sequence of this List.
[R2-route-policy]if-match ip-prefix 12
[R2-route-policy]apply cost-type type-1
[R2-route-policy]apply cost 10[R2]route-policy 1 permit node 50[R2]rip 1	
[R2-rip-1]import-route ospf 1 route-policy 1R4-------------------------------------------------------
[R4]ip ip-prefix 11 permit 23.0.0.0 24[R4]route-policy 1 permit node 5
Info: New Sequence of this List.
[R4-route-policy]if-match ip-prefix 11
[R4-route-policy]apply cost-type type-1
[R4-route-policy]apply cost 10[R4]route-policy 1 permit node 50[R4]rip 1
[R4-rip-1]import-route ospf 1 route-policy 1

 AR2

 选路正常

AR3

 分析:1.1.1.0 走负载均衡, 2.2.2.0 走23.0.0.2, 12.0.0.0走23.0.0.2 14.0.0.0走34.0.0.4

R2-----------------------------------------------------
[R2]ip ip-prefix 21 permit 14.0.0.0 24[R2]route-policy 2 permit node 5
Info: New Sequence of this List.
[R2-route-policy]if-match ip-prefix 21	
[R2-route-policy]apply cost 10[R2]route-policy 2 permit node 50[R2]ospf 1
[R2-ospf-1]import-route rip 1 route-policy 2R4--------------------------------------------------
[R4]ip ip-prefix 21 permit 12.0.0.0 24
[R4]ip ip-prefix 22 permit 2.2.2.0 24[R4]route-policy 2 permit node 5
Info: New Sequence of this List.
[R4-route-policy]if-match ip-prefix 21	
[R4-route-policy]apply cost 10[R4]route-policy 2 permit node 10
Info: New Sequence of this List.
[R4-route-policy]if-match ip-prefix 22
[R4-route-policy]apply cost + 10[R4]route-policy 2 permit node 50[R4-ospf-1]import-route rip 1 route-policy 2

 AR4

  选路正常

http://www.lryc.cn/news/100431.html

相关文章:

  • ReID网络:MGN网络(1) - 概述
  • C++数据结构笔记(10)递归实现二叉树的三序遍历
  • hMailServer-5.3.3-B1879.exe
  • 后端校验JSR303
  • vmware磁盘组使用率100%处理
  • Redis实战(3)——缓存模型与缓存更新策略
  • python与深度学习(十):CNN和cifar10二
  • 剑指offer12 矩阵中的路径 13 机器人的运动范围 34.二叉树中和为某一值得路径
  • Pushgateway+Prometheus监控Flink
  • OpenCV图像处理-视频分割静态背景-MOG/MOG2/GMG
  • nginx 反向代理浅谈
  • 【概率预测】对风力发电进行短期概率预测的分析研究(Matlab代码实现)
  • 原型设计模式go实现尝试
  • 链表是否有环、环长度、环起点
  • 有效文档管理离不开这几个特点
  • 爬虫-requests-cookie登录古诗文网
  • Spring Boot实践三 --数据库
  • 分布式锁漫谈
  • mac 安装 php 与 hyperf 框架依赖的扩展并启动 gptlink 项目
  • ansible中run_once的详细介绍和使用说明
  • 短视频矩阵系统源码开发流程​
  • vite+vue3 css scss PC移动布局自适应
  • BLE配对和绑定
  • 无涯教程-jQuery - html( val )方法函数
  • 【单链表OJ题:删除链表中等于给定值 val 的所有节点】
  • vue element ui web端引入百度地图,并获取经纬度
  • 25.10 matlab里面的10中优化方法介绍—— 函数fmincon(matlab程序)
  • 赛效:如何将PDF文件免费转换成Word文档
  • java 8 的Stream API
  • TypeChat,用TypeScript快速接入AI大语言模型