当前位置:网站首页>【HCIP】BGP的联邦+反射器实验
【HCIP】BGP的联邦+反射器实验
2022-08-06 01:35:00 【1ta-chi】
实验要求
- R2-7 每台路由器均存在一个环回接口用于建邻,同时还存在一个环回来代表连接用户的接口
- 连接用户的接口网络需要可以和 R1/8 的环回通讯
- AS2 网段地址为
172.16.0.0/16
,要求减少路由条目
实验过程
IP地址划分
在AS 2中,基于 172.16.0.0/16
进行IP地址划分
首先6个环回建邻接口:
172.16.0.2/32
172.16.0.3/32
172.16.0.4/32
172.16.0.5/32
172.16.0.6/32
172.16.0.7/32
然后每台路由器上都有模拟用户的网段:
172.16.2.0/24
172.16.3.0/24
172.16.4.0/24
172.16.5.0/24
172.16.6.0/24
172.16.7.0/24
最后路由器间的网段公有6个:
172.16.1.0/24
-------------
172.16.1.0/27
172.16.1.32/27
172.16.1.64/27
172.16.1.96/27
172.16.1.128/27
172.16.1.160/27
172.16.1.192/27(弃)
172.16.1.224/27(弃)
OSPF
路由表展示:
建邻(联邦+反射器)
//R1 - AS 1
bgp 1
router-id 1.1.1.1
peer 12.1.1.2 as-number 2
#
ipv4-family unicast
undo synchronization
peer 12.1.1.2 enable
//R2 - AS 64512
bgp 64512 //联邦
router-id 2.2.2.2
confederation id 2
confederation peer-as 64513
peer 12.1.1.1 as-number 1
peer 172.16.0.3 as-number 64512
peer 172.16.0.3 connect-interface LoopBack0
peer 172.16.0.5 as-number 64513
peer 172.16.0.5 ebgp-max-hop 2
peer 172.16.0.5 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
peer 12.1.1.1 enable
peer 172.16.0.3 enable
peer 172.16.0.3 next-hop-local
peer 172.16.0.5 enable
peer 172.16.0.5 next-hop-local
//R3 - AS 64512
bgp 64512
router-id 3.3.3.3
confederation id 2
peer 172.16.0.2 as-number 64512
peer 172.16.0.2 connect-interface LoopBack0
peer 172.16.0.4 as-number 64512
peer 172.16.0.4 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
peer 172.16.0.2 enable
peer 172.16.0.2 reflect-client //反射器
peer 172.16.0.4 enable
//R4 - AS 64512
bgp 64512
router-id 4.4.4.4
confederation id 2
confederation peer-as 64513
peer 172.16.0.3 as-number 64512
peer 172.16.0.3 connect-interface LoopBack0
peer 172.16.0.7 as-number 64513
peer 172.16.0.7 ebgp-max-hop 2
peer 172.16.0.7 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
peer 172.16.0.3 enable
peer 172.16.0.7 enable
//R5-8 同上
宣告路由
//R2
bgp 64512
ipv4-family unicast
undo synchronization
network 172.16.2.0 255.255.255.0
network 172.16.3.0 255.255.255.0
network 172.16.4.0 255.255.255.0
network 172.16.5.0 255.255.255.0
network 172.16.6.0 255.255.255.0
network 172.16.7.0 255.255.255.0
//R7
bgp 64513
ipv4-family unicast
undo synchronization
network 172.16.2.0 255.255.255.0
network 172.16.3.0 255.255.255.0
network 172.16.4.0 255.255.255.0
network 172.16.5.0 255.255.255.0
network 172.16.6.0 255.255.255.0
network 172.16.7.0 255.255.255.0
BGP展示:
聚合
[R2]ip ip-prefix aa deny 172.16.1.0 24
[R2]ip ip-prefix aa permit 0.0.0.0 0 le 32
[R2]bgp 64512
[R2-bgp]aggregate 172.16.0.0 16 detail-suppressed //聚合
[R2-bgp]peer 12.1.1.1 ip-prefix aa export //调用前缀列表
BGP表展示:
连通性测试:
R1环回 ping R8环回
R1环回 ping AS 2内部环回(R7)
边栏推荐
- SOAP协议学习和使用
- typescript75 - create your own type declaration files (provide declarations for existing js)
- 阿洛的感悟
- 学生违规使用数据库致学校IP永久被封
- js 实现千分位
- Two file types in typescript70-ts
- STM32与K210串口通信的解码问题(基于正点原子源码)
- List<T>Contains, Exists, Any之间的优缺点对比
- (3.2) Metasploit kali - the exploit 】 【 basis (under) : MSF terminal using process
- Safety test - AndroidManifest. XML element analysis (1)
猜你喜欢
Nacos安装指南
17. Learn MySQL Transactions
typescript69-类型声明文件概述
海康联网网关平台级联EasyCVR出现通道无法上线现象,是什么原因?
transceiver toolkit使用说明
Compose 进阶挑战来啦!直播预告|8 月 7 日 晚 19:30 与 GDE 导师面对面
Complete regular expression tutorial, including online exercises
Raj take-out day01 】 : overall introduction and development environment set up
DVWA:Brute Force(High)
电子元件品牌与标识
随机推荐
STM32MP157A驱动开发 | 01- 板载LED作为系统心跳指示灯
js 实现千分位
typescript70-ts中的两种文件类型
关于近期轻量化部署任务的一个小结
The correct posture for Internet workers to write weekly reports
leetcode linked list oj question
[Brush questions series] OJ questions in the sequence table
计算S=a+aa+…+aa…a
民法常识总结1
获取对象的key和value并保存到数组
eslint和prettier实现代码格式化
STM32与K210串口通信的解码问题(基于正点原子源码)
网址收藏-技术类
[mysql]--remember a delete delete statement using an alias pit
Decoding problem of serial communication between STM32 and K210 (based on punctual atomic source code)
【树上差分】CF 1076E. Vasya and a Tree
阿洛的感悟
剑指offer专项突击版第21天
Two file types in typescript70-ts
(3.2) Metasploit kali - the exploit 】 【 basis (under) : MSF terminal using process