Lab 3-2 BGP Route Summarization
Lab 3-2 BGP Route Summarization
interface LoopBack1
bgp 64514
ipv4-family unicast
undo synchronization
return
Learning Objectives
Topology
Scenario
You are a network administrator of a company. The company’s network uses BGP as
the routing protocol. This network consists of multiple ASs, and different branches
use different AS numbers. As the company expands, routers have more and more
routing tables. It is urgent to summarize BGP routes to reduce the routing table size.
You test several route summarization methods and select a suitable method to
summarize routes.
Tasks
Configure IP addresses and masks for physical interfaces and loopback interfaces of
all the routers. Each loopback interface address uses the 32-bit mask.
[R1-Serial1/0/0]quit
[R1-Serial3/0/0]quit
[R1-GigabitEthernet0/0/0]quit
[R1]interface LoopBack 0
[R1-LoopBack0]quit
[R2-Serial1/0/0]quit
[R2-Serial2/0/0]quit
[R2]interface loopback 0
[R2-LoopBack0]quit
[R3-Serial2/0/0]quit
[R3-Serial2/0/0]quit
[R3]interface loopback 1
[R3-LoopBack1]quit
[R4-Serial1/0/0]quit
[R4]interface loopback 0
[R4-LoopBack0]quit
[R5-GigabitEthernet0/0/0]quit
[R5]interface loopback 0
[R5-LoopBack0]quit
[R1]ping -c 1 10.0.12.2
1 packet(s) transmitted
1 packet(s) received
[R1]ping -c 1 10.0.14.4
1 packet(s) transmitted
1 packet(s) received
[R1]ping -c 1 10.0.15.5
1 packet(s) transmitted
1 packet(s) received
[R2]ping -c 1 10.0.23.3
1 packet(s) transmitted
1 packet(s) received
[R1]router id 10.1.1.1
[R1]bgp 64513
[R1-bgp]quit
[R2]router id 10.1.2.2
[R2]bgp 64514
[R2-bgp]quit
[R3]router id 10.1.3.3
[R3]bgp 64515
[R3-bgp]quit
[R4]router id 10.0.4.4
[R4]bgp 64512
[R4-bgp]quit
[R5]router id 10.1.5.5
[R5]bgp 64516
[R5-bgp]quit
The preceding command output shows that all BGP peer relationships are in
Established state.
Run the network command to advertise the network segment of the loopback
interface on each router into BGP.
[R1]bgp 64513
[R1-bgp]quit
[R2]bgp 64514
[R2-bgp]quit
[R3]bgp 64515
[R3-bgp]quit
[R4]bgp 64512
[R4-bgp]quit
[R5]bgp 64516
[R5-bgp]quit
Check the BGP routing table of R4 and observe the AS_Path attribute.
On R1, add the static route 10.1.0.0/16 pointing to interface Null0 and run the
network command to advertise this route.
[R1]bgp 64513
[R1-bgp]quit
Check the BGP routing table of R4 to determine whether the summarized route
exists.
Set an IP prefix list named pref_detail_control to filter the routes to be sent to the
BGP peer R4 and prevent the specific routes from being sent out.
[R1]bgp 64513
[R1-bgp]quit
Check the BGP routing table of R4 again. Observe the AS_Path attribute of the
summarized route.
Delete the IP prefix list configured in step 3 and the summarized route advertised
using the network command.
Run the aggregate command to summarize routes to 10.1.0.0/16 using the default
mode.
[R1]bgp 64513
[R1-bgp]quit
[R1]bgp 64513
[R1-bgp]quit
Check the BGP routing tables of R1 and R4 and observe the Origin attribute of the
summarized route.
The preceding command output shows that the Origin attribute of the summarized
route retains unchanged and is still IGP.
[R1]bgp 64513
[R1-bgp]quit
The preceding command output shows that the BGP routing table of R4 does not
contain specific routes.
Check the IP routing table of R1 to view the next hop of the route to 10.1.0.0/16.
[R1]display ip routing-table
----------------------------------------------------------------------------
Destinations : 21 Routes : 21
By default, BGP does not advertise the Community attribute to any peer.
[R5]bgp 64516
[R5-bgp]quit
[R1]bgp 64513
[R1-bgp]quit
Verify that the Community attribute disappears after routes are summarized.
On R5, add the Community attribute 100 to the route 10.1.5.5/32 advertised by R5
and advertise this route to R1.
[R5-acl-basic-2000]quit
[R5-route-policy]quit
[R5]bgp 64516
[R5-bgp]quit
On R1, check whether the route 10.1.5.5/32 carries the Community attribute 100.
On R4, check whether the summarized route carries the Community attribute 100.
The preceding command output shows that R4 does not have any route that carries
the Community attribute.
[R1-acl-basic-2000]quit
[R1-route-policy]quit
[R1]bgp 64513
On R4, check whether the summarized route carries the Community attribute 100:2.
The preceding command output shows that the summarized route learned by R4
carries the Community attribute 100:2.
After routes are summarized, the AS_Path attribute of the summarized route is
discarded by default, which may cause a routing loop. To eliminate this risk, add the
AS_Set attribute to the summarized route.
Configure R1 to add the AS_Set attribute to the summarized route during route
summarization.
[R1]bgp 64513
[R1-bgp]quit
Check the AS_Path attribute of the summarized route in the BGP routing tables of R1
and R4.
The AS_Path attribute of the summarized route to which the AS_Set attribute is
added contains AS path information of specific routes.
On R3, stop advertising the route 10.1.3.3/32 and reset the peer relationship.
[R3]bgp 64515
[R3-bgp]return
After the peer relationship is established again, check the AS_Path attribute of the
summarized route learned by R4.
The preceding command output shows that the AS_Path attribute does not contain
the AS number 64515.
----End
After step 6 is complete, can R5 access the loopback interface address of R3?
What are the differences between the aggregate and summary automatic
commands?
Device Configurations
<R1>display current-configuration
[V200R007C00SPC600]
sysname R1
router id 10.1.1.1
interface Serial1/0/0
link-protocol ppp
interface Serial3/0/0
link-protocol ppp
interface GigabitEthernet0/0/0
interface NULL0
interface LoopBack0
bgp 64513
ipv4-family unicast
undo synchronization
return
<R2>display current-configuration
[V200R007C00SPC600]
sysname R2
router id 10.1.2.2
interface Serial1/0/0
link-protocol ppp
interface Serial2/0/0
link-protocol ppp
interface LoopBack0
bgp 64514
ipv4-family unicast
undo synchronization
return
<R3>display current-configuration
[V200R007C00SPC600]
sysname R3
router id 10.1.3.3
interface Serial2/0/0
link-protocol ppp
interface LoopBack1
bgp 64515
ipv4-family unicast
undo synchronization
return
<R4>display current-configuration
[V200R007C00SPC600]
sysname R4
router id 10.0.4.4
interface Serial1/0/0
link-protocol ppp
interface LoopBack0
bgp 64512
ipv4-family unicast
undo synchronization
return
<R5>display current-configuration
[V200R007C00SPC600]
sysname R5
router id 10.1.5.5
interface GigabitEthernet0/0/0
interface LoopBack0
bgp 64516
ipv4-family unicast
undo synchronization
return
Learning Objectives