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

BGP综合实验

一、配置IP地址与环回
二、IGP协议(OSPF)
[R1]ospf 1 rou 1.1.1.1
[R1-ospf-1]a 0
[R1-ospf-1-area-0.0.0.0]net 1.1.1.1 0.0.0.0
[R1-ospf-1-area-0.0.0.0]net 12.0.0.2 0.0.0.0
[R1-ospf-1-area-0.0.0.0]net 13.0.0.2 0.0.0.0
[R1-ospf-1-area-0.0.0.0]net 192.168.100.1 0.0.0.0
 
[R2]ospf 1 rou 2.2.2.2
[R2-ospf-1]a 0
[R2-ospf-1-area-0.0.0.0]net 2.2.2.2 0.0.0.0
[R2-ospf-1-area-0.0.0.0]net 192.168.20.1 0.0.0.0
[R2-ospf-1-area-0.0.0.0]net 12.0.0.1 0.0.0.0
 
[R3]ospf 1 rou 3.3.3.3
[R3-ospf-1]a 0
[R3-ospf-1-area-0.0.0.0]net 3.3.3.3 0.0.0.0
[R3-ospf-1-area-0.0.0.0]net 192.168.30.1 0.0.0.0
[R3-ospf-1-area-0.0.0.0]net 13.0.0.1 0.0.0.0
三、更改环回接口类型为Broadcast
[R1]int l1    
[R1-LoopBack1]ospf network-type broadcast 
 
[R2]int l1
[R2-LoopBack1]ospf network-type broadcast 
 
[R3]int l1
[R3-LoopBack1]ospf network-type broadcast 
四、BGP
[R1]bgp 123
[R1-bgp]router-id 1.1.1.1
[R1-bgp]peer 2.2.2.2 as 123
[R1-bgp]peer 2.2.2.2 con l0
[R1-bgp]peer 2.2.2.2 next-hop-local
[R1-bgp]peer 3.3.3.3 as 123
[R1-bgp]peer 3.3.3.3 con l0
[R1-bgp]peer 3.3.3.3 next-hop-local
[R1-bgp]peer 15.0.0.5 as 500
 
[R2]bgp 123
[R2-bgp]router-id 2.2.2.2
[R2-bgp]peer 24.0.0.4 as 400
[R2-bgp]peer 1.1.1.1 as 123
[R2-bgp]peer 1.1.1.1 con l0
[R2-bgp]peer 1.1.1.1 next-hop-local
 
[R3]bgp 123
[R3-bgp]router-id 3.3.3.3
[R3-bgp]peer 34.0.0.4 as 400
[R3-bgp]peer 1.1.1.1 as 123
[R3-bgp]peer 1.1.1.1 con l0
[R3-bgp]peer 1.1.1.1 next-hop-local
 

[R4]bgp 400
[R4-bgp]router-id 4.4.4.4
[R4-bgp]peer 24.0.0.2 as 123
[R4-bgp]peer 34.0.0.3 as 123


[R5]bgp 500
[R5-bgp]router-id 5.5.5.5
[R5-bgp]peer 15.0.0.1 as 123
五、BGP宣告
[R4]bgp 400
[R4-bgp]net 192.168.1.0 24
[R4-bgp]net 192.168.2.0 24
[R4-bgp]net 192.168.3.0 24
 
[R2]bgp 123
[R2-bgp]net 192.168.20.0 24
 
[R3]bgp 123
[R3-bgp]net 192.168.30.0 24
 
[R1]bgp 123
[R1-bgp]net 192.168.100.0 24
 
[R5]bgp 500
[R5-bgp]net 192.168.10.0 24
[R5-bgp]net 192.168.11.0 24
[R5-bgp]net 192.168.12.0 24
六、使用策略,满足题目要求
1.使用PreVa1策略,确保R4通过R2到达192.168.10.0/24
[r4]ip ip-prefix PV permit 192.168.10.0 24
[r4]route-policy PV permit node 10
Info: New Sequence of this List.
[r4-route-policy]if-match ip-prefix PV
[r4-route-policy]apply preferred-value 100
Info: New Sequence of this List.
[r4]bgp 400
[r4-bgp]peer 24.0.0.4 route-policy PV import

