当前位置:网站首页>HCIP第十三天作业——综合实验
HCIP第十三天作业——综合实验
2022-08-08 18:01:00 【 ᝰꫛꫀꪝ】
1、实验要求
1.合理IP地址
2.AS 1 2 3 内部使用OSPF 协议 , AS 1 AS 2内部建立全互联的IBGP邻居 ,AS之间建立全部的EBGP邻居
3.PC 1 3 5 属于电信的路由,通信时必须使用电信AS 1 ;
PC 2 4 6 属于联通的路由,通信时必须使用联通的 AS 2
4.若 R1-R9之间链路断开,电信的路由依然通过电信 AS 1 通信
2、实验拓扑
3、分析过程
1、IP的规划以及配置
2、AS1、AS2、AS3区域内的OSPF的配置
3、IBGP与EBGP关系的配置
4、6个用户网段在BGP中的宣告
5、BGP的扩展配置
4、配置内容
1、IP的规划,如拓扑所示,除R11外每台路由器配置一个建邻环回,R1为1.1.1.1/24 以此类推
2、AS1、AS2、AS3区域内的OSPF的配置——这里以R1为例
3、IBGP与EBGP关系的配置——AS1、AS2、AS3区域内为全IBGP关系——这里以R1和R8为例
bgp 1
peer 3.3.3.3 as-number 1
peer 3.3.3.3 connect-interface LoopBack0
peer 5.5.5.5 as-number 1
peer 5.5.5.5 connect-interface LoopBack0
peer 7.7.7.7 as-number 1
peer 7.7.7.7 connect-interface LoopBack0
peer 12.1.1.2 as-number 2
peer 19.1.1.9 as-number 3
#
ipv4-family unicast
undo synchronization
peer 3.3.3.3 enable
peer 3.3.3.3 next-hop-local
peer 3.3.3.3 advertise-community
peer 5.5.5.5 enable
peer 5.5.5.5 next-hop-local
peer 5.5.5.5 advertise-community
peer 7.7.7.7 enable
peer 7.7.7.7 next-hop-local
peer 7.7.7.7 advertise-community
peer 12.1.1.2 enable
peer 12.1.1.2 advertise-community
peer 19.1.1.9 enable
peer 19.1.1.9 advertise-community
R8:
bgp 2
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
peer 6.6.6.6 as-number 2
peer 6.6.6.6 connect-interface LoopBack0
peer 11.8.1.11 as-number 4
peer 78.1.1.7 as-number 1
#
ipv4-family unicast
undo synchronization
peer 2.2.2.2 enable
peer 2.2.2.2 next-hop-local
peer 2.2.2.2 advertise-community
peer 4.4.4.4 enable
peer 4.4.4.4 next-hop-local
peer 4.4.4.4 advertise-community
peer 6.6.6.6 enable
peer 6.6.6.6 next-hop-local
peer 6.6.6.6 advertise-community
peer 11.8.1.11 enable
peer 11.8.1.11 advertise-community
peer 78.1.1.7 enable
peer 78.1.1.7 route-policy 5 import
peer 78.1.1.7 advertise-community
4、6个用户网段在BGP中的宣告——这里以R9为例
5、BGP的扩展配置
①首先将图中所有的邻居关系都打开使用扩展配置的命令——以R1为例所有的邻居间都需要设置
peer 19.1.1.9 advertise-community
peer 12.1.1.2 advertise-community
peer 3.3.3.3 advertise-community
peer 5.5.5.5 advertise-community
peer 7.7.7.7 advertise-community
②分别在R9、R10、R11上面设置对应网段的扩展属性——首先抓取流量,之后使用route-policy配置
R9与R10相同:
ip ip-prefix 13 index 10 permit 192.168.1.0 24
ip ip-prefix 13 index 20 permit 192.168.3.0 24
ip ip-prefix 24 index 10 permit 192.168.2.0 24
ip ip-prefix 24 index 20 permit 192.168.4.0 24
route-policy a permit node 10
if-match ip-prefix 13
apply community 100:3
#
route-policy a permit node 20
if-match ip-prefix 24
apply community 200:3
#
route-policy a permit node 30
随后在接口调用
最后在R11上配置对应的内容
ip community-filter advanced a13 permit 100:.*
ip community-filter advanced a24 permit 200:.*
使用route-policy将相对应的流量抓取,之后修改其local-preference
route-policy a permit node 10
if-match community-filter a13
apply local-preference 105
#
route-policy a permit node 20
#
route-policy b permit node 10
if-match community-filter a24
apply local-preference 105
#
route-policy b permit node 20
之后在对应的接口调用
随后在R11上配置在R9和R10上面配置的内容,然后在分别在R9和R10上面抓取并且调用
R11
R9:
R10:
以上即可实现PC1、3、5在联通网络中通信;PC2、4、6在电信网络中通信
③为了实现第4个要求,需要在R2\4\6\8上配置使得R1与R9断开时,PC1找PC5是从R4到联通网络,所以需要在R2\4\6\8上面配置相同的内容——这里以R2为例
将其调用在于AS1的EBGP邻居关系上
因为BGP选路中EBGP的优于IBGP的路由,所以要使得PC5在返回的是时候也是通过联通网络到R4然后再到所对应的主机,需要在R4上配置对应的内容
这里修改其AS-path属性
随后在其IBGP关系的邻居接口上调用
5、结果验证
正常情况PC1和PC3pingPC5
PC1:
PC3:
PC2和PC4pingPC6
PC2:
PC4:
R1和R9之间线路断开时
PC1–>PC5
PC5—>PC1
边栏推荐
- 同态加密:正则嵌入、理想格和RLWE问题
- Superficial understanding of ports
- 记录贴:pytorch学习Part1
- 【FPGA教程案例46】图像案例6——基于FPGA的图像高斯滤波verilog实现,通过MATLAB进行辅助验证
- 面试突击:输入URL之后会执行什么流程?
- CF1716D(“按顺序“的完全背包)
- CS231n: 11 Generative Models
- 【AI玩家养成记 • 第3期】AI开发者必备!史上最适合新手的昇腾AI环境搭建教程!!
- 章节小测一
- Task-Driven Super Resolution: Object Detection in Low-resolution Images
猜你喜欢
21天学习第五天--数组
2021年9月电子学会图形化一级编程题解析含答案:无奈的Jaime
QT With OpenGL(泛光)(Bloom)
CF696C(计数推公式+欧拉降幂)
Nioke 2022 Summer Multi-School 6 B Eezie and Pie (Difference on the tree + multiplication to find the kth ancestor board)
串行通信:常见的串行通信接口协议UART、SPI、I2C简介
Vscode LeetCode 教程
比较器是否可以当做运放使用?
瑞利衰落条件下扩频通信系统误码率仿真
js温度计插件自定义数值
随机推荐
The difference between a uri (url urn)
数据压缩和归档(三)、tarfile
用皮肤“听”音乐,网友戴上这款装备听音乐会:仿佛住在钢琴里
数字货币永续合约交易所开发开发功能以及代码呈现
QT With OpenGL(泛光)(Bloom)
Open source summer | I have nothing to do during the epidemic, I made a button display box special effect to display my blog
盘点检索任务中的损失函数
How banner displays drawable images
多线程之不可变对象
【目标检测】YOLOv5:标签中文显示/自定义颜色
【Promise.allSettled】手写Promise.allSettled方法
看三年的CRUD程序员如何解决数据库死锁的
The new version of squirrel as source change operation
面试官:Redis 大 key 要如何处理?
【云图说】第252期 初识云速建站服务
Go源码之原子操作(atomic)
前缀和的本质
【目标检测】小脚本:根据xml批量复制jpg图片
企业“数字化转型”成功的2个必备条件!
套接字的概念