学习新思想,争做新青年。今天学习BGP自动路由聚合
实验目的
·理解BGP自动路由聚合的概念
·掌握BGP自动路由聚合的配置
实验拓扑

实验要求
三台路由器都使用直连的物理接口IP地址来建立EBGP邻居关系,R2和R3的Loopback1接口用来模拟各自ISP中的一个网段。R1、R2、R3上将开启自动路由聚合功能,R3的Loopback1接口所在网段将使用network命令通告给BGP进程,R2的Loopback1接口所在网段将被引入到BGP进程中,最终实现R2的Loopback1与R3的Loopback1之间可以互相通信。
实验配置
1、基本配置
R1:
sys
sysname R1
int loop 0
ip add 10.0.1.1 32
int g0/0/0
ip add 10.0.12.1 24
int g0/0/1
ip add 10.0.13.1 24
q
R2:
sys
sysname R2
int loop 0
ip add 10.0.2.2 32
int loop 1
ip add 22.22.22.22 24
int g0/0/0
ip add 10.0.12.2 24
q
R3:
sys
sysname R3
int loop 0
ip add 10.0.3.3 32
int loop 1
ip add 33.33.33.33 24
int g0/0/1
ip add 10.0.13.3 24
q
2.配置BGP路由协议
配置BGP邻居关系,每台路由器均使用Loopback0接口的IP地址作为自己的Router-ID。
R1\]bgp 100 \[R1-bgp\]router-id 10.0.1.1 \[R1-bgp\]peer 10.0.12.2 as-number 200 \[R1-bgp\]peer 10.0.13.3 as-number 300 \[R2\]bgp 200 \[R2-bgp\]router-id 10.0.2.2 \[R2-bgp\]peer 10.0.12.1 as-number 100 \[R3\]bgp 300 \[R3-bgp\]router-id 10.0.3.3 \[R3-bgp\]peer 10.0.13.1 as-number 100 3.开启 BGP 自动路由聚合功能 缺省情况下,华为设备的 BGP 自动路由聚合功能是关闭的,现在开启这一功能。 \[R1\]bgp 100 \[R1-bgp\]ipv4-family unicast \[R1-bgp-af-ipv4\]summary automatic \[R2\]bgp 200 \[R2-bgp\]ipv4-family unicast \[R2-bgp-af-ipv4\]summary automatic \[R3\]bgp 300 \[R3-bgp\]ipv4-family unicast \[R3-bgp-af-ipv4\]summary automatic 4.通告路由进入BGP中 使用network命令,将R3的Loopback1接口所在网段通告进入BGP进程。 \[R3\]bgp 300 \[R3-bgp\]ipv4-family unicast \[R3-bgp-af-ipv4\]network 33.33.33.0 24 引入外部路由到 BGP 协议中 在 R2 上使用 import-route 命令引入直连的路由。 \[R2\]bgp 200 \[R2-bgp\]ipv4-family unicast \[R2-bgp-af-ipv4\]import-route direct