华为ensp-BGP联盟

学习新思想,争做新青年,今天学习BGP联盟

实验介绍

一个BGP联盟是一个具有内部层次结构的AS。一个BGP联盟由若干个子AS 组成,子AS也称为成员AS。对于一个BGP联盟,其成员AS内部的各路由器之间需要建立全互联的IBGP邻居关系或使用BGP路由反射器,而成员AS之间需建立EBGP邻居关系。从联盟外的EBGP对等体来看,整个联盟无异于一个普通的AS,联盟内部的结构对于联盟外的EBGP对等体来说是完全透明的。

每一个联盟都有一个联盟号,它其实就是一个普通的AS编号。联盟中的成员AS通常使用BGP协议预留的私有AS编号,但也可以使用非预留的AS编号。联盟内各成员AS可以使用相同的IGP协议,也可使用不同的IGP协议。

实验目的:

理解BGP联盟的概念和作用

掌握配置BGP联盟的基本方法

实验内容:

本实验模拟了一个企业网络场景,AS 100为分公司网络,AS 200为公司总部网络,所有的路由器都运行BGP协议,R1的Loopback 1接口模拟了分公司的内部网络。现在,要求公司总部网络需要拥有去往分公司的内部网络的BGP路由,但网络管理员发现公司总部的路由器数量较多,建立全互联IBGP邻居关系需要进行大量的配置工作,特别是公司总部网络后续扩展以后,配置工作的繁杂程度将会变得无法接受。因此,网络管理员决定使用BGP联盟技术来优化公司总部的网络架构:公司总部网络被视为一个BGP联盟,AS编号为200,R2属于成员AS 2001,R3和 R4属于成员 AS 2002,R5 和 R6 属于成员 AS 2003。

实验拓扑

实验配置

1、基础配置

R1:

sys

sysname R1

int loop 0

ip add 10.0.1.1 32

int loop 1

ip add 10.0.100.1 24

int g0/0/0

ip add 10.0.12.1 24

q

R2:

sys

sysname R2

int loop 0

ip add 10.0.2.2 32

int g0/0/0

ip add 10.0.12.2 24

int g0/0/1

ip add 10.0.23.2 24

int g0/0/2

ip add 10.0.25.2 24

q

R3:

sys

sysname R3

int loop 0

ip add 10.0.3.3 32

int g0/0/1

ip add 10.0.23.3 24

int g0/0/0

ip add 10.0.34.3 24

q

R4:

sys

sysname R4

int loop 0

ip add 10.0.4.4 32

int g0/0/0

ip add 10.0.34.4 24

q

R5:

sys

sysname R5

int loop 0

ip add 10.0.5.5 32

int g0/0/2

ip add 10.0.25.5 24

int g0/0/0

ip add 10.0.56.5 24

q

R6:

sys

sysname R6

int loop 0

ip add 10.0.6.6 32

int g0/0/0

ip add 10.0.56.6 24

q

2.配置 OSPF 路由协议

在 AS 200 内部的路由器上配置 OSPF 协议作为 IGP 协议。

