Community discussions

MikroTik App
 
tfandrade
just joined
Topic Author
Posts: 2
Joined: Tue Aug 07, 2018 11:34 pm

BGP advertise smaller prefix than /24

Sat Apr 25, 2020 12:40 am

Hello people.. I really need some help.

I'm trying to setup a router that I will add some IPs that are on our abuse list to interface (bridge) that I created called blackhole and than establish a BGP session with my main router to send to blackhole all of the addresses comming from this BGP session.

So far everything was going fine but I'm stucked because the BGP won't announce a prefix smaller than /24 but I will have a lot of addresses that are /32.

Is there anyway that I can bypass this problem that BGP won't announce smaller prefix?

Thank you so much!
 
User avatar
Cha0s
Forum Guru
Forum Guru
Posts: 1142
Joined: Tue Oct 11, 2005 4:53 pm

Re: BGP advertise smaller prefix than /24

Sat Apr 25, 2020 2:54 pm

BGP can and will announce any prefix length.

Check your filters, you probably discard any prefix smaller than /24.
 
User avatar
ingdaka
Trainer
Trainer
Posts: 452
Joined: Thu Aug 30, 2012 3:06 pm
Location: Albania
Contact:

Re: BGP advertise smaller prefix than /24  [SOLVED]

Sat Apr 25, 2020 3:03 pm

BGP not allow to announce /24 to provider over eBGP but if you are in your network with iBGP you can do it!
 
User avatar
Cha0s
Forum Guru
Forum Guru
Posts: 1142
Joined: Tue Oct 11, 2005 4:53 pm

Re: BGP advertise smaller prefix than /24

Sun May 03, 2020 6:19 pm

BGP not allow to announce /24 to provider over eBGP but if you are in your network with iBGP you can do it!
This is a false statement.

BGP doesn't care about prefix length on its advertisements, regardless of eBGP or iBGP.

You are confusing user defined policy (which yes, /24 is usually the smallest prefix you can announce on the public internet) with what the protocol can do.
 
User avatar
ingdaka
Trainer
Trainer
Posts: 452
Joined: Thu Aug 30, 2012 3:06 pm
Location: Albania
Contact:

Re: BGP advertise smaller prefix than /24

Sun May 03, 2020 11:50 pm

Yes BGP as a routing protocol allows it, but RIR-s policies does not want it, so approximately all Internet Providers don't accept smaller than /24 from their downstream providers because they need to do summary in their network and nobody want some extra work for this!
 
User avatar
Cha0s
Forum Guru
Forum Guru
Posts: 1142
Joined: Tue Oct 11, 2005 4:53 pm

Re: BGP advertise smaller prefix than /24

Tue May 05, 2020 3:29 pm

Sure, that's all true (that was implied by my "user defined policy" comment).
But OP didn't mention anything about RIRs or the public internet or any "provider".

Those were your assumptions followed by a false statement about what the protocol can or cannot do.
 
pwuk
Frequent Visitor
Frequent Visitor
Posts: 51
Joined: Wed Aug 01, 2012 8:51 pm

Re: BGP advertise smaller prefix than /24

Mon May 11, 2020 9:08 pm

Just to confirm I advertise everything from /16 to /32 (and /0) via eBGP between many different ASs

I do try to aggregate routes to /24s, but it's sometimes not possible. For example

Incoming filter at one site
/routing filter add action=accept chain=bgp-in-fromcore comment="From UK Path A" prefix=172.24.0.0/13 prefix-length=13-32 set-bgp-weight=200

Has a route:
1181 ADb dst-address=172.31.176.0/27 gateway=172.29.253.1 gateway-status=172.29.253.1 reachable via sfp1-toBT distance=20 scope=40 target-scope=10
bgp-as-path="65103,65101,65000,65001,65189,64512" bgp-weight=200 bgp-origin=igp received-from=bgpPathA
 
User avatar
StubArea51
Trainer
Trainer
Posts: 1739
Joined: Fri Aug 10, 2012 6:46 am
Location: stubarea51.net
Contact:

Re: BGP advertise smaller prefix than /24

Mon May 11, 2020 9:34 pm

It's also worth pointing out, that many IP transit providers (not all) will allow you to announce a prefix length greater than a /24 (i.e /25 through /32) over multiple connections to the same provider & will aggregate the prefix to /24 or less when announcing it to peers in the DFZ.

Who is online

Users browsing this forum: Scojayboi and 14 guests