Community discussions

MikroTik App
 
AlexM2020
newbie
Topic Author
Posts: 32
Joined: Sat Jan 04, 2020 12:19 pm

eBGP v6.x to v7.x migration

Thu Apr 25, 2024 2:24 pm

Good morning everyone,
with my AS and a single upstream provider I am advertising my public subnet /24.
I have always rejected FIRT as there was no point in managing it.
I have to change Router and I am forced to switch to Kernel v7.x.
The commands are these:

/routing bgp instance
set default as=MYASNUMBER
/routing bgp network
add network=MYSUBNET/24 synchronize=no
/bgp peer routing
add in-filter=bgp-in name=UPSTREAM out-filter=bgp-out remote-address=xxx.xxx.xxx.xxx remote-as=UPSTREAMAS

/routing filter
add action=accept chain=bgp-out prefix=MYSUBNET/24
add action=discard chain=bgp-out
add action=discard chain=bgp-in disabled=yes prefix=10.0.0.0/8
add action=accept chain=bgp-in prefix=0.0.0.0/0

I managed to replicate the configuration on v.7.x partially.
The filters don't work for me and therefore the CCR2116 Router tries to acquire the FIRT and I don't think it can manage it since it immediately brings the CPU to 80% and is extremely slow.

Can some kind soul help me? Thank you
 
User avatar
loloski
Member
Member
Posts: 354
Joined: Mon Mar 15, 2021 9:10 pm

Re: eBGP v6.x to v7.x migration

Thu Apr 25, 2024 3:20 pm

#### Put your prefix here that you want to announce
/ip/firewall/address-list/add list=MYSUBNET address=122.23.0.0/24 ### this is just a sample
#### i assume that you have point to point connection to your peer so this is not a multihop host and address families is IP
#### assumption your peer address is 1.1.1.2 and your local address is 1.1.1.1 

#### configure template
/routing/bgp/template/set as=65001 address-families=ip 0

#### add new bgp connection
/routing/bgp/connection/add templates=default connect=yes remote.address=1.1.1.2 local.address=1.1.1.1 local.role=ebgp input.filter=BGP-IN output.filter-chain=BGP-OUT output.network=MYSUBNET name=TO-USG

#### add new routing filter rule for BGP-IN and BGP-OUT chain adjust it accordingly to your needs
#### Please visit the official page https://help.mikrotik.com/docs/display/ROS/Route+Selection+and+Filters 
#### https://help.mikrotik.com/docs/display/ROS/Upgrading+to+v7
#### in ros v7 discard is no longer available please check the documentation on how to use input.accept-nlri

/routing/filter/rule/add chain=BGP-IN rule="accept" 
/routing/filter/rule/add chain=BGP-OUT rule="if(dst in 122.23.0.0/24 && dst-len == 24) { accept; } else { reject;}"
 
AlexM2020
newbie
Topic Author
Posts: 32
Joined: Sat Jan 04, 2020 12:19 pm

Re: eBGP v6.x to v7.x migration

Fri Apr 26, 2024 12:31 pm

Thanks for the reply, I made a transcription error.
The filters that I would like to translate from v6 to v7 are these: (Basically I want to avoid acquiring the FIRT)

/routing filter
add action=accept chain=bgp-out prefix=MYSUBNET/24
add action=discard chain=bgp-out

add action=accept chain=bgp-in prefix=0.0.0.0/0
add action=discard chain=bgp-in
 
User avatar
loloski
Member
Member
Posts: 354
Joined: Mon Mar 15, 2021 9:10 pm

Re: eBGP v6.x to v7.x migration

Fri Apr 26, 2024 12:41 pm

/routing/filter/rule/add chain=BGP-IN rule="if(dst==0.0.0.0/0) { accept; } else { reject; }"
 
AlexM2020
newbie
Topic Author
Posts: 32
Joined: Sat Jan 04, 2020 12:19 pm

Re: eBGP v6.x to v7.x migration

Fri Apr 26, 2024 6:21 pm

Thanks so much for your help, I'll try them as soon as I can.

OSPF has also changed, I used this clause which I can't find anymore. Do you have any idea about the alternative?

/routing ospf instance
set [ find default=yes ] distribute-default=always-as-type-1 router-id=MYROUTERID
 
User avatar
loloski
Member
Member
Posts: 354
Joined: Mon Mar 15, 2021 9:10 pm

Re: eBGP v6.x to v7.x migration

Sat Apr 27, 2024 11:29 am

Just read the manual mate, make a lab and learn it it's hard to config something without a real context

Who is online

Users browsing this forum: No registered users and 2 guests