R2\]ospf 1 router-id 10.0.2.2 \[R2-ospf-1\]area 0 \[R2-ospf-1-area-0.0.0.0\]network 10.0.23.0 0.0.0.255 \[R2-ospf-1-area-0.0.0.0\]network 10.0.25.0 0.0.0.255 \[R2-ospf-1-area-0.0.0.0\]network 10.0.2.2 0.0.0.0 \[R3\]ospf 1 router-id 10.0.3.3 \[R3-ospf-1\]area 0 \[R3-ospf-1-area-0.0.0.0\]network 10.0.3.3 0.0.0.0 \[R3-ospf-1-area-0.0.0.0\]network 10.0.23.0 0.0.0.255 \[R3-ospf-1-area-0.0.0.0\]network 10.0.34.0 0.0.0.255 \[R4\]ospf 1 router-id 10.0.4.4 \[R4-ospf-1\]area 0 \[R4-ospf-1-area-0.0.0.0\]network 10.0.4.4 0.0.0.0 \[R4-ospf-1-area-0.0.0.0\]network 10.0.34.0 0.0.0.255 \[R5\]ospf 1 router-id 10.0.5.5 \[R5-ospf-1\]area 0 \[R5-ospf-1-area-0.0.0.0\]network 10.0.5.5 0.0.0.0 \[R5-ospf-1-area-0.0.0.0\]network 10.0.25.0 0.0.0.255 \[R5-ospf-1-area-0.0.0.0\]network 10.0.56.0 0.0.0.255 \[R6\]ospf 1 router-id 10.0.6.6 \[R6-ospf-1\]area 0 \[R6-ospf-1-area-0.0.0.0\]network 10.0.6.6 0.0.0.0 \[R6-ospf-1-area-0.0.0.0\]network 10.0.56.0 0.0.0.255 3.配置 BGP 路由协议 建立 R1 与 R2 的 EBGP 对等体关系;在 AS 200 内部建立全互联的 IBGP 对等体关系。 \[R1\]bgp 100 \[R1-bgp\]router-id 10.0.1.1 \[R1-bgp\]peer 10.0.12.2 as-number 200 \[R1-bgp\]network 10.0.100.1 255.255.255.0 \[R2\]bgp 200 \[R2-bgp\]router-id 10.0.2.2 \[R2-bgp\]peer 10.0.12.1 as-number 100 \[R2-bgp\]peer 10.0.3.3 as-number 200 \[R2-bgp\]peer 10.0.3.3 connect-interface LoopBack 0 \[R2-bgp\]peer 10.0.3.3 next-hop-local \[R2-bgp\]peer 10.0.4.4 as-number 200 \[R2-bgp\]peer 10.0.4.4 connect-interface LoopBack 0 \[R2-bgp\]peer 10.0.4.4 next-hop-local \[R2-bgp\]peer 10.0.5.5 as-number 200 \[R2-bgp\]peer 10.0.5.5 connect-interface LoopBack 0 \[R2-bgp\]peer 10.0.5.5 next-hop-local \[R2-bgp\]peer 10.0.6.6 as-number 200 \[R2-bgp\]peer 10.0.6.6 connect-interface LoopBack 0 \[R2-bgp\]peer 10.0.6.6 next-hop-local \[R3\]bgp 200 \[R3-bgp\]router-id 10.0.3.3 \[R3-bgp\]peer 10.0.2.2 as-number 200 \[R3-bgp\]peer 10.0.2.2 connect-interface LoopBack 0 \[R3-bgp\]peer 10.0.4.4 as-number 200 \[R3-bgp\]peer 10.0.4.4 connect-interface LoopBack 0 \[R3-bgp\]peer 10.0.5.5 as-number 200 \[R3-bgp\]peer 10.0.5.5 connect-interface LoopBack 0 \[R3-bgp\]peer 10.0.6.6 as-number 200 \[R3-bgp\]peer 10.0.6.6 connect-interface LoopBack 0 \[R4\]bgp 200 \[R4-bgp\]router-id 10.0.4.4 \[R4-bgp\]peer 10.0.2.2 as-number 200 \[R4-bgp\]peer 10.0.2.2 connect-interface LoopBack 0 \[R4-bgp\]peer 10.0.3.3 as-number 200 \[R4-bgp\]peer 10.0.3.3 connect-interface LoopBack 0 \[R4-bgp\]peer 10.0.5.5 as-number 200 \[R4-bgp\]peer 10.0.5.5 connect-interface LoopBack 0 \[R4-bgp\]peer 10.0.6.6 as-number 200 \[R4-bgp\]peer 10.0.6.6 connect-interface LoopBack 0 \[R5\]bgp 200 \[R5-bgp\]router-id 10.0.5.5 \[R5-bgp\]peer 10.0.2.2 as-number 200 \[R5-bgp\]peer 10.0.2.2 connect-interface LoopBack 0 \[R5-bgp\]peer 10.0.3.3 as-number 200 \[R5-bgp\]peer 10.0.3.3 connect-interface LoopBack 0 \[R5-bgp\]peer 10.0.4.4 as-number 200 \[R5-bgp\]peer 10.0.4.4 connect-interface LoopBack 0 \[R5-bgp\]peer 10.0.6.6 as-number 200 \[R5-bgp\]peer 10.0.6.6 connect-interface LoopBack 0 \[R6\]bgp 200 \[R6-bgp\]router-id 10.0.6.6 \[R6-bgp\]peer 10.0.2.2 as-number 200 \[R6-bgp\]peer 10.0.2.2 connect-interface LoopBack 0 \[R6-bgp\]peer 10.0.3.3 as-number 200 \[R6-bgp\]peer 10.0.3.3 connect-interface LoopBack 0 \[R6-bgp\]peer 10.0.4.4 as-number 200 \[R6-bgp\]peer 10.0.4.4 connect-interface LoopBack 0 \[R6-bgp\]peer 10.0.5.5 as-number 200 \[R6-bgp\]peer 10.0.5.5 connect-interface LoopBack 0 4.配置 BGP 联盟 接下来将把 AS 200 视为一个 BGP 联盟,并根据实验拓扑图进行相应的配置,从而减少 AS 200 内部 IBGP 邻居关系的数量。 在 R2 上使用命令 undo bgp 200 删除当前 BGP 进程。 \[R2\]undo bgp 200 Warning: All BGP configurations will be deleted. Continue? \[Y/N\]: y 使用 bgp 2001 命令配置 R2 所属的成员 AS 编号,并启动 BGP 协议进程。 \[R2\]bgp 2001 \[R2-bgp\]router-id 10.0.2.2 在 BGP 视图下使用 confederation id 200 命令配置 R2 所属的联盟 ID。 \[R2-bgp\]confederation id 200 使用 confederation peer-as 2002 2003 命令指明 R2 的联盟 EBGP 邻居所属的成员 AS 编号。该命令只能配置在存在联盟 EBGP 邻居的 BGP 路由器上。 \[R2-bgp\]confederation peer-as 2002 2003 使用peer 10.0.23.3 as-number 2002和peer 10.0.25.5 as-number 2003命令,与成员AS 2002中的路由器R3,以及成员AS 2003中的路由器R5建立联盟EBGP邻居关系,且指明在发送路由信息时将把Next Hop属性修改为自己。 \[R2-bgp\]peer 10.0.23.3 as-number 2002 \[R2-bgp\]peer 10.0.23.3 next-hop-local \[R2-bgp\]peer 10.0.25.5 as-number 2003 \[R2-bgp\]peer 10.0.25.5 next-hop-local 使用peer 10.0.12.1 as-number 100命令与AS 100中的路由器R1建立EBGP邻居关系。 \[R2-bgp\]peer 10.0.12.1 as-number 100 \[R3\]undo bgp 200 Warning: All BGP configurations will be deleted. Continue? \[Y/N\]: y \[R3\]bgp 2002 \[R3-bgp\]router-id 10.0.3.3 \[R3-bgp\]confederation id 200 \[R3-bgp\]confederation peer-as 2001 \[R3-bgp\]peer 10.0.23.2 as-number 2001 \[R3-bgp\]peer 10.0.34.4 as-number 2002 \[R4\]undo bgp 200 Warning: All BGP configurations will be deleted. Continue? \[Y/N\]: y \[R4\]bgp 2002 \[R4-bgp\]router-id 10.0.4.4 \[R4-bgp\]confederation id 200 \[R4-bgp\]peer 10.0.34.3 as-number 2002 \[R5\]undo bgp 200 Warning: All BGP configurations will be deleted. Continue? \[Y/N\]: y \[R5\]bgp 2003 \[R5-bgp\]router-id 10.0.5.5 \[R5-bgp\]confederation id 200 \[R5-bgp\]confederation peer-as 2001 \[R5-bgp\]peer 10.0.25.2 as-number 2001 \[R5-bgp\]peer 10.0.56.6 as-number 2003 \[R6\]undo bgp 200 Warning: All BGP configurations will be deleted. Continue? \[Y/N\]: y \[R6\]bgp 2003 \[R6-bgp\]router-id 10.0.6.6 \[R6-bgp\]confederation id 200 \[R6-bgp\]peer 10.0.56.5 as-number 2003 配置完毕

