Home > BGP Summary Route

BGP Summary Route

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.

BGP_aggregate_topology.jpg

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

Task: Summary networks 10.10.10.0/24 & 10.10.20.0/24 into 10.10.0.0/16

Basic IP address Assignments

R1(config)#interface f0/0
R1(config-if)#ip address 13.13.13.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#interface loopback0
R1(config-if)#ip address 10.10.10.1 255.255.255.0
R3(config)#interface f0/0
R3(config-if)#ip address 13.13.13.3 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#interface f1/0
R3(config-if)#ip address 23.23.23.3 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#interface f2/0
R3(config-if)#ip address 34.34.34.3 255.255.255.0
R3(config-if)#no shutdown
R2(config)#interface f0/0
R2(config-if)#ip address 23.23.23.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#interface loopback0
R2(config-if)#ip address 10.10.20.1 255.255.255.0
R4(config)#interface f0/0
R4(config-if)#ip address 34.34.34.4 255.255.255.0
R4(config-if)#no shutdown

Establish BGP neighbors

R1(config)#router bgp 1
R1(config-router)#neighbor 13.13.13.3 remote-as 3
R3(config)#router bgp 3
R3(config-router)#neighbor 13.13.13.1 remote-as 1
R3(config-router)#neighbor 23.23.23.2 remote-as 2
R3(config-router)#neighbor 34.34.34.4 remote-as 4
R2(config)#router bgp 2
R2(config-router)#neighbor 23.23.23.3 remote-as 3
R4(config)#router bgp 4
R4(config-router)#neighbor 34.34.34.3 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 10.10.10.0 mask 255.255.255.0
R2(config)#router bgp 2
R2(config-router)#network 10.10.20.0 mask 255.255.255.0

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

BGP_aggregate_advertised_R1_show_ip_bgp.jpg

On R1 we see the next hop of 10.10.10.0/24 is 0.0.0.0 -> the network originated by a “network” command has the next-hop of 0.0.0.0.

BGP_aggregate_advertised_R4_show_ip_bgp.jpg

Now we want to summary two networks 10.10.10.0/24 & 10.10.20.0/24 into one network 10.10.0.0/16

R3(config-router)#aggregate-address 10.10.0.0 255.255.0.0

BGP_aggregate_address_R3_show_ip_bgp.jpg

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

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 10.10.0.0/16 is only forwarded if the BGP table of R3 has at least 10.10.10.0/24 or 10.10.20.0/24.

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

BGP_aggregate_address_R4_show_ip_bgp.jpg

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 10.10.0.0 255.255.0.0 summary-only

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

BGP_aggregate_summary-only_R3_show_ip_bgp.jpg

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

BGP_aggregate_summary-only_R4_show_ip_bgp.jpg

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

BGP_aggregate_advertised_R2_show_ip_bgp.jpg

Wow! The summarized route is also advertised back to R2 as if it were learned from R3 (next hop 23.23.23.3). So if R2 receives a packet destined to a subnet of 10.10.0.0/16 (10.10.30.0 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 10.10.0.0 255.255.0.0 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.

BGP_aggregate_summary-only_as-set_R4_show_ip_bgp.jpg

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

BGP_aggregate_summary-only_as-set_R2_show_ip_bgp.jpg

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 34.34.34.0 on R4 so that the ICMP Reply from R1 knows where to go (use the “network 34.34.34.0 mask 255.255.255.0 on R4).

Comments
  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 (10.10.40.1/24) and being advertised. That way, network 10.10.40.0/24 will be advertised by R3 into R2 and R1. R2 will then have 10.10.20.0/24 with next hop 0.0.0.0 and another route(10.10.40.0/24) advertised by R3.

  1. No trackbacks yet.