Community discussions

MikroTik App
 
User avatar
Maggiore81
Trainer
Trainer
Topic Author
Posts: 564
Joined: Sun Apr 15, 2012 12:10 pm
Location: Italy
Contact:

BGP aggregation example

Wed Jan 02, 2019 4:12 pm

Hello
just a quick question:

CCR1036 with 1 upstream and 2x public peering lans.
I announce 4x /22 classess (BGP Networks).

How can I announce to specific peers, individual /23 or /24 instead than the full /22 ?

can someone write an example?
thank you
 
User avatar
Cha0s
Forum Guru
Forum Guru
Posts: 1142
Joined: Tue Oct 11, 2005 4:53 pm

Re: BGP aggregation example

Wed Jan 02, 2019 6:00 pm

You can add all the prefixes (/22, /23, /24) in Routing > BGP > Networks.

And then use separate filters on each peer to filter out which of those prefixes will be announced to each BGP peer.

I suggest you first create the filters, apply them to the BGP peers and then add the more specific prefixes to Routing > BGP > Networks so they don't leak out before your filters are ready.

Example filters:
For your upstream (announce only /22s)
/routing filter add chain=upstream prefix=1.1.0.0/22 action=accept
/routing filter add chain=upstream prefix=1.1.4.0/22 action=accept
/routing filter add chain=upstream prefix=1.1.8.0/22 action=accept
/routing filter add chain=upstream prefix=1.1.12.0/22 action=accept
/routing filter add chain=upstream action=discard
For peer1 (announce only 2 /24s)
/routing filter add chain=peer1 prefix=1.1.0.0/24 action=accept
/routing filter add chain=peer1 prefix=1.1.1.0/24 action=accept
/routing filter add chain=peer1 action=discard
For peer2 (announce only 2 other /24s)
/routing filter add chain=peer2 prefix=1.1.3.0/24 action=accept
/routing filter add chain=peer2 prefix=1.1.4.0/24 action=accept
/routing filter add chain=peer2 action=discard
You then assign those filters to each BGP peer respectively and add the more specific prefixes to Routing > BGP > Networks.

You can check what you announce to each peer in Routing > BGP > Advertisements to make sure the proper prefixes are announced.

Who is online

Users browsing this forum: GODEEPAS and 23 guests