BGP Aggregation does not work

Hello,

i have 2 routers.
Router 1 has many OSPF Routes (e.g. 10.1.192.1/32 10.1.193.1/32 10.1.193.0/24 etc.)
Router 2 should receive Routes via BGP from Router 1, but aggregated to 10.1.192.0/18

My configuration:

Router 1

[admin@Router1] > ro bg instance pr
Flags: X - disabled 
 0   name="default" as=65530 router-id=0.0.0.0 redistribute-connected=no 
     redistribute-static=no redistribute-rip=no redistribute-ospf=no 
     redistribute-other-bgp=no out-filter="" 
     client-to-client-reflection=yes ignore-as-path-len=no routing-table="" 

 1   name="as1" as=64543 router-id=10.4.138.1 
     redistribute-connected=yes redistribute-static=yes redistribute-rip=no 
     redistribute-ospf=yes redistribute-other-bgp=no out-filter="" 
     client-to-client-reflection=no ignore-as-path-len=no routing-table="" 


[admin@Router1] > ro bgp peer pr
Flags: X - disabled, E - established 
 #   INSTANCE       REMOTE-ADDRESS                                REMOTE-AS  
 0 E as1            10.5.128.1                                    64553    


[admin@Router1] > ro bgp aggregate print 
Flags: X - disabled, A - active 
 #   PREFIX               INSTANCE                                           
 0   10.1.192.0/18        as1

Router 2 configuration is:

[admin@Router2] > ro bgp ins pr
Flags: X - disabled 
 0   name="default" as=65530 router-id=0.0.0.0 redistribute-connected=no 
     redistribute-static=no redistribute-rip=no redistribute-ospf=no 
     redistribute-other-bgp=no out-filter="" client-to-client-reflection=yes 
     ignore-as-path-len=no routing-table="" 

 1   name="as2" as=64553 router-id=10.5.128.1 redistribute-connected=no 
     redistribute-static=no redistribute-rip=no redistribute-ospf=no 
     redistribute-other-bgp=no out-filter="" client-to-client-reflection=yes 
     ignore-as-path-len=no routing-table="" 


[admin@Router2] > ro bgp peer print 
Flags: X - disabled, E - established 
 #   INSTANCE        REMOTE-ADDRESS                                 REMOTE-AS  
 0 E as2             10.4.138.1                                     64543

But on Router 2 is no 10.1.192.0/18 but every /24-32 route

Is something wrong with my configuration?

Greetings Manuel Ritter

are they received via BGP?.. you have “redistribute-ospf=no”…

On Router 1, there is

     redistribute-connected=yes redistribute-static=yes redistribute-rip=no
     redistribute-ospf=yes redistribute-other-bgp=no

And every Route on Router2 comes over BGP, because there is no other Routing Protocol active (single router an no active users yet. I only tested BGP there)

On Router1 in /routing bgp advertisements there is no 10.1.192.0/18 route.

Greetings Manuel Ritter

yep, sorry =)
according to manual:

Notes
Each aggregate will only affect routes coming from peers that belong to it’s instance.

OSPF routes cannot be aggregated. so simply add necessary aggregate route to “networks” and use out-filter of your peer to filter out all small routes

To take into account IGP and connected routes set “include-igp=yes” otherwise, as chupaka said, only BGP routes are taken into account.

argh!.. I like WinBox-invisible values so much!.. :slight_smile:

That it is,
thank you mrz.

And thank you Chupaka too, your answer with networks also works fine.

Greetings Manuel Ritter