CCNP experiment: BGP Route aggregation Basics

Source: Internet
Author: User

[Lab environment]

The C3640-IK9O3S-M Version 12.4 (10)

[PURPOSE]

Verify BGP Route Aggregation

[Experiment topology]

[Experiment description]

1. manually create an aggregated static route on R2 and declare a static route for BGP Route Aggregation

2. Use the BGP Route aggregation command aggregate-address on R2 to implement BGP Route Aggregation

3. Use the BGP Route aggregation command aggregate-address on R1 to implement BGP Route Aggregation

4. Use suppress-map on R1 to implement some BGP Route Sets

Lab procedure]

1. Basic R1 Configuration

!
Interface Serial0/0
Ip address 12.0.0.1 255.255.255.0
Serial restart-delay 0
Clock rate 64000
!
Router bgp 1
No synchronization
Bgp router-id 1.1.1.1
Neighbor 12.0.0.2 remote-as 2
No auto-summary
!

2. Basic R2 Configuration

!
Interface Loopback0
Ip address 200.1.16.1 255.255.255.0
!
Interface Loopback1
Ip address 200.1.17.1 255.255.255.0
!
Interface Loopback2
Ip address 200.1.18.1 255.255.255.0
!
Interface Loopback3
Ip address 200.1.19.1 255.255.255.0
!
Interface Serial0/0
Ip address 12.0.0.2 255.255.255.0
!
Router bgp 2
No synchronization
Bgp router-id 2.2.2.2
Neighbor 12.0.0.1 remote-as 1
No auto-summary
!

3. manually create an aggregated static route on R2 and declare a static route for BGP Route Aggregation

This method can only be used on vror2 R2 that generates detailed routes, and does not need to advertise detailed routes on R2. first, create a summary static route pointing to the NULL0 interface:

R2 (config) # ip route 200.1.16.0 255.255.252.0 Null0

Then, publish the summarized static routes from BGP.

R2 (config) # router bgp 2
R2 (config-router) # network 200.1.16.0 mask 255.255.252.0

Now we can see the summary route on R1.

R1 # sh ip bgp
BGP table version is 2, local router ID is 1.1.1.1
Network Next Hop Metric LocPrf Weight Path
*> 200.1.16.0/22 12.0.0.2 0 0 2 I

4. Clear configuration 3 and use the BGP Route aggregation command aggregate-address on R2 to implement BGP Route aggregation.

R2 (config) # no ip route 200.1.16.0 255.255.252.0 null 0
R2 (config) # router bgp 2
R2 (config-router) # no network 200.1.16.0 mask 255.255.252.0

You need to first advertise the Detailed Routing to BGP:

R2 (config) # router bgp 2
R2 (config-router) # network 200.1.16.0
R2 (config-router) # network 200.1.20.
R2 (config-router) # network 200.1.18.0
R2 (config-router) # network 200.1.19.0

Without the mask parameter, the default value is the primary subnet mask of the network number.

Use aggregate-address to declare an aggregation route:

R2 (config) # router bgp 2
R2 (config-router) # aggregate-address 200.1.16.0 255.255.252.0 summary-only

The summary-only parameter indicates that only the aggregation route is declared, and the detailed route is blocked.

View the BGP Route table on R2, and the detailed route is blocked:

R2 # sh ip bgp
BGP table version is 12, local router ID is 2.2.2.2
Network Next Hop Metric LocPrf Weight Path
S> 200.1.16.0 0.0.0.0 0 32768 I
*> 200.1.16.0/22 0.0.0.0 32768 I
S> 200.1.20.0.0.0.0 0 32768 I
S> 200.1.18.0 0.0.0.0 0 32768 I
S> 200.1.19.0 0.0.0.0 0 32768 I

View the BGP Route table on R1. There is only one aggregation route:

R1 # sh ip bgp
BGP table version is 4, local router ID is 1.1.1.1
Network Next Hop Metric LocPrf Weight Path
*> 200.1.16.0/22 12.0.0.2 0 0 2 I

5. Retain detailed routes, clear the aggregation route configuration on R2, and use the BGP Route aggregation command aggregate-address on R1 to implement BGP Route Aggregation

R2 (config) # router bgp 2
R2 (config-router) # no aggregate-address 200.1.16.0 255.255.252.0 summary-only

Run the route summary command on R1:

