Community discussions

MikroTik App
 
blackmetal
Member Candidate
Member Candidate
Topic Author
Posts: 227
Joined: Mon Aug 16, 2010 9:01 am

Mikrotik Add BGP network with ROUTE-MAP like cisco

Sat Apr 17, 2021 6:49 am

Hello,
in cisco when we want to add a bgp network we can use such command like this :
router bgp 12345
address ipv4 family
network 192.168.1.0/24 route-map MYROUTEMAP

then in MYROUTEMAP we can set different attributes and then that route will install in routing table with that route, is there anything similar to this in mikrotik ?
thanks,
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7038
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Mikrotik Add BGP network with ROUTE-MAP like cisco

Sat Apr 17, 2021 11:28 am

Yes, it is called routing filters.
 
blackmetal
Member Candidate
Member Candidate
Topic Author
Posts: 227
Joined: Mon Aug 16, 2010 9:01 am

Re: Mikrotik Add BGP network with ROUTE-MAP like cisco

Sat Apr 17, 2021 11:32 am

yes i know that, but in cisco you can attach route-map to bgp network announcement but in mikrotik we can only add network and set syncronize
 
blackmetal
Member Candidate
Member Candidate
Topic Author
Posts: 227
Joined: Mon Aug 16, 2010 9:01 am

Re: Mikrotik Add BGP network with ROUTE-MAP like cisco

Sat Apr 17, 2021 11:33 am

for example i want to specify that 192.168.1.0/24 install with 12345:777 community in my routing table
 
User avatar
StubArea51
Trainer
Trainer
Posts: 1739
Joined: Fri Aug 10, 2012 6:46 am
Location: stubarea51.net
Contact:

Re: Mikrotik Add BGP network with ROUTE-MAP like cisco

Sat Apr 17, 2021 3:43 pm

That can be done. Here is an example config

/routing bgp peer
add name=peer1 out-filter=bgp-out remote-address=203.0.113.2 ttl=default

/routing filter
add action=accept bgp-communities="" chain=bgp-out prefix=192.168.1.0/24 set-bgp-communities=12345:777

Who is online

Users browsing this forum: No registered users and 14 guests