Community discussions

MikroTik App
 
rpingar
Long time Member
Long time Member
Topic Author
Posts: 591
Joined: Fri May 28, 2004 2:46 pm
Location: Italy

set bgp prepend path in v7

Wed May 11, 2022 7:22 am

how can I have something similar to v6 "set bgp pepand path" in v7?
for exemple:
chain=out-to-sky prefix=1XX.1AA.CCC.DDD/24 invert-match=no action=accept set-bgp-prepend-path=65002

I dodn't see any writable parameter similat to this in v7 routing filter.

any help?
thanks
Last edited by rpingar on Wed May 11, 2022 6:04 pm, edited 1 time in total.
 
User avatar
IPANetEngineer
Trainer
Trainer
Posts: 1676
Joined: Fri Aug 10, 2012 6:46 am
Location: iparchitechs.com
Contact:

Re: set bgp prepend path in v7

Wed May 11, 2022 9:13 am

I haven't tried it yet but I think it's something like this

ROS v7 accepts this syntax

add chain=test rule="if (dst in 200:co1d:c01a::/48) { set bgp-path-peer-prepend 5;accept}"
 
rpingar
Long time Member
Long time Member
Topic Author
Posts: 591
Joined: Fri May 28, 2004 2:46 pm
Location: Italy

Re: set bgp prepend path in v7

Wed May 11, 2022 9:16 am

I haven't tried it yet but I think it's something like this

ROS v7 accepts this syntax

add chain=test rule="if (dst in 200:co1d:c01a::/48) { set bgp-path-peer-prepend 5;accept}"
Nop,
the bgp-path-peer-prepend is used to check (in input chain) how many prepred has a prefix in its as-path.

my requestis about set-bgp-prepend-path that is about manipulation of as-path in output filter.

thanks
Ros
 
Dude2048
Member Candidate
Member Candidate
Posts: 207
Joined: Thu Sep 01, 2016 4:04 pm

Re: set bgp prepend path in v7

Wed May 11, 2022 9:35 am

Create a filter like the one above. In BGP attach it to the output filter.
 
rpingar
Long time Member
Long time Member
Topic Author
Posts: 591
Joined: Fri May 28, 2004 2:46 pm
Location: Italy

Re: set bgp prepend path in v7

Wed May 11, 2022 9:41 am

Create a filter like the one above. In BGP attach it to the output filter.
no the wiretable parameter above is not able to add as into the aspath
 
rpingar
Long time Member
Long time Member
Topic Author
Posts: 591
Joined: Fri May 28, 2004 2:46 pm
Location: Italy

Re: set bgp prepend path in v7

Wed May 11, 2022 5:31 pm

logically the conversion from v6 to v7 is not working.
 
pe1chl
Forum Guru
Forum Guru
Posts: 9011
Joined: Mon Jun 08, 2015 12:09 pm

Re: set bgp prepend path in v7

Wed May 11, 2022 5:47 pm

use: set bgp-path-prepend 5;

edit: you are right, it does not work. another thing to fix in v7 BGP.
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 6818
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: set bgp prepend path in v7

Sat May 14, 2022 9:57 pm

Inserting fake ASes in AS path will no longer be possible. You can prepend only your own AS or peer AS, nothing else.
 
pe1chl
Forum Guru
Forum Guru
Posts: 9011
Joined: Mon Jun 08, 2015 12:09 pm

Re: set bgp prepend path in v7

Sat May 14, 2022 10:16 pm

Ok so what is the way to insert a few duplicates of the peer AS in a received path?
(to make it appear to have more hops and thus less preferred than another path)
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 6818
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: set bgp prepend path in v7

Sat May 14, 2022 10:21 pm

set bgp-path-peer-prepend
or
set bgp-path-prepend

depending on which AS you want to prepend
 
pe1chl
Forum Guru
Forum Guru
Posts: 9011
Joined: Mon Jun 08, 2015 12:09 pm

Re: set bgp prepend path in v7

Sat May 14, 2022 10:38 pm

Ok so in the input filter you need to use set bgp-path-peer-prepend or else it does nothing...
(in v6 set-bgp-prepend=3 worked both in input and output filter)
It looks like the conversion from v6 to v7 handles this incorrectly. Problem is of course that a filter cannot know if it is input or output filter, and in v6 it could be both.
Well, the filter conversion has more problems than that. E.g. it forgets to append an "accept" entry at the end of each chain, which is there implicitly in v6.
Maybe you could issue some warning to upgraders that they need to manually review their filter rules after upgrade, and what to look for.
(in fact I would appreciate it when you displayed a warning pointing to some page on help.mikrotik.com when users try to do a v6 to v7 upgrade and where you explain any known issues at that time, and that e.g. BGP is a work in progress so users that use BGP should be extra careful and/or ask their peers first)
 
pe1chl
Forum Guru
Forum Guru
Posts: 9011
Joined: Mon Jun 08, 2015 12:09 pm

Re: set bgp prepend path in v7

Tue May 17, 2022 6:13 pm

There now is a dedicated help page for users upgrading to v7: https://help.mikrotik.com/docs/display/ ... ding+to+v7
It would be helpful when the issues with upgrading the Route Filters are mentioned there, aside of "you need to check them".

Who is online

Users browsing this forum: Google [Bot] and 1 guest