R1 (config) # router bgp 1
R1 (config-router) # aggregate-address 200.1.16.0 255.255.252.0 summary-only

View the BGP Route table on R1:

R1 # sh ip bgp
BGP table version is 14, local router ID is 1.1.1.1
Network Next Hop Metric LocPrf Weight Path
S> 200.1.16.0 12.0.0.2 0 0 2 I
*> 200.1.16.0/22 0.0.0.0 32768 I
S> 200.1.20.12.0.0.2 0 0 2 I
S> 200.1.18.0 12.0.0.2 0 0 2 I
S> 200.1.19.0 12.0.0.2 0 0 2 I

View the BGP Route table on R2:

R2 # sh ip bgp
BGP table version is 18, local router ID is 2.2.2.2
Network Next Hop Metric LocPrf Weight Path
*> 200.1.16.0 0.0.0.0 0 32768 I
*> 200.1.16.0/22 12.0.0.1 0 0 1 I
*> 200.1.20.0.0.0.0 0 32768 I
*> 200.1.18.0 0.0.0.0 0 32768 I
*> 200.1.19.0 0.0.0.0 0 32768 I

Problem: The summary route Path attribute of R1 is empty. Because horizontal segmentation of EBGP is based on the Path attribute, this route entry does not meet horizontal segmentation and will be returned to R2, therefore, on R2, we can see the summary route with the Next Hop value of R1. If one of the detailed routes goes down, some bandwidth traffic may be wasted. Therefore, we need to add another parameter as-set after the aggregate-address command. This parameter retains some attributes of the detailed route to the summarized route, including the as-path attribute.

R1 (config) # router bgp 1
R1 (config-router) # no aggregate-address 200.1.16.0 255.255.252.0 summary-only
R1 (config-router) # aggregate-address 200.1.16.0 255.255.252.0 summary-only as-set

View the BGP Route table on R1 again:

R1 # sh ip bgp
BGP table version is 20, local router ID is 1.1.1.1
Network Next Hop Metric LocPrf Weight Path
S> 200.1.16.0 12.0.0.2 0 0 2 I
*> 200.1.16.0/22 0.0.0.0 100 32768 2 I
S> 200.1.20.12.0.0.2 0 0 2 I
S> 200.1.18.0 12.0.0.2 0 0 2 I
S> 200.1.19.0 12.0.0.2 0 0 2 I

View the BGP Route table on R2 again:

R2 # sh ip bgp
BGP table version is 19, local router ID is 2.2.2.2
Network Next Hop Metric LocPrf Weight Path
*> 200.1.16.0 0.0.0.0 0 32768 I
*> 200.1.20.0.0.0.0 0 32768 I
*> 200.1.18.0 0.0.0.0 0 32768 I
*> 200.1.19.0 0.0.0.0 0 32768 I

EBGP horizontal segmentation works, so there is no returned aggregation route on R2

6. Clear the aggregation route configuration on R1 and use suppress-map to aggregate some BGP routes. The requirement is to suppress CIDR blocks 200.1.18.0/24 and 200.1.19.0/24. Other CIDR blocks and aggregated routes are displayed.

R1 (config) # router bgp 1
R1 (config-router) # no aggregate-address 200.1.16.0 255.255.252.0 summary-only as-set

Use the prefix list to capture route entries:

R1 (config) # ip prefix-list 10 permit 200.1.18.0/23 ge 24 le 24

Create a route-map to process route entries

R1 (config) # route-map SU permit 10
R1 (config-route-map) # match ip address prefix-list 10
R1 (config-route-map) # exit

Use suppress-map to create an aggregate route

R1 (config) # router bgp 1
R1 (config-router) # aggregate-address 200.1.16.0 255.255.252.0 suppress-map SU as-set

Hard clear BGP Route table

R1 # clear ip bgp *

View the BGP Route table on R1:

R1 # sh ip bgp
BGP table version is 8, local router ID is 1.1.1.1
Network Next Hop Metric LocPrf Weight Path
*> 200.1.16.0 12.0.0.2 0 0 2 I
*> 200.1.16.0/22 0.0.0.0 100 32768 2 I
*> 200.1.20.12.0.0.2 0 0 2 I
S> 200.1.18.0 12.0.0.2 0 0 2 I
S> 200.1.19.0 12.0.0.2 0 0 2 I

Two CIDR Blocks 18 and 19 are blocked, and the remaining CIDR blocks are the best.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.