2.使用AS_Path策略,确保R4通过R3到达192.168.11.0/24
[r4]ip ip-prefix AS permit 192.168.11.0 24
[r4]route-policy AS permit node 10
[r4-route-policy]if-match ip-prefix AS
[r4-route-policy]apply as-path 11 22 33 overwrite

3.配置MED策略,确保R4通过R3到达192.168.12.0/24
[r4]ip ip-prefix MED permit 192.168.12.0 24
[r4]route-policy MED permit node 10
[r4-route-policy]if-match ip-prefix MED
[r4-route-policy]apply cost 20
[r4]route-policy MED permit node 20

4.使用Local Perference策略,确保R1通过R2到达192.168.1.0/24 
[r1]ip ip-prefix LP permit 192.168.1.0 24
[r1]route-policy LP permit node 10
[r1-route-policy]if-match ip-prefix LP
[r1-route-policy]apply local-preference 200
[r1]route-policy LP permit node 20
 

5.使用Local Perference策略,确保R1通过R3到达192.168.2.0/24
[r1]ip ip-prefix LP1 permit 192.168.2.0 24
[r1]route-policy LP1 permit node 10
[r1-route-policy]if-match ip-prefix LP1
[r1-route-policy]apply local-preference 200
[r1]route-policy LP1 permit node 20

6.配置负载均衡,确保R1通过R2和R3到达192.168.3.0/24
[r1-bgp]maximum load-balancing 2

http://www.dtcms.com/a/200089.html

相关文章:

  • Nginx基础知识
  • java基础-关键字:static、单例模式
  • QPS与TPS区分及压测指标解读
  • 渗透测试核心技术:漏洞挖掘与利用
  • ai agent(智能体)开发 python高级应用8:crawl4ai 对用 LLMExtractionStrategy 和 python的 re 如何选择
  • 存储地图上的各种形状的文件格式.SHP文件介绍
  • python学习day2(未写完,明天继续补充)
  • AI大模型:技术演进、核心原理与产业解析
  • AutoMouser - 单次AI调用铸就高效自动化脚本
  • Xshell实战:远程连接VMware CentOS7虚拟机与高效运维指南——从零配置到自动化操作,解锁Xshell的核心价值
  • 湖北理元理律师事务所观察:债务服务中的“倾听者价值”
  • 系统架构设计-案例分析总结
  • 人工智能、机器学习与深度学习:全面介绍与对比分析
  • 【Unity 2023 新版InputSystem系统】新版InputSystem 如何进行人物移动(包括配置、代码详细实现过程)
  • Financing | 巴菲特查理芒格投资理念
  • Windows环境安装LibreOffice实现word转pdf
  • 设备数据看板助力自动化工厂实现生产智能精细化管理
  • 通用简洁工作汇报项目评估营销策划工作总结年终汇报PPT模版8套一组分享
  • VAPO:视觉-语言对齐预训练(对象级语义)详解
  • Visual Studio构建三剑客:生成/重新生成/清理解决方案的正确打开方式
  • 项目记录:「五秒反应挑战」小游戏的开发全过程
  • 在嵌入式系统中, 一般链路层断开多久,断开TCP为好
  • 数据库-oracle-包-视图传参
  • Git本地使用小Tips
  • Axure疑难杂症:垂直菜单展开与收回(4大核心问题与专家级解决方案)
  • ModbusTCP转 Profinet网关:热收缩包装机智能化改造核心方案
  • 基于 Keil 的 STM32 全模块开发
  • day30-模块和库的导入
  • 基于Qt的app开发第九天
  • ubuntu 20.04 ping baidu.coom可以通,ping www.baidu.com不通 【DNS出现问题】解决方案