Community discussions

MikroTik App
 
doman
just joined
Topic Author
Posts: 16
Joined: Mon Apr 06, 2020 8:19 pm
Location: Wisconsin

BGP Peering Assistance - Prepending AS

Tue Apr 19, 2022 10:55 pm

I come from the Cisco World (15 Yrs) - Our current infrastructure is all Cisco, but one of our several internet peer routers is due to be replaced in order to upgrade to 10g connection. In the Cisco world you would create Prefix lists and list your prefixes. Those then would be associated with a specific peer. It is my understanding in the MT world it is done through Address Lists. Easy enough to understand. The next caveat is I need to prepend my AS lets say 4x for a specific set of prefixes. In the Cisco world this is done with Route Maps. Its not clear to me in the documentation how this is accomplished. It appears route filters/rule.

My question is how would I accomplish all of this and if I am creating more complex route filters is using the Address List still the correct way to define the prefix list? Below is an example of the Cisco config I am trying to replicate to a MT. The prefix list "isp1-out-ipv4" is all the prefixes I want to advertise to the ISP and the prefix list "isp1-prepend-out-ipv4" are the prefixes I want to prepend

ip prefix-list isp1-out-ipv4 seq 10 permit 5.5.5.0/24
ip prefix-list isp1-out-ipv4 seq 30 permit 5.5.6.0/24
ip prefix-list isp1-out-ipv4 seq 40 permit 5.5.7.0/24
ip prefix-list isp1-out-ipv4 seq 50 permit 5.5.8.0/24
ip prefix-list isp1-out-ipv4 seq 60 permit 5.5.9.0/24
!
ip prefix-list isp1-prepend-out-ipv4 seq 5 permit 5.5.7.0/24
ip prefix-list isp1-prepend-out-ipv4 seq 10 permit 5.5.8.0/24
!
route-map isp1-localonly-out-ipv4 permit 5
description AS-path prepend 4 times routes originated from the local AS
match ip address prefix-list isp1-prepend-out-ipv4
set as-path prepend 4
!
route-map isp1-localonly-out-ipv4 permit 10
description Leave BGP advertisements as Default
 
mafiosa
Member Candidate
Member Candidate
Posts: 266
Joined: Fri Dec 09, 2016 8:10 pm
Location: Kolkata, India
Contact:

Re: BGP Peering Assistance - Prepending AS

Tue Apr 19, 2022 11:16 pm

Set a rule with if dst in <ipv4 address list> set bgp-prepend 3
 
doman
just joined
Topic Author
Posts: 16
Joined: Mon Apr 06, 2020 8:19 pm
Location: Wisconsin

Re: BGP Peering Assistance - Prepending AS

Tue Apr 19, 2022 11:54 pm

I don't think I clarified, but I an doing this in ROSv7. Is this still the same process? If so, I will test it out when I am back to my desk.
 
doman
just joined
Topic Author
Posts: 16
Joined: Mon Apr 06, 2020 8:19 pm
Location: Wisconsin

Re: BGP Peering Assistance - Prepending AS

Wed Apr 20, 2022 12:07 am

I think I may have found figured it out based on what you stated. I think it would look something like below - I am assuming this gets applied to the BGP connection as an output filter and the output network contains the complete list of prefixes?



if (dst in isp-prepend-out-ipv4) {set bgp-path-prepend +3; accept}

With Access list isp-prepend-out-ipv4 containing the prefixes I want to prepend.

Who is online

Users browsing this forum: No registered users and 14 guests