当前位置:网站首页>HCIA实验(07)
HCIA实验(07)
2022-08-03 07:57:00 【雨天_】
1.配置IP地址和环回
[r1]int lo0
[r1-LoopBack0]ip add 1.1.1.1 32
[r1]int lo1
[r1-LoopBack1]ip add 1.1.10.1 24
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 12.1.1.1 24
[r2]int lo0
[r2-LoopBack0]ip add 1.1.1.2 32
[r2]int lo1
[r2-LoopBack1]ip add 2.2.2.2 24
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip add 12.1.1.2 24
[r2]int g0/0/1
[r2-GigabitEthernet0/0/1]ip add 23.1.1.1 24
[r3]int lo0
[r3-LoopBack0]ip add 1.1.1.3 32
[r3]int lo1
[r3-LoopBack1]ip add 3.3.3.3 24
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ip add 23.1.1.2 24
[r3]int g0/0/1
[r3-GigabitEthernet0/0/1]ip add 34.1.1.1 24
[r4]int lo0
[r4-LoopBack0]ip add 1.1.1.4 32
[r4]int lo1
[r4-LoopBack1]ip add 4.4.4.4 24
[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]ip add 34.1.1.2 24
[r4]int g0/0/1
[r4-GigabitEthernet0/0/1]ip add 45.1.1.1 24
[r4]int g4/0/0
[r4-GigabitEthernet4/0/0]ip add 54.1.1.1 24
[r5]int lo0
[r5-LoopBack0]ip add 1.1.1.5 32
[r5]int lo1
[r5-LoopBack1]ip add 5.5.5.5 24
[r5]int g0/0/0
[r5-GigabitEthernet0/0/0]ip add 45.1.1.2 24
[r5]int g0/0/1
[r5-GigabitEthernet0/0/1]ip add 54.1.1.2 24
(测试)
2.进行OSPF宣告
[r2]ospf 1 router-id 2.2.2.2
[r2-ospf-1]area 0
[r2-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[r2-ospf-1-area-0.0.0.0]network 1.1.1.2 0.0.0.0
[r2-ospf-1-area-0.0.0.0]network 23.1.1.1 0.0.0.0
[r3]OSPF 1 router-id 3.3.3.3
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0
[r3-ospf-1-area-0.0.0.0]network 1.1.1.3 0.0.0.0
[r3-ospf-1-area-0.0.0.0]network 23.1.1.2 0.0.0.0
[r3-ospf-1-area-0.0.0.0]network 34.1.1.1 0.0.0.0
[r4]ospf 1 router-id 4.4.4.4
[r4-ospf-1]area 0
[r4-ospf-1-area-0.0.0.0]network 4.4.4.4 0.0.0.0
[r4-ospf-1-area-0.0.0.0]network 34.1.1.2 0.0.0.0
[r4-ospf-1-area-0.0.0.0]network 1.1.1.4 0.0.0.0
(查看)
(修改为broadcast)
[r2]int lo1
[r2-LoopBack1]ospf network-type broadcast
[r3]int lo1
[r3-LoopBack1]ospf network-type broadcast
[r4]int lo1
[r4-LoopBack1]ospf network-type broadcast
3.建立邻居关系(配置EBGP和IBGP)
[r1]bgp 1
[r1-bgp]router-id 1.1.1.1
[r1-bgp]peer 12.1.1.2 as-number 2
[r2]bgp 2
[r2-bgp]router-id 2.2.2.2
[r2-bgp]peer 12.1.1.1 as-number 1
(测试)
[r2]bgp 2
[r2-bgp]peer 1.1.1.3 as-number 2
[r2-bgp]peer 1.1.1.3 connect-interface LoopBack 0
[r3]bgp 2
[r3-bgp]router-id 3.3.3.3
[r3-bgp]peer 1.1.1.2 as-number 2
[r3-bgp]peer 1.1.1.2 connect-interface LoopBack 0
[r3-bgp]peer 1.1.1.4 as-number 2
[r3-bgp]peer 1.1.1.4 connect-interface LoopBack 0
[r4]bgp 2
[r4-bgp]router-id 4.4.4.4
[r4-bgp]peer 1.1.1.3 as-number 2
[r4-bgp]peer 1.1.1.3 connect-interface LoopBack 0
(配置静态路由,使得R4和R5有建立邻居的条件)
[r4]ip route-static 1.1.1.5 32 45.1.1.2
[r4]ip route-static 1.1.1.5 32 54.1.1.2
[r5]ip route-static 1.1.1.4 32 45.1.1.1
[r5]ip route-static 1.1.1.4 32 54.1.1.1
(测试)
[r4]bgp 2
[r4-bgp]peer 1.1.1.5 as-number 3
[r4-bgp]peer 1.1.1.5 connect-interface LoopBack 0
[r4-bgp]peer 1.1.1.5 ebgp-max-hop 2
[r5]bgp 3
[r5-bgp]router-id 5.5.5.5
[r5-bgp]peer 1.1.1.4 as-number 2
[r5-bgp]peer 1.1.1.4 connect-interface LoopBack 0
[r5-bgp]peer 1.1.1.4 ebgp-max-hop 2
(查看)
4.配置BGP路由
(1)
[r1]bgp 1
[r1-bgp]network 1.1.10.0 24
(查看)
(完善)
[r2]bgp 2
[r2-bgp]peer 1.1.1.3 next-hop-local
[r2]bgp 2
[r2-bgp]peer 1.1.1.4 as-number 2
[r2-bgp]peer 1.1.1.4 connect-interface LoopBack 0
[r4]bgp 2
[r4-bgp]peer 1.1.1.2 as-number 2
[r4-bgp]peer 1.1.1.2 connect-interface LoopBack 0
(测试)
(2)
[r5]bgp 3
[r5-bgp]network 5.5.5.0 24
[r4-bgp]peer 1.1.1.3 next-hop-local
[r4-bgp]peer 1.1.1.2 next-hop-local
(查看)
5.进行BGP宣告
[r2]bgp 2
[r2-bgp]network 2.2.2.0 24
[r3]bgp 2
[r3-bgp]network 3.3.3.0 24
[r4]bgp 2
[r4-bgp]network 4.4.4.0 24
(查看)
(测试)
边栏推荐
- 如何在安装GBase 8c数据库的时候,报错显示“Host ips belong to different cluster?
- RViz报错: Error subscribing: Unable to load plugin for transport ‘compressed‘解决方法
- Mysql的in和exists用法区别
- 数仓4.0(二)------ 业务数据采集平台
- 最佳高质量字体
- 用云机器/虚拟机架设方舟游戏?
- ArcEngine(三)通过MapControl控件实现放大缩小全图漫游
- AI中台序列标注任务:三个数据集构造过程记录
- mysql备份时的快照原理
- 22-08-02 西安 尚医通(02)Vscode、ES6、nodejs、npm、Bable转码器
猜你喜欢
redis AOF持久化个人理解
服务器资源监控工具-nmon、nmon_analyser
Logic Pro X built-in sound library list
Postman will return to results generated CSV file to the local interface
并发之多把锁和活跃性
《21天精通TypeScript-5》类型注解与原始类型
Roson的Qt之旅#103 QML之标签导航控件TabBar
内存模型之可见性
"Swordsman Offer" brush questions print from 1 to the largest n digits
Windows安装MySQL(MIS)
随机推荐
001-进程与线程
[Hello World] 二分查找笔记
ArcEngine(四)MapControl_OnMouseDown的使用
“碳中和”愿景下,什么样的数据中心才是我们需要的?
mysql备份时的快照原理
Golang协程goroutine的调度与状态变迁分析
mysqlbinlog: unknown variable 'default-character-set=utf8'
流行和声基础大笔记
ArcEngine (4) Use of MapControl_OnMouseDown
“唯一索引允许为空“ 的说法是不严谨的
pyspark---encode the suuid interval (based on the number of exposures and clicks)
Using pipreqs export requirements needed for the project. TXT (rather than the whole environment)
DSP-ADAU1452输出通道配置
mysql存生僻字奇怪问题,mysql为什么不能辨别mb4字符?
控制bean的加载
ArcEngine(八)用IWorkspaceFactory加载矢量数据
前缀和(区间和,子矩阵的和)
wordpress: 裁剪您的图片时发生错误
线性表
力扣(LeetCode)214. 打家劫舍 II(2022.08.02)