相关推荐
遇到困难睡大觉哈哈10 小时前
HarmonyOS 公共事件机制介绍以及多进程之间的通信实现(9000字详解)
华为·harmonyos
伍哥的传说13 小时前
鸿蒙系统(HarmonyOS)应用开发之实现电子签名效果
开发语言·前端·华为·harmonyos·鸿蒙·鸿蒙系统
Fanmeang18 小时前
OSPF高级特性之FRR
运维·网络·华为·ip·ospf·spf·frr
kumalab18 小时前
HarmonyOS ArkTS卡片堆叠滑动组件实战与原理详解(含源码)
华为·harmonyos
瑶光守护者1 天前
【卫星通信】超低比特率语音编解码器(ULBC)的信道特性评估
深度学习·华为·卫星通信·3gpp·ulbc
不凡的凡1 天前
鸿蒙图片相似性对比
华为·harmonyos
yenggd10 天前
动态ds-vnp之normal和shortcut两种方式配置案例
网络·华为
Jackilina_Stone10 天前
【网工】华为配置专题进阶篇⑤
网络·华为·网工
yantaohk10 天前
华为HN8145V光猫改华为蓝色公版界面,三网通用,xgpon公版光猫
华为
知孤云出岫11 天前
华为网络管理与运维知识点总结及案例习题
运维·华为