Home > BGP Summary Route

BGP Summary Route

March 4th, 2012 in Basic Labs Go to comments

In this lab we will learn how to aggregate (summarize) small networks into a bigger one. Below is the topology used in this GNS3 lab.


IOS used: c3640-jk9s-mz.124-16.bin

Task: Summary networks & into

Basic IP address Assignments

R1(config)#interface f0/0
R1(config-if)#ip address
R1(config-if)#no shutdown
R1(config-if)#interface loopback0
R1(config-if)#ip address
R3(config)#interface f0/0
R3(config-if)#ip address
R3(config-if)#no shutdown
R3(config-if)#interface f1/0
R3(config-if)#ip address
R3(config-if)#no shutdown
R3(config-if)#interface f2/0
R3(config-if)#ip address
R3(config-if)#no shutdown
R2(config)#interface f0/0
R2(config-if)#ip address
R2(config-if)#no shutdown
R2(config-if)#interface loopback0
R2(config-if)#ip address
R4(config)#interface f0/0
R4(config-if)#ip address
R4(config-if)#no shutdown

Establish BGP neighbors

R1(config)#router bgp 1
R1(config-router)#neighbor remote-as 3
R3(config)#router bgp 3
R3(config-router)#neighbor remote-as 1
R3(config-router)#neighbor remote-as 2
R3(config-router)#neighbor remote-as 4
R2(config)#router bgp 2
R2(config-router)#neighbor remote-as 3
R4(config)#router bgp 4
R4(config-router)#neighbor remote-as 3

Notice that the BGP tables are still empty now.

Advertise loopback0 interfaces on R1 & R2

R1(config)#router bgp 1
R1(config-router)#network mask
R2(config)#router bgp 2
R2(config-router)#network mask

Check the BGP table to see our loopback interfaces have been advertised


On R1 we see the next hop of is -> the network originated by a “network” command has the next-hop of


Now we want to summary two networks & into one network



Notice that after being summarized, the “Next Hop” of summarized network is -> the network originated via an “aggregate” command will have a next hop of

Also a rule of aggregation is “Aggregation applies only to routes that exist in the BGP routing table. An aggregated route is forwarded if at least one more specific route of the aggregation exists in the BGP routing table”. That means the aggregated network is only forwarded if the BGP table of R3 has at least or

Check the BGP table of R4 to see our aggregated network has been advertised.


Although the summarized network was created but two more specific networks are still there. If you want to advertise the summarized network only, use the command:

R3(config-router)#aggregate-address summary-only

The BGP table of R3 still shows these routes but they are marked as suppressed (s>)


Now R3 only advertises summarized route so the BGP table of R4 does not display these suppressed networks


But let’s check the BGP table of R1 or R2.


Wow! The summarized route is also advertised back to R2 as if it were learned from R3 (next hop So if R2 receives a packet destined to a subnet of ( for example) it will send to R3 but R3 does not have more specific route -> it will drop that packet, this creates a black hole. To avoid this problem, append the keyword “as-set” to ask the router to send the information about all the Autonomous Systems it has passed:

R3(config-router)#aggregate-address summary-only as-set

Now the path information in R4 changes to 3 {1,2}. This set indicates the aggregate route summarizes routes that have passed through AS 1 & AS 2 and is advertised through AS 3.


The as-set information is very important in the avoidance of routing loops. Let’s see the BGP table of R2:


When receiving this advertisement, R2 will not accept this route anymore because R2 sees its AS in the AS-Path. Notice before the “as-set” keyword is used, R2 only sees this advertisement comes from AS 3 and accepts it.

Note: If you wish to ping from R4 to loopback of R1 (or R2), you have to advertise the network on R4 so that the ICMP Reply from R1 knows where to go (use the “network mask on R4).

  1. Swen
    January 18th, 2017

    I am cheap tom brady jersey supplier online, take coupon code
    here: Oakland Athletics

  2. Leora
    May 21st, 2017

    freee shipping chima wholesale cheap dallas cowbots apparel

  3. fathi
    June 20th, 2017

    thanks, informative and easy to be understood.

  4. JJ
    February 19th, 2019

    Great example!
    It would be even better if a loopback is created on R4 ( and being advertised. That way, network will be advertised by R3 into R2 and R1. R2 will then have with next hop and another route( advertised by R3.

  1. No trackbacks yet.