Description

This article explains an issue where the aggregate route is not advertised to its BGP peer as expected when the contributing routes are learnt from multiple routing protocols like OSPF/BGP.

Symptoms

TOPOLOGY

=========

SRX-A====ospf====SRX-B====EBGP===SRX-C===EBGP===SRX-D

 

+ SRX-B is receiving route 10.10.2.177/32 from SRX-A via OSPF.

+ SRX-B is receiving route 10.10.2.178/32 from SRX-C via EBGP.

+ We are adding an aggregate route 10.10.2.176/28 on SRX-B and advertising it to SRX-C via EBGP.

 

When this aggregate route is advertised to SRC-C via EBGP it will inherit the BGP path attributes of the contributing BGP route 10.10.2.178/32 learnt from SRX-C.

 

User@srx-B> show route                                        

 

inet.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden)

+ = Active Route, - = Last Active, * = Both

 

0.0.0.0/0         *[Static/5] 2d 10:44:16

                   > to 150.150.150.1 via ge-0/0/0.0

10.10.2.176/28 *[Aggregate/130] 00:02:57

                      Discard

10.10.2.177/32 *[OSPF/150] 00:00:04, metric 0, tag 0

                   > to 192.177.1.1 via ge-0/0/1.0

10.10.2.178/32 *[BGP/170] 00:07:24, localpref 100

                     AS path: 131 132 I, validation-state: unverified

                   > to 192.177.2.2 via ge-0/0/2.0

10.10.10.0/24  *[Direct/0] 2d 10:44:16

                   > via ge-0/0/0.0

10.10.10.3/32  *[Local/0] 2d 10:44:16

                      Local via ge-0/0/0.0

192.168.1.0/24    *[Direct/0] 2d 10:44:16

                   > via ge-0/0/1.0

192.168.1.2/32    *[Local/0] 2d 10:44:16

                      Local via ge-0/0/1.0

192.168.2.0/24    *[Direct/0] 2d 10:44:16

                   > via ge-0/0/2.0

192.168.2.1/32    *[Local/0] 2d 10:44:16

                      Local via ge-0/0/2.0

224.0.0.5/32      *[OSPF/10] 00:00:14, metric 1

                      MultiRecv

 

User@srx-B> show route advertising-protocol bgp 192.168.2.2   

 

inet.0: 10 destinations, 10 routes (10 active, 0 holddown, 0 hidden)

 Prefix                 Nexthop             MED    Lclpref   AS path

* 10.10.2.176/28     Self                                   131 132 I

 

SRX-C will drop this route due to AS PATH check and EBGP loop prevention mechanism.

 

Solution

This is an expected behaviour. By default aggregate route will inherit the AS PATH attributes of all the contributing BGP routes. As there is only 1 contributing BGP route in the above scenario 10.10.2.178/32, aggregate route 10.10.2.176/28 will inherit the path attributes of the only available contributing BGP route.

 

This is explained in the below given tech document:

https://www.juniper.net/documentation/us/en/software/junos/static-routing/topics/topic-map/config-route-aggregation.html#id-understanding-route-aggregation__d9e628

Modification History

2025-05-11 : Article Created

2025-11-24
IP prefixed changed.