目录
第三章 BGP协议特性与配置
实验 3-2 BGP路由汇总
学习目的
·掌握使用network命令实现的BGP路由汇总的配置方法
·掌握实现抑制具体路由的BGP路由汇总的配置方法
·掌握改变汇总路由属性的配置方法
·掌握在路由汇总时使用AS-SET的配置方法
拓扑图
图3-2 BGP路由汇总
场景
你是公司的网络管理员。公司的网络采用了BGP协议作为路由协议。公司的网络由多个自制系统组成,不同的分支机构使用了不同的AS号。随着公司规模的扩大,路由器中已经有越来越多的路由表,进行BGP的路由汇总迫在眉睫。你测试了几种进行路由汇总的方法,最终选择了合适的方式实现了路由汇总。
学习任务
步骤一.基础配置与IP编址
给所有路由器配置物理接口及Loopback接口的IP地址和掩码。注意各Loopback接口地址均为32位掩码。
[R1]interface Serial 1/0/0
[R1-Serial1/0/0]ip address 10.0.12.1 255.255.255.0
[R1-Serial1/0/0]quit
[R1]interface Serial 3/0/0
[R1-Serial3/0/0]ip address 10.0.14.1 255.255.255.0
[R1-Serial3/0/0]quit
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]ip add 10.0.15.1 255.255.255.0
[R1-GigabitEthernet0/0/0]quit
[R1]interface LoopBack 0
[R1-LoopBack0]ip address 10.1.1.1 255.255.255.255
[R1-LoopBack0]quit
[R2]interface Serial 1/0/0
[R2-Serial1/0/0]ip address 10.0.12.2 255.255.255.0
[R2-Serial1/0/0]quit
[R2]interface Serial 2/0/0
[R2-Serial2/0/0]ip address 10.0.23.2 255.255.255.0
[R2-Serial2/0/0]quit
[R2]interface loopback 0
[R2-LoopBack0]ip address 10.1.2.2 255.255.255.255
[R2-LoopBack0]quit
[R3]interface Serial 2/0/0
[R3-Serial2/0/0]quit
[R3]ip address 10.0.23.3 255.255.255.0
[R3-Serial2/0/0]quit
[R3]interface loopback 1
[R3-LoopBack1]ip address 10.1.3.3 255.255.255.255
[R3-LoopBack1]quit
[R4]interface Serial 1/0/0
[R4-Serial1/0/0]ip address 10.0.14.4 255.255.255.0
[R4-Serial1/0/0]quit
[R4]interface loopback 0
[R4-LoopBack0]ip address 10.0.4.4 255.255.255.255
[R4-LoopBack0]quit
[R5]interface GigabitEthernet 0/0/0
[R5-GigabitEthernet0/0/0]ip address 10.0.15.5 255.255.255.0
[R5-GigabitEthernet0/0/0]quit
[R5]interface loopback 0
[R5-LoopBack0]ip address 10.1.5.5 255.255.255.255
[R5-LoopBack0]quit
配置完成后,测试直连链路的连通性。
[R1]ping -c 1 10.0.12.2
PING 10.0.12.2: 56 data bytes, press CTRL_C to break
Reply from 10.0.14.4: bytes=56 Sequence=1 ttl=255 time=41 ms
--- 10.0.12.2 ping statistics ---
1 packet(s) transmitted
1 packet(s) received
0.00% packet loss
round-trip min/avg/max = 41/41/41 ms
[R1]ping -c 1 10.0.14.4
PING 10.0.14.4: 56 data bytes, press CTRL_C to break
Reply from 10.0.14.4: bytes=56 Sequence=1 ttl=255 time=41 ms
--- 10.0.14.4 ping statistics ---
1 packet(s) transmitted
1 packet(s) received
0.00% packet loss
round-trip min/avg/max = 41/41/41 ms
[R1]ping -c 1 10.0.15.5
PING 10.0.15.5: 56 data bytes, press CTRL_C to break
Reply from 10.0.15.5: bytes=56 Sequence=1 ttl=255 time=34 ms
--- 10.0.15.5 ping statistics ---
1 packet(s) transmitted
1 packet(s) received
0.00% packet loss
round-trip min/avg/max = 34/34/34 ms
[R2]ping -c 1 10.0.23.3
PING 10.0.23.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.23.3: bytes=56 Sequence=1 ttl=255 time=34 ms
--- 10.0.23.3 ping statistics ---
1 packet(s) transmitted
1 packet(s) received
0.00% packet loss
round-trip min/avg/max = 34/34/34 ms
步骤二.配置EBGP及发布路由
各直连路由器之间直接使用物理接口地址建立BGP对等体关系。
[R1]router id 10.1.1.1
[R1]bgp 64513
[R1-bgp]peer 10.0.12.2 as-number 64514
[R1-bgp]peer 10.0.14.4 as-number 64512
[R1-bgp]peer 10.0.15.5 as-number 64516
[R1-bgp]quit
[R2]router id 10.1.2.2
[R2]bgp 64514
[R2-bgp]peer 10.0.12.1 as-number 64513
[R2-bgp]peer 10.0.23.3 as-number 64515
[R2-bgp]quit
[R3]router id 10.1.3.3
[R3]bgp 64515
[R3-bgp]peer 10.0.23.2 as-number 64514
[R3-bgp]quit
[R4]router id 10.0.4.4
[R4]bgp 64512
[R4-bgp]peer 10.0.14.1 as-number 64513
[R4-bgp]quit
[R5]router id 10.1.5.5
[R5]bgp 64516
[R5-bgp]peer 10.0.15.1 as-number 64513
[R5-bgp]quit
配置完成以后检查对等体关系,
[R1]display bgp peer
BGP local router ID : 10.1.1.1
Local AS number : 64513
Total number of peers : 3 Peers in established state : 3
Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
10.0.12.2 4 64514 4 6 0 00:02:19 Established 0
10.0.14.4 4 64512 2 4 0 00:00:40 Established 0
10.0.15.5 4 64516 2 4 0 00:00:17 Established 0
[R2]display bgp peer
BGP local router ID : 10.1.2.2
Local AS number : 64514
Total number of peers : 2 Peers in established state : 2
Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
10.0.12.1 4 64513 5 6 0 00:03:42 Established 0
10.0.23.3 4 64515 4 6 0 00:02:25 Established 0
[R3]display bgp peer
BGP local router ID : 10.1.3.3
Local AS number : 64515
Total number of peers : 1 Peers in established state : 1
Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
10.0.23.2 4 64514 6 7 0 00:04:55 Established 0
[R4]display bgp peer
BGP local router ID : 10.0.4.4
Local AS number : 64512
Total number of peers : 1 Peers in established state : 1
Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
10.0.14.1 4 64513 7 8 0 00:05:11 Established 0
[R5]display bgp peer
BGP local router ID : 10.1.5.5
Local AS number : 64516
Total number of peers : 1 Peers in established state : 1
Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
10.0.15.1 4 64513 7 8 0 00:05:16 Established 0
BGP邻居状态此时全部都是Established状态。
使用network命令将各个路由器的Loopback接口网段发布进BGP。
[R1]bgp 64513
[R1-bgp]network 10.1.1.1 255.255.255.255
[R1-bgp]quit
[R2]bgp 64514
[R2-bgp]network 10.1.2.2 255.255.255.255
[R2-bgp]quit
[R3]bgp 64515
[R3-bgp]network 10.1.3.3 255.255.255.255
[R3-bgp]quit
[R4]bgp 64512
[R4-bgp]network 10.0.4.4 255.255.255.255
[R4-bgp]quit
[R5]bgp 64516
[R5-bgp]network 10.1.5.5 255.255.255.255
[R5-bgp]quit
在R4上查看BGP路由表,观察AS-PATH属性的信息。
[R4]display bgp routing-table
BGP Local router ID is 10.0.4.4
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 5
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 10.0.4.4/32 0.0.0.0 0 0 i
*> 10.1.1.1/32 10.0.14.1 0 0 64513i
*> 10.1.2.2/32 10.0.14.1 0 64513 64514i
*> 10.1.3.3/32 10.0.14.1 0 64513 64514 64515i
*> 10.1.5.5/32 10.0.14.1 0 64513 64516i
步骤三.使用Network实现对BGP路由的汇总
现在需要在R1上进行路由汇总。
在R1上添加指向Null0接口的静态路由10.1.0.0/16,并使用network命令发布该路由。
[R1]ip route-static 10.1.0.0 16 NULL 0
[R1]bgp 64513
[R1-bgp]network 10.1.0.0 255.255.0.0
[R1-bgp]quit
在R4上查看路由表,观察汇总路由是否存在。
<R4>display bgp routing-table
BGP Local router ID is 10.0.4.4
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 6
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 10.0.4.4/32 0.0.0.0 0 0 i
*> 10.1.0.0/16 10.0.14.1 0 0 64513i
*> 10.1.1.1/32 10.0.14.1 0 0 64513i
*> 10.1.2.2/32 10.0.14.1 0 64513 64514i
*> 10.1.3.3/32 10.0.14.1 0 64513 64514 64515i
*> 10.1.5.5/32 10.0.14.1 0 64513 64516i
设置名为pref_detail_control的前缀列表,对向对等体R4发送的路由进行过滤,不允许汇总路由中包括的详细路由被发送过去。
[R1]ip ip-prefix pref_detail_control index 10 permit 10.1.0.0 8 less-equal 24
[R1]bgp 64513
[R1-bgp]peer 10.0.14.4 ip-prefix pref_detail_control export
[R1-bgp]quit
在R4上再次查看BGP路由表。注意观察汇总后路由的As-path属性。
<R4>display bgp routing-table
BGP Local router ID is 10.0.4.4
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 2
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 10.0.4.4/32 0.0.0.0 0 0 i
*> 10.1.0.0/16 10.0.14.1 0 0 64513i
步骤四.使用Aggregate实现对BGP路由的汇总
删去步骤三中使用的前缀列表及network命令发布的汇总路由。
使用Aggregate命令对路由10.1.0.0/16进行汇总,使用默认方式进行。
[R1]bgp 64513
[R1-bgp]undo network 10.1.0.0 255.255.0.0
[R1-bgp]undo peer 10.0.14.4 ip-prefix pref_detail_control export
[R1-bgp]quit
[R1]undo ip ip-prefix pref_detail_control
[R1]undo ip route-static 10.1.0.0 16 NULL 0
[R1]bgp 64513
[R1-bgp]aggregate 10.1.0.0 255.255.0.0
[R1-bgp]quit
在R1、R4查看BGP路由表。观察汇总路由的Origin属性。
[R1]display bgp routing-table
BGP Local router ID is 10.1.1.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 6
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 10.0.4.4/32 10.0.14.4 0 0 64512i
*> 10.1.0.0/16 127.0.0.1 0 i
*> 10.1.1.1/32 0.0.0.0 0 0 i
*> 10.1.2.2/32 10.0.12.2 0 0 64514i
*> 10.1.3.3/32 10.0.12.2 0 64514 64515i
*> 10.1.5.5/32 10.0.15.5 0 0 64516i
<R4>display bgp routing-table
BGP Local router ID is 10.0.4.4
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 6
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 10.0.4.4/32 0.0.0.0 0 0 i
*> 10.1.0.0/16 10.0.14.1 0 64513i
*> 10.1.1.1/32 10.0.14.1 0 0 64513i
*> 10.1.2.2/32 10.0.14.1 0 64513 64514i
*> 10.1.3.3/32 10.0.14.1 0 64513 64514 64515i
*> 10.1.5.5/32 10.0.14.1 0 64513 64516i
汇总路由的origin属性没有改变,仍旧是IGP。
在R1配置路由汇总时,抑制明细路由,仅通告聚合路由。
[R1]bgp 64513
[R1-bgp]aggregate 10.1.0.0 255.255.0.0 detail-suppressed
[R1-bgp]quit
在R4查看BGP路由表。
[R4]display bgp routing-table
BGP Local router ID is 10.0.4.4
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 2
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 10.0.4.4/32 0.0.0.0 0 0 i
*> 10.1.0.0/16 10.0.14.1 0 64513i
这时R4上已经看不到明细路由。
观察R1的全局路由表,查看路由10.1.0.0/16的下一跳。
[R1]display ip routing-table
Route Flags: R - relay, D - download to fib
----------------------------------------------------------------------------
Routing Tables: Public
Destinations : 21 Routes : 21
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.0.4.4/32 EBGP 255 0 D 10.0.14.4 Serial3/0/0
10.0.12.0/24 Direct 0 0 D 10.0.12.1 Serial1/0/0
10.0.12.1/32 Direct 0 0 D 127.0.0.1 Serial1/0/0
10.0.12.2/32 Direct 0 0 D 10.0.12.2 Serial1/0/0
10.0.12.255/32 Direct 0 0 D 127.0.0.1 Serial1/0/0
10.0.14.0/24 Direct 0 0 D 10.0.14.1 Serial3/0/0
10.0.14.1/32 Direct 0 0 D 127.0.0.1 Serial3/0/0
10.0.14.4/32 Direct 0 0 D 10.0.14.4 Serial3/0/0
10.0.14.255/32 Direct 0 0 D 127.0.0.1 Serial3/0/0
10.0.15.0/24 Direct 0 0 D 10.0.15.1 GigabitEthernet0/0/0
10.0.15.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/0
10.0.15.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/0
10.1.0.0/16 IBGP 255 0 D 0.0.0.0 NULL0
10.1.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
10.1.2.2/32 EBGP 255 0 D 10.0.12.2 Serial1/0/0
10.1.3.3/32 EBGP 255 0 D 10.0.12.2 Serial1/0/0
10.1.5.5/32 EBGP 255 0 D 10.0.15.5 GigabitEthernet0/0/0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32Direct 0 0 D 127.0.0.1 InLoopBack0
因为这条聚合路由是R1上配置的,所以出接口为Null0,这样定义的汇总路由有利于避免路由环路的产生。
观察R1的BGP路由表,观察明细路由。
[R1]display bgp routing-table
BGP Local router ID is 10.1.1.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 6
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 10.0.4.4/32 10.0.14.4 0 0 64512i
*> 10.1.0.0/16 127.0.0.1 0 i
s> 10.1.1.1/32 0.0.0.0 0 0 i
s> 10.1.2.2/32 10.0.12.2 0 0 64514i
s> 10.1.3.3/32 10.0.12.2 0 64514 64515i
s> 10.1.5.5/32 10.0.15.5 0 0 64516i
使用了detail-suppressed参数,对外仅发送汇总路由,这时在明细路由条目前面多了个标识s,代表在路由汇总时,明细路由被抑制。
步骤五.改变汇总路由的属性
缺省情况下,BGP不将团体属性发布给任何对等体。
配置R5向R1、R1向R4通告团体属性。
[R5]bgp 64516
[R5-bgp]peer 10.0.15.1 advertise-community
[R5-bgp]quit
[R1]bgp 64513
[R1-bgp]peer 10.0.14.4 advertise-community
[R1-bgp]quit
验证进行路由汇总后团体属性会丢失。
在R5上对R5通告的10.1.5.5/32加上100的团体属性,并向R1通告。
[R5]acl number 2000
[R5-acl-basic-2000]rule 0 permit source 10.1.5.5 0
[R5-acl-basic-2000]quit
[R5]route-policy set_comm permit node 10
[R5-route-policy]if-match acl 2000
[R5-route-policy]apply community 100
[R5-route-policy]quit
[R5]bgp 64516
[R5-bgp]peer 10.0.15.1 route-policy set_comm export
[R5-bgp]quit
在R1上查看该路由是否携带该团体属性。
<R1>display bgp routing-table community
BGP Local router ID is 10.1.1.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 2
Network NextHop MED LocPrf PrefVal Community
*> 10.1.5.0/24 10.0.15.5 0 <0:100>
在R4上查看汇总后路由是否携带该属性。
<R4>display bgp routing-table community
Total Number of Routes: 0
R4没有任何携带团体属性的路由。
在R1上配置路由策略add_comm,将100:2的团体属性加到汇总后的路由上。
[R1]acl number 2000
[R1-acl-basic-2000]rule 0 permit source 10.1.0.0 0.0.255.255
[R1-acl-basic-2000]quit
[R1]route-policy add_comm permit node 10
[R1-route-policy]if-match acl 2000
[R1-route-policy]apply community 100:2
[R1-route-policy]quit
[R1]bgp 64513
[R1-bgp]aggregate 10.1.0.0 255.255.0.0 attribute-policy add_comm
在R4上观察该汇总路由是否携带100:2团体属性。
<R4>display bgp routing-table community
BGP Local router ID is 10.0.4.4
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 2
Network NextHop MED LocPrf PrefVal Community
*> 10.1.0.0/16 10.0.14.1 0 <100:2>
*> 10.1.5.5/32 10.0.14.1 0 <0:100>
R4学习到的汇总路由携带该属性。
步骤六.使用AS-SET配置AS-PATH属性
路由在汇总后,默认会丢弃AS-PATH属性信息,AS-PATH的丢失可能会造成环路。为避免信息丢失带来的风险,汇总路由可以在汇总时添加AS-Set属性。
配置R1在执行路由汇总时添加AS-Set属性。
[R1]bgp 64513
[R1-bgp]aggregate 10.1.0.0 255.255.0.0 detail-suppressed as-set
[R1-bgp]quit
观察R1、R4中BGP路由表中汇总路由的AS-PATH属性信息。
[R1]display bgp routing-table
BGP Local router ID is 10.1.1.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 6
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 10.0.4.4/32 10.0.14.4 0 0 64512i
*> 10.1.0.0/16 127.0.0.1 0 {64514 64515 64516}i
s> 10.1.1.1/32 0.0.0.0 0 0 i
s> 10.1.2.2/32 10.0.12.2 0 0 64514i
s> 10.1.3.3/32 10.0.12.2 0 64514 64515i
s> 10.1.5.5/32 10.0.15.5 0 0 64516i
<R4>display bgp routing-table
BGP Local router ID is 10.0. 4.4
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 2
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 10.0.4.4/32 0.0.0.0 0 0 i
*> 10.1.0.0/16 10.0.14.1 0 64513 {64514 64515 64516}i
加了AS-Set属性之后的汇总路由的AS-PATH包含了具体路由的AS路径信息。
在R3上停止通告10.1.3.3/32,重置对等体关系。
[R3]bgp 64515
[R3-bgp]undo network 10.1.3.3 255.255.255.255
[R3-bgp]return
<R3>reset bgp all
待邻居关系重新建立后,观察R4上学习到的汇总路由的AS-PATH属性信息。
<R4>display bgp routing-table
BGP Local router ID is 10.0.4.4
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 2
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 10.0.4.4/32 0.0.0.0 0 0 i
*> 10.1.0.0/16 10.0.14.1 0 64513 {64514 64516}i
这时发现AS-PATH属性中已经没有AS号码64515。
附加实验: 思考并验证
这个例子中,完成步骤六以后,R5是否能访问到R3的Loopback地址?
Aggregate和Summary automatic有什么区别?
最终设备配置
<R1>display current-configuration
[V200R007C00SPC600]
#
sysname R1
#
router id 10.1.1.1
#
acl number 2000
rule 0 permit source 10.1.0.0 0.0.255.255
#
interface Serial1/0/0
link-protocol ppp
ip address 10.0.12.1 255.255.255.0
#
interface Serial3/0/0
link-protocol ppp
ip address 10.0.14.1 255.255.255.0
#
interface GigabitEthernet0/0/0
ip address 10.0.15.1 255.255.255.0
#
interface NULL0
#
interface LoopBack0
ip address 10.1.1.1 255.255.255.255
#
bgp 64513
peer 10.0.12.2 as-number 64514
peer 10.0.14.4 as-number 64512
peer 10.0.15.5 as-number 64516
#
ipv4-family unicast
undo synchronization
aggregate 10.1.0.0 255.255.0.0 as-set detail-suppressed
network 10.1.1.1 255.255.255.255
peer 10.0.12.2 enable
peer 10.0.14.4 enable
peer 10.0.14.4 advertise-community
peer 10.0.15.5 enable
#
route-policy add_comm permit node 10
if-match acl 2000
apply community 100:2
#
return
<R2>display current-configuration
[V200R007C00SPC600]
#
sysname R2
#
router id 10.1.2.2
#
interface Serial1/0/0
link-protocol ppp
ip address 10.0.12.2 255.255.255.0
#
interface Serial2/0/0
link-protocol ppp
ip address 10.0.23.2 255.255.255.0
#
interface LoopBack0
ip address 10.1.2.2 255.255.255.255
#
bgp 64514
peer 10.0.12.1 as-number 64513
peer 10.0.23.3 as-number 64515
#
ipv4-family unicast
undo synchronization
network 10.1.2.2 255.255.255.255
peer 10.0.12.1 enable
peer 10.0.23.3 enable
#
return
<R3>display current-configuration
[V200R007C00SPC600]
#
sysname R3
#
router id 10.1.3.3
#
interface Serial2/0/0
link-protocol ppp
ip address 10.0.23.3 255.255.255.0
#
interface LoopBack1
ip address 10.1.3.3 255.255.255.255
#
bgp 64515
peer 10.0.23.2 as-number 64514
#
ipv4-family unicast
undo synchronization
peer 10.0.23.2 enable
#
return
<R4>display current-configuration
[V200R007C00SPC600]
#
sysname R4
#
router id 10.0.4.4
#
interface Serial1/0/0
link-protocol ppp
ip address 10.0.14.4 255.255.255.0
#
interface LoopBack0
ip address 10.0.4.4 255.255.255.255
#
bgp 64512
peer 10.0.14.1 as-number 64513
#
ipv4-family unicast
undo synchronization
network 10.0.4.4 255.255.255.255
peer 10.0.14.1 enable
#
return
<R5>display current-configuration
[V200R007C00SPC600]
#
sysname R5
#
router id 10.1.5.5
#
acl number 2000
rule 0 permit source 10.1.5.5 0
#
interface GigabitEthernet0/0/0
ip address 10.0.15.5 255.255.255.0
#
interface LoopBack0
ip address 10.1.5.5 255.255.255.255
#
bgp 64516
peer 10.0.15.1 as-number 64513
#
ipv4-family unicast
undo synchronization
network 10.1.5.5 255.255.255.255
peer 10.0.15.1 enable
peer 10.0.15.1 advertise-community
peer 10.0.15.1 route-policy set_comm export
#
route-policy set_comm permit node 10
if-match acl 2000
apply community 100
#
return