Community discussions

 
lz1dsb
Member Candidate
Member Candidate
Topic Author
Posts: 222
Joined: Wed Aug 07, 2013 11:48 am

BGP aggregate configuration

Fri Jul 25, 2014 3:48 pm

The question is, how it's done? I haven't found so far a good example about this and I've been testing a bit lately. So here's my config&
I have a public /24 prefix which is divided into two /25 networks. And off course I would like to advertise the prefix to the provided as only one /24.

/routing filter
add action=discard chain=out-filter invert-match=yes prefix=150.13.0.0/24

/routing bgp peer
add in-filter=ISP_pfx_in name=ISP1 out-filter=\
out-filter remote-address=1.1.1.1 remote-as=123 update-source=\
1.1.1.2

/routing bgp aggregate
add instance=default prefix=150.13.0.0/24

So why is this configuration not working? Even if I add the network 150.13.0.0/25 - the router does not advertise anything. Off course if I remove the out-filter - only the /25 network is being advertised. How can I overcome this?
 
lz1dsb
Member Candidate
Member Candidate
Topic Author
Posts: 222
Joined: Wed Aug 07, 2013 11:48 am

Re: BGP aggregate configuration

Mon Jul 28, 2014 10:16 pm

Anyone?
Am I the only one trying to use BGP Aggregate on RouterOS?
 
jkarras
Member Candidate
Member Candidate
Posts: 224
Joined: Fri Sep 06, 2013 3:07 am
Location: Utah, USA

Re: BGP aggregate configuration

Tue Jul 29, 2014 5:46 am

Can't speak for the BGP aggregation but your filter command is incorrect and likely the problem. Try one of the following depending on what you wish to match.

Match /24 and /25 prefix length:
/routing filter add action=discard chain=out-filter invert-match=yes prefix=150.13.0.0 prefix-length=24-25
Match /24 or longer prefixes:
/routing filter add action=discard chain=out-filter invert-match=yes prefix=150.13.0.0 prefix-length=24-32
 
lz1dsb
Member Candidate
Member Candidate
Topic Author
Posts: 222
Joined: Wed Aug 07, 2013 11:48 am

Re: BGP aggregate configuration

Wed Jul 30, 2014 6:50 pm

Can't speak for the BGP aggregation but your filter command is incorrect and likely the problem. Try one of the following depending on what you wish to match.

Match /24 and /25 prefix length:
/routing filter add action=discard chain=out-filter invert-match=yes prefix=150.13.0.0 prefix-length=24-25
Match /24 or longer prefixes:
/routing filter add action=discard chain=out-filter invert-match=yes prefix=150.13.0.0 prefix-length=24-32
Unfortunatelly I don't think the filter is the problem. I also tried the following example, with no luck:
http://wiki.mikrotik.com/wiki/Manual:Si ... ultihoming

So than I decided, well why no just remove the filter and see whether the BGP aggregation is working. To me - it doesn'r work.
So I advertised the network 150.13.0.0/25 and then configure aggregate with the summary-only option and here's what I see in /routing bgp advertisements

[admin@KA-CE002] /routing bgp advertisements> print
PEER PREFIX NEXTHOP AS-PATH ORIGIN LOCAL-PREF
Main 149.13.0.0/25 87.121.150.98 igp
Backup 149.13.0.0/25 94.156.249.178 igp

Even though I have configured this:
/routing bgp aggregate
add instance=default prefix=149.13.0.0/24

So I believe that the bgp aggregate isn't taking any effect, and the filter was working properly. It's just that the BGP process was not advertising the /24 network...

Should I open a ticket at MikroTik?
 
User avatar
IPANetEngineer
Trainer
Trainer
Posts: 1053
Joined: Fri Aug 10, 2012 6:46 am
Location: Jackson, MS, USA
Contact:

Re: BGP aggregate configuration

Wed Jul 30, 2014 7:12 pm

Can you post your full routing table (assuming it's not a full public)
Global - MikroTik Support & Consulting - English | Francais | Español | Portuguese +1 855-645-7684
https://iparchitechs.com/services/mikro ... l-support/ mikrotiksupport@iparchitechs.com
 
lz1dsb
Member Candidate
Member Candidate
Topic Author
Posts: 222
Joined: Wed Aug 07, 2013 11:48 am

Re: BGP aggregate configuration

Wed Jul 30, 2014 9:00 pm

Can you post your full routing table (assuming it's not a full public)
No, it's not a routing table with public prefixes. I haven't applied the configuration on the production system yet. I'm testing it in GNS3 with a QEMU image of RouterOS.

I stumbled upon this fairly old thread...
http://forum.mikrotik.com/viewtopic.php?f=2&t=35129

Basically one of the colleagues suggests to use a dummy route in the routing table and then advertising it. Well, they say that the aggregation should work than, but in my case again it didn't
What I did though was to redistribute the dummy static route. This is how I can advertise the 150.13.0.0/24 network only.
The routing filter works as I've pasted it.
The only thing that bothers me though is that I can not change the Origin BGP attribute - it hangs on :incomplete". And even if I use the bgp-origin set to another value - than the update is blocked! So why I cannot manipulate it? Only if I leave the Origin attribute to "incomplete" the prefix is pushed to the neighbor....
 
lz1dsb
Member Candidate
Member Candidate
Topic Author
Posts: 222
Joined: Wed Aug 07, 2013 11:48 am

Re: BGP aggregate configuration

Wed Jul 30, 2014 9:13 pm

I think I started to get it!!!
When I use the parameter bgp-origin= set to something it actually does not set the BGP Origin parameter! It matches it!

So the only way I have found to set it is in an unexpected place ... setting the dummy ip route itself. This is where it's possible to set this, and a lot of other parameters.

So to sum up, this is the workaround:
1. Set a dummy ip route for the /24 network as type unreachable. Optoinaly when this route is configured we could set many bgp and other parameters.
2. Than redistribute the static routes in the routing table.
3. Than use routing filter to the neighbors to set other BGP attributes and filter whatever we need to filter.

And all of this because the aggregate function of BGP is not working in RouterOS....
 
jkarras
Member Candidate
Member Candidate
Posts: 224
Joined: Fri Sep 06, 2013 3:07 am
Location: Utah, USA

Re: BGP aggregate configuration

Thu Jul 31, 2014 5:29 am

My guess is its because the two halfs of your /25 are not in your routing table. Its only going to aggregate routes that fully exist.
 
lz1dsb
Member Candidate
Member Candidate
Topic Author
Posts: 222
Joined: Wed Aug 07, 2013 11:48 am

Re: BGP aggregate configuration

Fri Aug 01, 2014 2:00 pm

My guess is its because the two halfs of your /25 are not in your routing table. Its only going to aggregate routes that fully exist.
Good point. It's interesting if it's really the case. I'll test it tonight if I have time.
But strange though... I don't recall reading for such a requirement in the documentation. I'll check again.
 
lz1dsb
Member Candidate
Member Candidate
Topic Author
Posts: 222
Joined: Wed Aug 07, 2013 11:48 am

Re: BGP aggregate configuration

Wed Aug 06, 2014 8:37 pm

My guess is its because the two halfs of your /25 are not in your routing table. Its only going to aggregate routes that fully exist.
Good point. It's interesting if it's really the case. I'll test it tonight if I have time.
But strange though... I don't recall reading for such a requirement in the documentation. I'll check again.
I finally got the time to test this. Well, it didn't work out. I advertised the second /25 with OSPF, so now both /25 subnets are present into the routing table. But unfortunately the bgp aggregation still does not work...

Who is online

Users browsing this forum: No registered users and 11 guests