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


相关文章
|
IDE Java 应用服务中间件
解决org.apache.jasper.JasperException异常
解决org.apache.jasper.JasperException异常
1612 0
PyQt5-Qt Designer中控件的尺寸相关设置(sizePolicy策略)
PyQt5-Qt Designer中控件的尺寸相关设置(sizePolicy策略)
946 1
|
前端开发 开发者
|
网络虚拟化 网络架构
思科的综合实战练习
思科的综合实战练习
|
Go C#
WPF Navigation
原文:WPF Navigation 在开始学习WPF时,一开始对WPF的Window, Page, UserControl感到很迷惑。不知道什么时候该使用哪一个。下面简单介绍一下这三者的区别。 Window:故名思意,桌面程序的窗体。
1736 0
读硝烟中的scrum和XP笔记
硝烟中的scrum和XP笔记 读硝烟中的scrum和xp的读书笔记,对scrum有一些整理。下面的条目并不以顺序代表重要性、顺序,或是其他的意思,只是我根据读到的相关内容整理到一起的。
1059 0
|
数据库
[AlwaysOn Availability Groups] 健康模型 Part 2 ——扩展
健康模型扩展 第一部分已经介绍了AlwayOn健康模型的概述。现在是创建一个自己的PBM策略,然后设置为制定的归类。创建这些策略,创建之后修改一下配置,dashboard就会自动评估这些策略。 场景,你有一个异步副本,当被primary落下太多的时候想要在dashboard上显示。
817 0
|
7天前
|
人工智能 安全 API
CoPaw:5分钟部署你的 AI助理
源自阿里巴巴开源生态的个人 AI 助理——CoPaw。作为阿里倾力打造的开源力作,CoPaw 完美打通钉钉、飞书、Discord 等多平台对话通道,支持定时任务自动化。内置 PDF/Office 深度处理、新闻摘要等强大技能,更开放自定义扩展接口。坚持数据全程私有化部署,绝不上传云端,让每一位用户都能在大厂技术加持下,拥有安全、专属的智能助手。
|
10天前
|
人工智能 自然语言处理 JavaScript
2026年Windows+Ollama本地部署OpenClaw保姆级教程:本地AI Agent+阿里云上快速搭建
2026年OpenClaw凭借本地部署、私有化运行的特性,成为打造个人智能体的核心工具,而Ollama作为轻量级本地大模型管理工具,能让OpenClaw摆脱对云端大模型的依赖,实现**本地推理、数据不泄露、全流程私有化**的智能体验。本文基于Windows 11系统,从硬件环境准备、Ollama安装与模型定制、OpenClaw部署配置、技能扩展到常见问题排查,打造保姆级本地部署教程,同时补充阿里云OpenClaw(Clawdbot)快速部署步骤,兼顾本地私有化需求与云端7×24小时运行需求,文中所有代码命令均可直接复制执行,确保零基础用户也能快速搭建属于自己的本地智能体。
11355 96
|
8天前
|
人工智能 安全 JavaScript
阿里云上+本地部署OpenClaw(小龙虾)新手攻略:解锁10大必备Skills,零基础也能玩转AI助手
2026年,开源AI代理工具OpenClaw(昵称“小龙虾”)凭借“能实际做事”的核心优势,在GitHub斩获25万+星标,成为现象级AI工具。它最强大的魅力在于可扩展的Skills(技能包)系统——通过ClawHub插件市场的数百个技能,能让AI助手从简单聊天升级为处理办公、学习、日常事务的全能帮手。
7350 26

热门文章

最新文章