Community discussions

MikroTik App
 
An5teifo
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 84
Joined: Mon Dec 13, 2021 10:51 am
Location: Austria

BGP announce /48 subnet

Mon Jan 23, 2023 1:55 pm

Hello everyone,
I just took my 1st steps to BGP and want to announce my /48 IPv6 subnet to my BGP peer.
So far I only found the ability to announce "connected" which includeds this subnets but also my splitted /64 subnets.

Is there any possiblity to announce only the "big" /48 subnet?

I am using the current ROS 7.7
 
An5teifo
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 84
Joined: Mon Dec 13, 2021 10:51 am
Location: Austria

Re: BGP announce /48 subnet

Mon Jan 23, 2023 2:23 pm

Okay got it

Outbound filter like
if (dst==own address/48) {accept}
 
StepBee
just joined
Posts: 10
Joined: Wed Oct 19, 2022 8:44 pm

Re: BGP announce /48 subnet

Tue Jan 24, 2023 9:52 pm

Or to be a bit more dynamic and have the possibility to re-use rule sets on other routers and reduce the number of rules - matching dst on address-lists

An example from my IPv6 rule set

/ipv6/firewall/address-list/add list=ipv6-subnets address=2a11:abc1:a0::/48
/ipv6/firewall/address-list/add list=ipv6-subnets address=2a22:aa00:::/23
...

/routing/filter/rule/add chain=ipv6-ebgp-provider-out rule="if (afi ipv6 && dst in ipv6-subnets) {accept}"

The nice thing about matching dst on an address-list is it's matching only the exact address with the exact subnet mask, not smaller, not larger, and you have only one rule even when advertising multiple subnets.
Attention: In IPv4 matching dst on address-list there is a bug currently with /32 subnets - these would still be matched and advertised in this example even though the network mask is not matching a network mask of the address-list.

Who is online

Users browsing this forum: No registered users and 19 guests