当前位置:网站首页>hcip BGP 增强实验
hcip BGP 增强实验
2022-08-05 09:16:00 【土尔奇酱】
实验题目:
实验分析:
IP地址配置完成后,配置路由,包含R1/2和R7/8之间的静态和R2/3/4/5/6/7的动态路由协议(OSPF)
建立EBGP和IBGP关系以及内部的反射
对应网段在BGP协议内的宣告
汇总(在此使用不正规的路由汇总,直接书写一条防环路由——指向空接口,随后直接宣告汇总路由)
实验拓扑:
实验配置:
R1:
[Huawei]sysname r1
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 12.1.1.1 24
[r1-GigabitEthernet0/0/0]int l0
[r1-LoopBack0]ip add 1.1.1.1 32
[r1-LoopBack0]q
[r1]bgp 1
[r1-bgp]peer 172.16.0.2 as-number 2
[r1-bgp]peer 172.16.0.2 connect-interface l0
[r1-bgp]peer 172.16.0.2 ebgp-max-hop 2
[r1-bgp]int l1
[r1-LoopBack1]ip add 192.168.1.1 24
[r1-LoopBack1]bgp 1
[r1-bgp]network 192.168.1.0 24
R2:
[Huawei]sysname R2
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 12.1.1.2 24
[R2-GigabitEthernet0/0/0]int l0
[R2-LoopBack0]ip add 172.16.0.2 32
[R2-LoopBack0]int l1
[R2-LoopBack1]ip add 172.16.2.1 24
[R2-LoopBack1]int g0/0/1
[R2-GigabitEthernet0/0/1]ip add 172.16.1.21 30
[R2-GigabitEthernet0/0/1]int g0/0/2
[R2-GigabitEthernet0/0/2]ip add 172.16.1.1 30
[R2-GigabitEthernet0/0/2]q
[R2]ip route-static 1.1.1.1 32 12.1.1.1
[R2]bgp 64512
[R2-bgp]confederation id 2
[R2-bgp]peer 1.1.1.1 as-number 1
[R2-bgp]peer 1.1.1.1 connect-interface LoopBack 0
[R2-bgp]peer 1.1.1.1 ebgp-max-hop 2
[R2-bgp]ospf 1
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.255.255
[R2-ospf-1-area-0.0.0.0]int l1
[R2-LoopBack1]ospf network-type broadcast
[R2]bgp 64512
[R2-bgp]peer 172.16.0.3 as-number 64512
[R2-bgp]peer 172.16.0.3 connect-interface LoopBack 0
[R2-bgp]peer 172.16.0.3 next-hop-local
[R2-bgp]confederation peer-as 64513
[R2-bgp]peer 172.16.0.5 as-number 64513
[R2-bgp]peer 172.16.0.5 connect-interface LoopBack 0
[R2-bgp]peer 172.16.0.5 ebgp-max-hop 2
[R2-bgp]q
[R2]ip route-static 172.16.0.0 16 null 0
[R2]bgp 64512
[R2-bgp]network 172.16.0.0 16
R3:
[Huawei]sysname r3
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ip add 172.16.1.2 30
[r3-GigabitEthernet0/0/0]int g0/0/1
[r3-GigabitEthernet0/0/1]ip add 172.16.1.5 30
[r3-GigabitEthernet0/0/1]int l0
[r3-LoopBack0]ip add 172.16.0.3 32
[r3-LoopBack0]int l1
[r3-LoopBack1]ip add 172.16.3.1 24
[r3-LoopBack1]ospf 1
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.255.255
[r3-ospf-1-area-0.0.0.0]int l1
[r3-LoopBack1]ospf network-type b
[r3-LoopBack1]ospf network-type broadcast
[r3-LoopBack1]bgp 64512
[r3-bgp]confederation id 2
[r3-bgp]peer 172.16.0.2 as-number 64512
[r3-bgp]peer 172.16.0.2 connect-interface l0
[r3-bgp]peer 172.16.0.2 next-hop-local
[r3-bgp]peer 172.16.0.4 as-number 64512
[r3-bgp]peer 172.16.0.4 connect-interface l0
[r3-bgp]peer 172.16.0.4 next-hop-local
[r3-bgp]peer 172.16.0.4 reflect-client
R4:
[Huawei]sysname r4
[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]ip add 172.16.1.6 30
[r4-GigabitEthernet0/0/0]int g0/0/1
[r4-GigabitEthernet0/0/1]ip add 172.16.1.9 30
[r4-GigabitEthernet0/0/1]int l0
[r4-LoopBack0]ip add 172.16.0.4 32
[r4-LoopBack0]int l1
[r4-LoopBack1]ip add 172.16.4.1 24
[r4-LoopBack1]ospf 1
[r4-ospf-1]area 0
[r4-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.255.255
[r4-ospf-1-area-0.0.0.0]int l1
[r4-LoopBack1]ospf network-type broadcast
[r4]bgp 64512
[r4-bgp]confederation id 2
[r4-bgp]confederation peer-as 64513
[r4-bgp]peer 172.16.0.3 as-number 64512
[r4-bgp]peer 172.16.0.3 connect-interface l0
[r4-bgp]peer 172.16.0.3 next-hop-local
[r4-bgp]peer 172.16.0.7 as-number 64513
[r4-bgp]peer 172.16.0.7 connect-interface l0
[r4-bgp]peer 172.16.0.7 ebgp-max-hop 2
R5:
[Huawei]sysname r5
[r5]int g0/0/0
[r5-GigabitEthernet0/0/0]ip add 172.16.1.22 30
[r5-GigabitEthernet0/0/0]int g0/0/1
[r5-GigabitEthernet0/0/1]ip add 172.16.1.17 30
[r5-GigabitEthernet0/0/1]int l0
[r5-LoopBack0]ip add 172.16.0.5 32
[r5-LoopBack0]int l1
[r5-LoopBack1]ip add 172.16.5.1 24
[r5-LoopBack1]ospf 1
[r5-ospf-1]area 0
[r5-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.255.255
[r5-ospf-1-area-0.0.0.0]int l1
[r5-LoopBack1]ospf network-type broadcast
[r5-LoopBack1]bgp 64513
[r5-bgp]confederation id 2
[r5-bgp]confederation peer-as 64512
[r5-bgp]peer 172.16.0.2 as-number 64512
[r5-bgp]peer 172.16.0.2 connect-interface LoopBack 0
[r5-bgp]peer 172.16.0.2 ebgp-max-hop 2
[r5-bgp]peer 172.16.0.6 as-number 64513
[r5-bgp]peer 172.16.0.6 connect-interface l0
[r5-bgp]peer 172.16.0.6 next-hop-local
R6:
[Huawei]sysname r6
[r6]int g0/0/0
[r6-GigabitEthernet0/0/0]ip add 172.16.1.13 30
[r6-GigabitEthernet0/0/0]int g0/0/1
[r6-GigabitEthernet0/0/1]ip add 172.16.1.18 30
[r6-GigabitEthernet0/0/1]int l0
[r6-LoopBack0]ip add 172.16.0.6 32
[r6-LoopBack0]int l1
[r6-LoopBack1]ip add 172.16.6.1 24
[r6-LoopBack1]ospf 1
[r6-ospf-1]area 0
[r6-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.255.255
[r6-ospf-1-area-0.0.0.0]int l1
[r6-LoopBack1]ospf network-type broadcast
[r6-LoopBack1]bgp 64513
[r6-bgp]peer 172.16.0.5 as-number 64513
[r6-bgp]peer 172.16.0.5 connect-interface l0
[r6-bgp]peer 172.16.0.5 next-hop-local
[r6-bgp]peer 172.16.0.7 as-number 64513
[r6-bgp]peer 172.16.0.7 connect-interface l0
[r6-bgp]peer 172.16.0.7 next-hop-local
[r6-bgp]peer 172.16.0.7 reflect-client
R7:
[Huawei]sysname r7
[r7]int g0/0/0
[r7-GigabitEthernet0/0/0]ip add 172.16.1.10 30
[r7-GigabitEthernet0/0/0]int g0/0/1
[r7-GigabitEthernet0/0/1]ip add 172.16.1.14 30
[r7-GigabitEthernet0/0/1]int g0/0/2
[r7-GigabitEthernet0/0/2]ip add 78.1.1.1 24
[r7-GigabitEthernet0/0/2]int l0
[r7-LoopBack0]ip add 172.16.0.7 32
[r7-LoopBack0]int l1
[r7-LoopBack1]ip add 172.16.7.1 24
[r7-LoopBack1]q
[r7]ip route-static 8.8.8.8 32 78.1.1.2
[r7]bgp 64513
[r7-bgp]confederation id 2
[r7-bgp]peer 8.8.8.8 as-number 3
[r7-bgp]peer 8.8.8.8 connect-interface LoopBack 0
[r7-bgp]peer 8.8.8.8 ebgp-max-hop 2
[r7-bgp]ospf 1
[r7-ospf-1]area 0
[r7-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.255.255
[r7-ospf-1-area-0.0.0.0]int l1
[r7-LoopBack1]ospf network-type broadcast
[r7-LoopBack1]bgp 64513
[r7-bgp]confederation peer-as 64512
[r7-bgp]peer 172.16.0.4 as-number 64512
[r7-bgp]peer 172.16.0.4 connect-interface l0
[r7-bgp]peer 172.16.0.4 ebgp-max-hop 2
[r7-bgp]peer 172.16.0.6 as-number 64513
[r7-bgp]peer 172.16.0.6 connect-interface l0
[r7-bgp]peer 172.16.0.6 next-hop-local
R8:
[Huawei]sysname r8
[r8]int g0/0/0
[r8-GigabitEthernet0/0/0]ip add 78.1.1.2 24
[r8-GigabitEthernet0/0/0]int l0
[r8-LoopBack0]ip add 8.8.8.8 32
[r8-LoopBack0]q
[r8]ip route-static 172.16.0.7 32 78.1.1.1
[r8]bgp 3
[r8-bgp]peer 172.16.0.7 as-number 2
[r8-bgp]peer 172.16.0.7 connect-interface LoopBack 0
[r8-bgp]peer 172.16.0.7 ebgp-max-hop 2
[r8-bgp]int l1
[r8-LoopBack1]ip add 192.168.2.1 24
[r8-LoopBack1]bgp 3
[r8-bgp]network 192.168.2.0 24
实验验证:
邻居表:
边栏推荐
猜你喜欢
2022.8.3
Marketing Suggestions | You have an August marketing calendar to check! Suggest a collection!
15.1.1、md—md的基础语法,快速的写文本备忘录
深度学习21天——卷积神经网络(CNN):天气识别(第5天)
Overall design and implementation of Kubernetes-based microservice project
轩辕实验室丨欧盟EVITA项目预研 第一章(四)
使用稀疏 4D 卷积对 3D LiDAR 数据中的运动对象进行后退分割(IROS 2022)
Redis源码解析:Redis Cluster
如何实现按键的短按、长按检测?
mySQL数据库初始化失败,有谁可以指导一下吗
随机推荐
新白娘子传奇系列
干货!生成模型的评价与诊断
XCODE12 在使用模拟器(SIMULATOR)时编译错误的解决方法
Linux导出数据库数据到硬盘
thinkPHP5 realizes clicks (data increment/decrement)
Seata source code analysis: initialization process of TM RM client
汇编语言(8)x86内联汇编
openpyxl操作Excel文件
无题五
There is only one switch, how to realize the nqa of master-slave automatic switching
Excuse me, guys, is it impossible to synchronize two databases in real time using Flink SQL CDC?
Dynamic memory development (C language)
Why is pnpm hitting npm and yarn dimensionality reduction?
PAT乙级-B1020 月饼(25)
手把手教你纯c实现异常捕获try-catch组件
无题二
sql server收缩日志的作业和记录,失败就是因为和备份冲突了吗?
mysql进阶(二十七)数据库索引原理
使用HBuilder离线本地打包ipa教程
工程制图直线投影练习