Community discussions

MikroTik App
 
gameboys61
just joined
Topic Author
Posts: 14
Joined: Sun Nov 01, 2020 1:36 pm

Routeros 7 BGP Using Smaller Prefix

Thu Apr 07, 2022 9:11 am

Hello,
Im using /24 prefix for BGP.

When I was using Routeros 6 I disable synchronize and I can use /25-/26 etc. prefix on my router.

In Ros7 this is no synchronize button. How can I do this ?

Thanks.
 
User avatar
loloski
Member Candidate
Member Candidate
Posts: 277
Joined: Mon Mar 15, 2021 9:10 pm

Re: Routeros 7 BGP Using Smaller Prefix  [SOLVED]

Thu Apr 07, 2022 10:49 am

Hi,

Make a route with a type of blackhole

https://help.mikrotik.com/docs/display/ ... g+Examples

/ip/firewall/address-list/
add list=bgp-networks address=192.168.0.0/24

/ip/route
add dst-address=192.168.0.0/24 blackhole

/routing/bgp/connection
set peer_name output.network=bgp-networks

and also check your upstream because the smallest prefix you can advertise is /24
 
gameboys61
just joined
Topic Author
Posts: 14
Joined: Sun Nov 01, 2020 1:36 pm

Re: Routeros 7 BGP Using Smaller Prefix

Thu Apr 07, 2022 11:26 am

Thanks for reply.

I have real IP like (example: 1.1.1.0/24) .
I advertesing 1.1.1.0/24 .
I want to use 1.1.1.0/25 and 1.1.1.129/25 on my VLAN's.

On routeros6 I can do it with synchronize=no . In routers 7 this is no option.

Do I need to route blackhole ? Its correct ?
 
User avatar
loloski
Member Candidate
Member Candidate
Posts: 277
Joined: Mon Mar 15, 2021 9:10 pm

Re: Routeros 7 BGP Using Smaller Prefix

Thu Apr 07, 2022 3:00 pm

hi,

yes, just like what i give you in the previous post
 
eduplant
Member Candidate
Member Candidate
Posts: 139
Joined: Tue Dec 19, 2017 9:45 am

Re: Routeros 7 BGP Using Smaller Prefix

Thu Apr 07, 2022 7:52 pm

I have real IP like (example: 1.1.1.0/24) .
I advertesing 1.1.1.0/24 .
I want to use 1.1.1.0/25 and 1.1.1.129/25 on my VLAN's.
Why do you need to advertise something smaller to your BGP neighbors?

Also if you are actually using those two /25s in your network, shouldn't they already be in the table and synchronization shouldn't be an issue?

It's usually good to have a static tie-down route anyway to make sure that your BGP speakers don't revoke prefixes externally because of an IGP issue internally. If you go that route I would make sure to give them a high administrative distance like 254 so that they don't accidentally become the installed route for that prefix over, say, OSPF.
 
gameboys61
just joined
Topic Author
Posts: 14
Joined: Sun Nov 01, 2020 1:36 pm

Re: Routeros 7 BGP Using Smaller Prefix

Thu Apr 07, 2022 9:01 pm

I have real IP like (example: 1.1.1.0/24) .
I advertesing 1.1.1.0/24 .
I want to use 1.1.1.0/25 and 1.1.1.129/25 on my VLAN's.
Why do you need to advertise something smaller to your BGP neighbors?

Also if you are actually using those two /25s in your network, shouldn't they already be in the table and synchronization shouldn't be an issue?

It's usually good to have a static tie-down route anyway to make sure that your BGP speakers don't revoke prefixes externally because of an IGP issue internally. If you go that route I would make sure to give them a high administrative distance like 254 so that they don't accidentally become the installed route for that prefix over, say, OSPF.
Hello,
I want to use 2 x /25 on my router.
Im advertesing /24 to neighbor.
 
eduplant
Member Candidate
Member Candidate
Posts: 139
Joined: Tue Dec 19, 2017 9:45 am

Re: Routeros 7 BGP Using Smaller Prefix

Thu Apr 07, 2022 9:22 pm

I want to use 2 x /25 on my router.
Im advertesing /24 to neighbor.
Yeah you shouldn't need to do anything special with BGP then. The /24 covers both /25s so once traffic reaches you your router will just use the more specifics.
 
gameboys61
just joined
Topic Author
Posts: 14
Joined: Sun Nov 01, 2020 1:36 pm

Re: Routeros 7 BGP Using Smaller Prefix

Thu Apr 07, 2022 9:56 pm

I want to use 2 x /25 on my router.
Im advertesing /24 to neighbor.
Yeah you shouldn't need to do anything special with BGP then. The /24 covers both /25s so once traffic reaches you your router will just use the more specifics.
Im using router os v7.
But its not working.
I added to firewall bgp_out list with a 1.1.1.0/24 .
I adden in my address list I added /25 its not working ( gateway no respond to ping ).
When I was add to /24 on my address list gateway is pingable.
 
gameboys61
just joined
Topic Author
Posts: 14
Joined: Sun Nov 01, 2020 1:36 pm

Re: Routeros 7 BGP Using Smaller Prefix

Thu Apr 07, 2022 9:59 pm

Hi,

Make a route with a type of blackhole

https://help.mikrotik.com/docs/display/ ... g+Examples

/ip/firewall/address-list/
add list=bgp-networks address=192.168.0.0/24

/ip/route
add dst-address=192.168.0.0/24 blackhole

/routing/bgp/connection
set peer_name output.network=bgp-networks

and also check your upstream because the smallest prefix you can advertise is /24
Its worked.
Thanks.
 
sep
newbie
Posts: 25
Joined: Thu Nov 28, 2013 2:34 pm

Re: Routeros 7 BGP Using Smaller Prefix

Wed Nov 02, 2022 11:32 pm

how do you do this when you have a connection with ipv4 and ipv6 address families ? the connection only have 1 output.network
Do you just make the same address list in both ipv6 address list and ipv4 address lists ?
 
StepBee
just joined
Posts: 10
Joined: Wed Oct 19, 2022 8:44 pm

Re: Routeros 7 BGP Using Smaller Prefix

Thu Dec 01, 2022 11:28 am

seb, i think it would be recommendation to have one IPv4 BGP connection and a second, additional, IPv6 BGP connection to the peer.
This way you can define the correct address-list per connection and use separated route filters per ipv4 and ipv6.

And as a bonus you are probably mitigating some surprisingly routing behaviors when advertising ipv4 and ipv6 using the same bgp connection.
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7038
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Routeros 7 BGP Using Smaller Prefix

Fri Dec 02, 2022 10:33 am

BGP looks for both ipv4 and ipv6 address lists with the same name.

Who is online

Users browsing this forum: No registered users and 20 guests