Community discussions

MikroTik App
 
User avatar
YazzY
Member Candidate
Member Candidate
Topic Author
Posts: 140
Joined: Fri May 28, 2004 3:26 pm
Location: Norway, Østfold
Contact:

Problems with BGP and set-bgp-prepend on x86

Wed Apr 06, 2011 11:55 pm

Hi.

I have discovered that I cannot upgrade from 5.0rc10 to 5.0rc11 or 5.0 without breaking my BGP setup.
I have two uplinks, each connected to a different BGP router of my ISP.
I also have (the same) /27 network routed to both my BGP peers so it works in a fail over mode.
I had to set up BGP weight/priority so my BGP peers would tell the Ciscos of the ISP which BGP is preferred for traffic.
Otherwise every other packet would be sent to each of my routers.
This thing stopped working since 5.0RC11. The set-bgp-prepend option does not seem to be honored anymore.

My primary BGP router runs on RC10. My backup router can actually run on 5.0.
This outgoing filter is set up on my backup router. It tells it's peer that this BGP has lower priority in route selection process.
This router runs RouterOS 5.0.

> routing filter print
Flags: X - disabled
0 ;;; IPv4 BGP Link
chain=as65004out prefix=111.222.333.0/27 bgp-as-path=31283 address-family=ip invert-match=no action=accept
1 chain=as65004out prefix=0.0.0.0/0 prefix-length=0-32 bgp-as-path=31283 address-family=ip invert-match=no action=reject
2 chain=as65004out address-family=ip invert-match=no action=passthrough set-bgp-prepend=2

My primary router does not have set-bgp-prepend defined which I believe defaults to 1.
0 ;;; IPv4 BGP Link
chain=as65004out prefix=111.222.333.0/27 bgp-as-path=31283 address-family=ip invert-match=no action=accept
1 chain=as65004out prefix=0.0.0.0/0 prefix-length=0-32 bgp-as-path=31283 address-family=ip invert-match=no action=reject

Did anything change for set-bgp-prepend since 5.0rc11?
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 6045
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Problems with BGP and set-bgp-prepend on x86

Thu Apr 07, 2011 8:47 am

Regarding prepend nothing was changed in last several versions.

Your first rule is accepting /27 network
Then third rule has set-prepend. Obviously /27 prefix is accepted in first rule and never gets to prepend.
 
User avatar
YazzY
Member Candidate
Member Candidate
Topic Author
Posts: 140
Joined: Fri May 28, 2004 3:26 pm
Location: Norway, Østfold
Contact:

Re: Problems with BGP and set-bgp-prepend on x86

Thu Apr 07, 2011 4:13 pm

I changed the filter rules a bit and set prepend to the first rules as well.
Unfortunately this did not fix the problem. Why does this work with 5.0rc10 and not on newer versions of RouterOS ?

Primary router:
0 chain=as65004out prefix=111.222.333.0/27 bgp-as-path=31283 address-family=ip invert-match=no action=accept
1 chain=as65004out prefix=0.0.0.0/0 prefix-length=0-32 bgp-as-path=31283 address-family=ip invert-match=no action=discard
2 chain=as65004out address-family=ip invert-match=no action=passthrough

Backup router:
0 chain=as65004out prefix=111.222.333.0/27 bgp-as-path=31283 address-family=ip invert-match=no action=accept set-bgp-local-pref=100 set-bgp-prepend=3
1 chain=as65004out prefix=0.0.0.0/0 prefix-length=0-32 bgp-as-path=31283 address-family=ip invert-match=no action=discard
2 chain=as65004out bgp-local-pref=100 address-family=ip invert-match=no action=passthrough set-bgp-prepend=3
 
User avatar
YazzY
Member Candidate
Member Candidate
Topic Author
Posts: 140
Joined: Fri May 28, 2004 3:26 pm
Location: Norway, Østfold
Contact:

Re: Problems with BGP and set-bgp-prepend on x86

Thu Apr 14, 2011 9:21 am

Anything new on this issue?
 
User avatar
YazzY
Member Candidate
Member Candidate
Topic Author
Posts: 140
Joined: Fri May 28, 2004 3:26 pm
Location: Norway, Østfold
Contact:

Re: Problems with BGP and set-bgp-prepend on x86

Thu Apr 28, 2011 1:28 pm

Did the 5.2 release fix this?
 
User avatar
leoktv
Trainer
Trainer
Posts: 141
Joined: Thu Dec 01, 2005 1:39 pm
Location: sweden
Contact:

Re: Problems with BGP and set-bgp-prepend on x86

Thu Apr 28, 2011 4:18 pm

I changed the filter rules a bit and set prepend to the first rules as well.
Unfortunately this did not fix the problem. Why does this work with 5.0rc10 and not on newer versions of RouterOS ?

Primary router:
0 chain=as65004out prefix=111.222.333.0/27 bgp-as-path=31283 address-family=ip invert-match=no action=accept
1 chain=as65004out prefix=0.0.0.0/0 prefix-length=0-32 bgp-as-path=31283 address-family=ip invert-match=no action=discard
2 chain=as65004out address-family=ip invert-match=no action=passthrough

Backup router:
0 chain=as65004out prefix=111.222.333.0/27 bgp-as-path=31283 address-family=ip invert-match=no action=accept set-bgp-local-pref=100 set-bgp-prepend=3
1 chain=as65004out prefix=0.0.0.0/0 prefix-length=0-32 bgp-as-path=31283 address-family=ip invert-match=no action=discard
2 chain=as65004out bgp-local-pref=100 address-family=ip invert-match=no action=passthrough set-bgp-prepend=3
I think the problem are the local-pref 100 are the standar value... local-pref are not leaving the local AS
_________________
Leo De Geer, Mikrotik Certified Consultant/Trainer #TR0003, MTCNA, MTCRE, MTCWE, MTCTCE, MTCINE, MTCUME, MTCIPv6E MTCSE MTCASE MTCSWE & MikroTik Distributor
http://www.mikrotik.se
support[at]mikrotik.se
Office: +46 325 660 650
 
User avatar
YazzY
Member Candidate
Member Candidate
Topic Author
Posts: 140
Joined: Fri May 28, 2004 3:26 pm
Location: Norway, Østfold
Contact:

Re: Problems with BGP and set-bgp-prepend on x86

Tue May 03, 2011 9:40 pm

I think the problem are the local-pref 100 are the standar value... local-pref are not leaving the local AS
Thanks leoktv. Defining set-bgp-local-pref and set-bgp-weight fixed it.
0 ;;; IPv4 BGP Link
chain=as65004out prefix=11.22.33.0/27 bgp-as-path=31283 address-family=ip invert-match=no action=accept set-bgp-weight=5 set-bgp-local-pref=200

Who is online

Users browsing this forum: anon31337, shivanimtneha and 138 guests