HCIP之BGP基础实验

简介: 除R5的5.5.5.0环回外,其他所有的环回均可以互相访问

实验要求

image.png

除R5的5.5.5.0环回外,其他所有的环回均可以互相访问


实验拓扑a5f4e79ff5f74d7ab37c1cb1188a2ca9.png

R2、3、4里面用OSPF

R2

<r2>display  ospf peer brief 
         OSPF Process 1 with Router ID 2.2.2.2
                  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.0          GigabitEthernet0/0/1             3.3.3.3          Full        
 ----------------------------------------------------------------------------
<r2>

R3

<r3>display ospf peer brief 
         OSPF Process 1 with Router ID 3.3.3.3
                  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.0          GigabitEthernet0/0/0             2.2.2.2          Full        
 0.0.0.0          GigabitEthernet0/0/1             4.4.4.4          Full        
 ----------------------------------------------------------------------------
<r3>

R4

<r4>display  ospf peer brief 
         OSPF Process 1 with Router ID 4.4.4.4
                  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.0          GigabitEthernet0/0/0             3.3.3.3          Full        
 ----------------------------------------------------------------------------
<r4>

R1、2、3、4、5的bgp配置

R1

[r1-bgp]display this 
[V200R003C00]
#
bgp 1
 router-id 1.1.1.1
 peer 12.1.1.2 as-number 2 
 #
 ipv4-family unicast
  undo synchronization
  deterministic-med
  network 1.1.1.0 255.255.255.0 
  peer 12.1.1.2 enable
#
return

R2

[r2-bgp]display th
[V200R003C00]
#
bgp 2
 router-id 2.2.2.2
 peer 3.3.3.3 as-number 2 
 peer 3.3.3.3 connect-interface LoopBack0
 peer 4.4.4.4 as-number 2 
 peer 4.4.4.4 connect-interface LoopBack0
 peer 12.1.1.1 as-number 1 
 #
 ipv4-family unicast
  undo synchronization
  network 2.2.2.0 255.255.255.0 
  peer 3.3.3.3 enable
  peer 3.3.3.3 next-hop-local 
  peer 4.4.4.4 enable
  peer 4.4.4.4 next-hop-local 
  peer 12.1.1.1 enable
#
return

R3

[r3-bgp]display th 
[V200R003C00]
#
bgp 2
 router-id 3.3.3.3
 peer 2.2.2.2 as-number 2 
 peer 2.2.2.2 connect-interface LoopBack0
 peer 4.4.4.4 as-number 2 
 peer 4.4.4.4 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  network 3.3.3.0 255.255.255.0 
  peer 2.2.2.2 enable
  peer 4.4.4.4 enable
#
return

R4

[r4-bgp]display th
[V200R003C00]
#
bgp 2
 router-id 4.4.4.4
 peer 2.2.2.2 as-number 2 
 peer 2.2.2.2 connect-interface LoopBack0
 peer 3.3.3.3 as-number 2 
 peer 3.3.3.3 connect-interface LoopBack0
 peer 5.5.5.5 as-number 3 
 peer 5.5.5.5 ebgp-max-hop 2 
 peer 5.5.5.5 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  network 4.4.4.0 255.255.255.0 
  peer 2.2.2.2 enable
  peer 2.2.2.2 next-hop-local 
  peer 3.3.3.3 enable
  peer 3.3.3.3 next-hop-local 
  peer 5.5.5.5 enable
#
return

R5

[r5-bgp]display th
[V200R003C00]
#
bgp 3
 router-id 5.5.5.5
 peer 4.4.4.4 as-number 2 
 peer 4.4.4.4 ebgp-max-hop 2 
 peer 4.4.4.4 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  network 99.1.1.0 255.255.255.0 
  peer 4.4.4.4 enable
#
return

测试

除了5.5.5.0 /24环回其他环回都可以通

<r1>ping -a 1.1.1.1 3.3.3.3
  PING 3.3.3.3: 56  data bytes, press CTRL_C to break
    Reply from 3.3.3.3: bytes=56 Sequence=1 ttl=254 time=30 ms
    Reply from 3.3.3.3: bytes=56 Sequence=2 ttl=254 time=20 ms
    Reply from 3.3.3.3: bytes=56 Sequence=3 ttl=254 time=30 ms
    Reply from 3.3.3.3: bytes=56 Sequence=4 ttl=254 time=30 ms
    Reply from 3.3.3.3: bytes=56 Sequence=5 ttl=254 time=30 ms
  --- 3.3.3.3 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 20/28/30 ms
<r1>ping -a 1.1.1.1 3.3.3.3
  PING 3.3.3.3: 56  data bytes, press CTRL_C to break
    Reply from 3.3.3.3: bytes=56 Sequence=1 ttl=254 time=20 ms
    Reply from 3.3.3.3: bytes=56 Sequence=2 ttl=254 time=30 ms
    Reply from 3.3.3.3: bytes=56 Sequence=3 ttl=254 time=40 ms
    Reply from 3.3.3.3: bytes=56 Sequence=4 ttl=254 time=40 ms
    Reply from 3.3.3.3: bytes=56 Sequence=5 ttl=254 time=20 ms
  --- 3.3.3.3 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 20/30/40 ms
