当前位置:网站首页>HCIP-第九天-BGP(边界网关协议)
HCIP-第九天-BGP(边界网关协议)
2022-07-30 05:37:00 【m0_72586049】
一、实验目的
通过使用BGP边界网关协议让如下图所示的拓扑环境达到实验要求
二、实验需求
1.R1/2/4/5为边界路由器,且各有环回
2.AS2环境中通过OSPF协议配置使得AS1自治系统内网可达
3.AS1-AS3通过各自边界路由器环回接口建邻使得自治系统间达到全网可达
4.AS4-AS5备份选路
三、实验步骤
1.更改设备器名称
以R1为例:
[Huawei]sysname r1
[r1]

2.OSPF协议(AS2)
1)R2
[R2]ospf 1 router-id 2.2.2.2
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 23.1.1.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]network 2.2.2.0 0.0.0.2552)R3
[R3]ospf 1 router-id 3.3.3.3
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]network 23.1.1.0 0.0.0.255
[R3-ospf-1-area-0.0.0.0]network 3.3.3.0 0.0.0.255
[R3-ospf-1-area-0.0.0.0]network 34.1.1.0 0.0.0.2553)R4
[R4]ospf 1 router-id 4.4.4.4
[R4-ospf-1]area 0
[R4-ospf-1-area-0.0.0.0]network 34.1.1.0 0.0.0.255
[R4-ospf-1-area-0.0.0.0]network 4.4.4.0 0.0.0.255查看R2路由表看ospf是否配置成功

3.BGP协议配置
1)对等体建立
首先需要通过各自自治区域的边界路由器的环回接口进行BGP对等体建邻,所以需要在各自边界路由器手配静态路由到对等体环回接口;以R1和R2为例
R1
[R1]ip route-static 2.2.2.0 24 12.1.1.2R2
[R2]ip route-static 1.1.1.0 24 12.1.1.1
2)BGP协议
①R1
[R1]bgp 1
[R1-bgp]router-id 1.1.1.1
[R1-bgp]peer 2.2.2.2 as-number 2
[R1-bgp]peer 2.2.2.2 ebgp-max-hop 2
[R1-bgp]peer 2.2.2.2 connect-interface LoopBack 0
[R1-bgp]network 11.11.11.0 24
②R2
[R2]bgp 2
[R2-bgp]router-id 2.2.2.2
[R2-bgp]peer 1.1.1.1 as-number 1
[R2-bgp]peer 1.1.1.1 ebgp-max-hop 2
[R2-bgp]peer 1.1.1.1 connect-interface LoopBack 0
[R2-bgp]peer 3.3.3.3 as-number 2
[R2-bgp]peer 3.3.3.3 connect-interface LoopBack 0

③R3
[R3]bgp 2
[R3-bgp]router-id 3.3.3.3
[R3-bgp]peer 2.2.2.2 as-number 2
[R3-bgp]peer 4.4.4.4 as-number 2
[R3-bgp]peer 2.2.2.2 connect-interface LoopBack 0
[R3-bgp]peer 4.4.4.4 connect-interface LoopBack 0

④R4
[R4]bgp 2
[R4-bgp]router-id 4.4.4.4
[R4-bgp]peer 3.3.3.3 as-number 2
[R4-bgp]peer 3.3.3.3 connect-interface LoopBack 0
[R4-bgp]peer 5.5.5.5 as-number 3
[R4-bgp]peer 5.5.5.5 connect-interface LoopBack 0
[R4-bgp]peer 5.5.5.5 ebgp-max-hop 2

⑤R5
[R5]bgp 3
[R5-bgp]router-id 5.5.5.5
[R5-bgp]peer 4.4.4.4 as-number 2
[R5-bgp]peer 4.4.4.4 connect-interface LoopBack 0
[R5-bgp]peer 4.4.4.4 ebgp-max-hop 2
[R5-bgp]network 55.55.55.0 24 
3)更改AS2区域内的下一跳
以R2为例
[R2-bgp]peer 3.3.3.3 next-hop-local
[R2-bgp]peer 4.4.4.4 next-hop-local四、测试
用R1的lookback1环回去pingR5的lookback1环回

终上所述:该实验的所有要求已经达成 ,实验成功。
边栏推荐
- Summary of SQL classic interview questions in 2022 (with analysis)
- [Mysql] DATEDIFF函数
- 【小程序项目开发 -- 京东商城】uni-app 商品分类页面(下)
- 丑陋的程序员
- Mysql8.+学习笔记
- [其他] DS5
- 个人博客系统(附源码)
- curl (7) Failed connect to localhost8080; Connection refused
- IDEA的database使用教程(使用mysql数据库)
- Solve the problem that the local nacos is not configured but the localhost8848 connection exception always occurs
猜你喜欢
随机推荐
从想当亿万富翁到职场、创业、爱情、抑郁、学医学武,我的程序人生
cmd (command line) to operate or connect to the mysql database, and to create databases and tables
postman 请求 post 调用 传 复合 json数据
[GStreamer] The name of the plugin should match GST_PLUGIN_DEFINE
留念 · 大学时代最后的系统设计图
[GStreamer] 插件的名字要和GST_PLUGIN_DEFINE匹配
It's time to have to learn English, give yourself multiple paths
图形镜像对称(示意图)
mysql 中 in 的用法
839. Simulated heap
Nacos 原理
Programmers make money and practice, teach you how to do paid courses, self-media, paid articles and paid technical courses to make money
应用实践 | Apache Doris 在百度智能云计费账单系统的应用实践
黄金圈法则:成功者必备的深度思考方法
Thymeleaf简介
JVM之GC 调优工具 Arthas 实战使用(二)
MySQL (2)
navicat连接MySQL报错:1045 - Access denied for user ‘root‘@‘localhost‘ (using password YES)
最新版MySQL 8.0 的下载与安装(详细教程)
Difference between cookie and session
![[Redis Master Cultivation Road] Jedis - the basic use of Jedis](/img/e3/0c6efd03432a01f857796f0bf648ef.png)








