Community discussions

 
beambarossa
just joined
Topic Author
Posts: 10
Joined: Tue Mar 07, 2017 4:35 am

Create prefix list from learned peer routes

Mon Feb 11, 2019 6:05 am

Hey,

I am trying to gather our transit customer routes dynamically into a prefix list or similar so i can apply inbound filters on peering to automatically prevent routing traffic back to them over peering. Currently we add bgp community to the learned routes to manipulate outgoing traffic OK but how do people filter inbound?

Thanks in advance!
 
p3rad0x
Long time Member
Long time Member
Posts: 590
Joined: Fri Sep 18, 2015 5:42 pm
Location: South Africa
Contact:

Re: Create prefix list from learned peer routes

Mon Feb 11, 2019 3:58 pm

Hi,

Accept all inbound routes accept your IP space and bogons.

Then create a out filter to just so only your space gets advertised and the rest gets dropped.

99.9% of the time your peers will have their own filters in place to only accept your IP space, but you could never be too careful.

It should solve your issue if I understood correctly
There you go then you touched something ;-) : it only takes a change in wind direction to screw with your nat :-)
 
beambarossa
just joined
Topic Author
Posts: 10
Joined: Tue Mar 07, 2017 4:35 am

Re: Create prefix list from learned peer routes

Mon Feb 11, 2019 8:42 pm

Thanks for the reply! That works fine most of the time In this case I am learning these prefixes via peering as asxxxx as they are peered direct, but they are a customer of our customer so I'm learning them asbbbbb asxxxx etc. So basically all traffic I route to them is back via peering which is fine obviously technically but just makes stuff messy. If it was one prefix here or there I just manually filter inbound from peering but this is quite a number of changing prefixes. Cheers!
 
Vooray
Frequent Visitor
Frequent Visitor
Posts: 61
Joined: Mon Feb 23, 2015 3:34 pm

Re: Create prefix list from learned peer routes

Mon Feb 11, 2019 9:32 pm

This looks pretty legit. You dont have to worry about it - that is how BGP works. Best as-path will be chosen.
 
bbs2web
Member Candidate
Member Candidate
Posts: 176
Joined: Sun Apr 22, 2012 6:25 pm
Location: Johannesburg, South Africa
Contact:

Re: Create prefix list from learned peer routes

Tue Feb 12, 2019 12:45 am

This feature unfortunately does not exist, would be great if it did though. Have you logged a feature request?

NB: The more people individually ask, the more likely Mikrotik will listen...

Have a look at the following, appears that it may do what you're looking for:
viewtopic.php?f=14&t=129381&p=635752&hi ... rs#p635752
Last edited by bbs2web on Tue Feb 12, 2019 9:11 pm, edited 1 time in total.
 
beambarossa
just joined
Topic Author
Posts: 10
Joined: Tue Mar 07, 2017 4:35 am

Re: Create prefix list from learned peer routes

Tue Feb 12, 2019 8:17 am

That Manrs looks great thanks for that should do what im after. It would be a good feature - will add to the request page. Thanks for the response!
 
bbs2web
Member Candidate
Member Candidate
Posts: 176
Joined: Sun Apr 22, 2012 6:25 pm
Location: Johannesburg, South Africa
Contact:

Re: Create prefix list from learned peer routes

Tue Feb 12, 2019 9:19 pm

Apologies, I read your initial post again and realised that you're actually wanting to filter out customer prefixes from peers, internet exchanges and upstreams. An issue we once had was a down stream customer advertising a /20 via us and more specific /24 prefixes only on an exchange we also peer on. Traffic would flow in from our upstream and then route to the client via the exchange, instead of the customer's rate limited port.

Wrote a script which updates route filters, will try post it tomorrow. Load shedding in SA so can't use my workstation right now...

That Manrs looks great thanks for that should do what im after. It would be a good feature - will add to the request page. Thanks for the response!

Who is online

Users browsing this forum: infosec and 4 guests