<r1>ping  -a 1.1.1.1 4.4.4.4
  PING 4.4.4.4: 56  data bytes, press CTRL_C to break
    Reply from 4.4.4.4: bytes=56 Sequence=1 ttl=253 time=40 ms
    Reply from 4.4.4.4: bytes=56 Sequence=2 ttl=253 time=20 ms
    Reply from 4.4.4.4: bytes=56 Sequence=3 ttl=253 time=40 ms
    Reply from 4.4.4.4: bytes=56 Sequence=4 ttl=253 time=40 ms
    Reply from 4.4.4.4: bytes=56 Sequence=5 ttl=253 time=40 ms
  --- 4.4.4.4 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 20/36/40 ms
<r1>ping -a 1.1.1.1 99.1.1.1
  PING 99.1.1.1: 56  data bytes, press CTRL_C to break
    Reply from 99.1.1.1: bytes=56 Sequence=1 ttl=252 time=60 ms
    Reply from 99.1.1.1: bytes=56 Sequence=2 ttl=252 time=40 ms
    Reply from 99.1.1.1: bytes=56 Sequence=3 ttl=252 time=30 ms
    Reply from 99.1.1.1: bytes=56 Sequence=4 ttl=252 time=60 ms
    Reply from 99.1.1.1: bytes=56 Sequence=5 ttl=252 time=50 ms
  --- 99.1.1.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 30/48/60 ms


相关文章
|
4月前
|
人工智能 PHP 开发工具
用 Laravel AI SDK 构建多智能体工作流
Laravel AI SDK 提供轻量、灵活的多智能体工作流实现方案,支持 Prompt Chaining、Routing、Parallelization、Orchestrator-Workers 和 Evaluator-Optimizer 五种经生产验证的模式,一行 `agent()` 即可启动,Pipeline/Concurrency 等 API 让复杂任务模块化、可编排。(239字)
289 7
|
23天前
|
自然语言处理
云大使推广常见问题Q&A
随着越来越多云大使的加入,推广过程中遇到的问题增加,云大使运营团队特此整理出一系列常见的推广问题以及逐一进行解答。
|
21天前
|
人工智能 Cloud Native PHP
2026年提升代码产出效率的AI编程工具实测:从补全到Agent自动化全景解析
本文从开发者真实的时间消耗痛点出发,系统评测当前主流AI编程工具在样板代码生成、跨文件重构、单元测试、需求到代码全链路等五类任务上的实际效率表现。阿里云智能编码助手凭借与云原生生态的深度整合占据先发优势,百度文心快码则以 Multi-Agent 分层架构和 SPEC 白盒化流程在复杂工程场景下展现出独特的工程化深度,二者代表了当前国内AI编程工具两种不同的效率提升路径。
438 0
|
1月前
|
编译器 开发工具
.NET 10 SDK 安装教程(dotnet-sdk-10.0.100-win-x64详细步骤)
.NET 10 SDK是微软推出的最新开发工具包,含运行时、CLI与编译器。安装只需下载exe、以管理员身份运行、勾选许可、一路Next。完成后重启终端,执行`dotnet --version`显示10.0.100即成功。(239字)
|
11月前
|
存储 监控 Java
“代码跑着跑着,就变快了?”——揭秘Java性能幕后引擎:即时编译器
HotSpot虚拟机内置C1和C2两个即时编译器。C1启动快,适合快速执行;C2优化强,适合长期运行。自Java 9起,默认启用C2或分层编译。分层编译结合C1与C2优势,共分5层,逐步提升编译质量。方法调用计数器与循环回边计数器用于识别热点代码,触发JIT编译。循环回边计数器还可启动栈上替换(OSR),提升大循环性能。本文详解JIT编译机制与性能优化策略。
455 75
|
人工智能 自然语言处理 数据挖掘
国内如何使用微软 Copilot ?新手进阶篇!
微软 Copilot 是一款功能强大的 AI 助手,掌握一些使用技巧,可以让它成为你工作和生活中的得力助手,助你提升效率,激发创造力,开启更加精彩的人生!
|
网络安全 数据安全/隐私保护
什么是 CSRF 攻击
CSRF(跨站请求伪造)攻击是指攻击者诱导用户点击恶意链接或提交表单,利用用户已登录的身份在目标网站上执行非授权操作,如转账、修改密码等。这种攻击通常通过嵌入恶意代码或链接实现。
|
存储 XML Java
seata2.0服务器日志位置修改
这个过程要求您对Seata配置和Linux文件系统有基本的认识。调整配置文件时要非常细心,因为配置错误会直接影响Seata服务的运行。通过以上步骤,您可以有效地修改Seata服务器的日志位置,并确保日志文件按照您的需要被妥善地管理和存储。
746 3
|
测试技术 网络安全
支付宝接口代签约失败排查指南
【11月更文挑战第5天】支付宝接口代签约失败排查指南:检查参数信息(必填参数、格式、业务合理性)、确认签约状态和权限(商户状态、应用权限、用户授权)、验证网络和系统环境(网络连接、系统兼容性、服务器配置)、检查异步通知设置(通知地址、处理逻辑)、查看官方文档和错误码、联系支付宝客服。
1029 14
Element UI 多选表格--判断勾选数据行的 Checkbox 时为选中还是取消选中
Element UI 多选表格--判断勾选数据行的 Checkbox 时为选中还是取消选中
862 1

热门文章

最新文章