Get the App
SLTechnology News&Howtos  ›  Network Security  › 

43. Aggregate aggregate-address of BGP configuration experiment

Shulou Source: shulou.com Published: 2022-06-01 06:42:08 10月04日 Update

1. Experimental Topology

2. Basic configuration

R1 configuration

Interface Loopback0

Ip address 1.1.1.1 255.255.255.0

Interface Serial0/0

Ip address 13.1.1.1 255.255.255.0

Interface FastEthernet1/0

Ip address 124.1.1.1 255.255.255.0

Router ospf 110

Log-adjacency-changes

Network 1.1.1.0 0.0.0.255 area 0

Network 124.1.1.0 0.0.0.255 area 0

Router bgp 1

No synchronization

Bgp router-id 1.1.1.1

Neighbor 2.2.2.2 remote-as 1

Neighbor 2.2.2.2 update-source Loopback0

Neighbor 2.2.2.2 next-hop-self

Neighbor 13.1.1.3 remote-as 3

No auto-summary

R2 configuration

Interface Loopback0

Ip address 2.2.2.2 255.255.255.0

Interface FastEthernet1/0

Ip address 124.1.1.2 255.255.255.0

Router ospf 110

Log-adjacency-changes

Network 2.2.2.0 0.0.0.255 area 0

Network 124.1.1.0 0.0.0.255 area 0

Router bgp 1

No synchronization

Bgp router-id 2.2.2.2

Bgp log-neighbor-changes

Neighbor 1.1.1.1 remote-as 1

Neighbor 1.1.1.1 update-source Loopback0

Neighbor 124.1.1.4 remote-as 4

No auto-summary

R3 configuration

Interface Loopback0

Ip address 3.3.3.3 255.255.255.0

Interface Loopback16

Ip address 202.1.16.3 255.255.255.0

Interface Loopback17

Ip address 202.1.17.3 255.255.255.0

Interface Loopback18

Ip address 202.1.18.3 255.255.255.0

Interface Loopback19

Ip address 202.1.19.3 255.255.255.0

Interface Serial0/0

Ip address 13.1.1.3 255.255.255.0

Router bgp 3

No synchronization

Bgp router-id 3.3.3.3

Bgp log-neighbor-changes

Network 3.3.3.0 mask 255.255.255.0

Network 202.1.16.0

Network 202.1.17.0

Network 202.1.18.0

Network 202.1.19.0

Neighbor 13.1.1.1 remote-as 1

No auto-summary

R4 configuration

Interface Loopback0

Ip address 4.4.4.4 255.255.255.0

Interface FastEthernet1/0

Ip address 124.1.1.4 255.255.255.0

Router bgp 4

No synchronization

Bgp router-id 4.4.4.4

Bgp log-neighbor-changes

Network 4.4.4.0 mask 255.255.255.0

Neighbor 124.1.1.2 remote-as 1

No auto-summary

3. Configure aggregation

BGP aggregation can be done in two ways:

Method 1: manually write a static summary route pointing to the empty interface, and then publish the summary route in the BGP routing process

Method 2: first, network all the detail routes in the BGP routing process and aggregate them with aggregate-address 202.1.16.0255.255.252.0.At this time, both the aggregation route and the detail route will be advertised. Aggregate-address 202.1.16.0255.255.252.0 summary-only will suppress the detail route and mark it as s, and will not send it to other BGP neighbors.

In addition, we can also specify that specific routes are not advertised. The basic steps are as follows:

Ip prefix-list 1 permit 202.1.16.0/23 ge 24 le 24

Route-map YZ permit 10

Match ip address prefix-list 1

Router bgp 3

Aggregate-address 202.1.16.0 255.255.252.0 suppress-map YZ

The second method is to do aggregation at the sender. If aggregation is done at the receiver, the receiver will transmit the aggregation route back to the sender after generating the aggregation route. At this time, packet loss will occur, so the aggregation route should not be sent back. In order to achieve the goal of not being able to transmit, we use BGP's split horizon technology to add the attribute of detail route to the aggregation route, so that when the sender receives the aggregation route, it does not accept the route because it carries its own AS number, aggregate-address 202.1.16.0255.255.252.0 summary-only as-set.

Method 1:

R3 configuration

Ip route 202.1.16.0 255.255.252.0 null0

Router bgp 3

No network 202.1.16.0

No network 202.1.17.0

No network 202.1.18.0

No network 202.1.19.0

Network 202.1.16.0 mask 255.255.252.0

Method 2:

R3 configuration

No ip route 202.1.16.0 255.255.252.0 null0

Router bgp 3

No network 202.1.16.0 mask 255.255.252.0

Network 202.1.16.0

Network 202.1.17.0

Network 202.1.18.0

Network 202.1.19.0

Aggregate-address 202.1.16.0 255.255.252.0

Aggregate-address 202.1.16.0 255.255.252.0 summary-only will suppress the detail route, identified as s, and will not be sent to other BGP neighbors.

Router bgp 3

Aggregate-address 202.1.16.0 255.255.252.0 summary-only

Clear the aggregation on R3 and do the aggregation on R1.

Router bgp 3

No aggregate-address 202.1.16.0 255.255.252.0 summary-only

Router bgp 1

No aggregate-address 202.1.16.0 255.255.252.0 summary-only

Router bgp 1

No aggregate-address 202.1.16.0 255.255.252.0 summary-only as-set

R1 no longer advertises aggregate routes to R3.

Tags: Routing configuration method details recipient identity process advertisement neighbor Lab Notification Foundation attribute Manual Technology Topology Point Interface is in step Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Huawei Redmi Shulou Technology Linux