Page 1 of 1
BGP prefix count in ROS 7.1 stable
Posted: Wed Jan 05, 2022 2:12 pm
by gullio23
hello guys,
i cannot see the prefix count received on bgp peer as before, maybe there is a way to see them, but i haven't found info, i see only in peer cache prefix count "0".
thanks a lot
Giulio
Re: BGP prefix count in ROS 7.1 stable
Posted: Tue Jan 25, 2022 11:29 pm
by rootsh
Hi, i have the same problem, i see "0" in "prefix count" column.
Screenshot_8.png
Re: BGP prefix count in ROS 7.1 stable
Posted: Fri Feb 18, 2022 7:15 pm
by Splash
This is still an issue for me on version 7.1.2.
Please fix
Re: BGP prefix count in ROS 7.1 stable
Posted: Fri Feb 25, 2022 7:10 pm
by formi
Still an issue in 7.1.3
Re: BGP prefix count in ROS 7.1 stable
Posted: Fri Mar 04, 2022 9:50 am
by Splash
This sucks
Re: BGP prefix count in ROS 7.1 stable
Posted: Fri Mar 04, 2022 11:49 am
by pe1chl
It is a "known problem"... apparently in the "new BGP" there is no counter of the number of received prefixes anymore in a peer connection, and it is only possible to retrieve this information using a search on the routing table.
This can be done using a script.
But I agree it is not convenient... I always have a "BGP Peers" window open in winbox on my central routers and the "prefix count" is a nice quick indicator to know if everything is OK further down the network.
Unfortunately, the "BGP Sessions" window in v7 is by far not as useful for this purpose, not only because it does not show the prefix count, but also because it does not show the peer name and it does not auto-update, you need to refresh it using F5 to see the current status.
Hopefully something will be done about it, but personally I fear that after some revisions the "prefix count" field will just disappear.
Re: BGP prefix count in ROS 7.1 stable
Posted: Fri Mar 04, 2022 1:29 pm
by Splash
I think it is also related to the fact the BGP service was re-written by Mikrotik for version 7 and there was an oversight or they ran out of time?
I know of no other BGP service that does not report on prefixes sent, received, rejected, etc. I had hoped V7 BGP would be a big jump forward in both performance but also get us closer to more mainstream BGP implementations.....
Re: BGP prefix count in ROS 7.1 stable
Posted: Fri Mar 04, 2022 1:56 pm
by pe1chl
Yes of course it is because they started their own BGP service... and it isn't finished.
But also I think they now clearly split the function of the BGP service and the route filtering/FIB.
In the new RouterOS, filtered routes still appear in the routing table, but with the status "filtered" and never becoming active.
So the BGP service does not really know how many prefixes it has accepted, that is handled further down the line.
Therefore it is not so easy to show a counter without asking back to the routing engine how many of the received prefixes it really has accepted, which of course is an "expensive" operation.
Re: BGP prefix count in ROS 7.1 stable
Posted: Thu Mar 17, 2022 10:47 pm
by gammy69er
I think it is also related to the fact the BGP service was re-written by Mikrotik for version 7 and there was an oversight or they ran out of time?
I like that - ran out of time... I started in the industry just after v6 came out - and they have been promising v7 since then... they have had plenty of time.
Besides - why not just continue to push out the release if things don't work - and then make them work...
Am really not trying to deminish what has been achieved. v7 has been fantastic to build with and learn - but if still so many bugs - should not be in release as far as I am concerned.
I stupidly presumed that since it was release - i'd be able to bring my production up to it. I am over a month in now - and just about ready for production but keep popping up with problems like this. Our current stack is dying - so need something to happen, but not sure if i should push on, or drop back.
At this stage - less a couple of annoyances, everything seems to be running well enough. I also have been building with v6 SxS for half the stack - so can easily keep that - or re adapt the setting from there to revert if need be - but for the mo - won't be going full v7... just in case.
Re: BGP prefix count in ROS 7.1 stable
Posted: Fri Mar 18, 2022 4:23 am
by buset1974
you're not alone mate.
Re: BGP prefix count in ROS 7.1 stable
Posted: Tue Mar 22, 2022 4:59 pm
by volkirik
Be aware that the default action of the routing filter chain is "reject"
further reading =
https://help.mikrotik.com/docs/pages/vi ... d=74678285
Re: BGP prefix count in ROS 7.1 stable
Posted: Sun Dec 04, 2022 10:51 am
by etdijarwanto
need update, ros 7.6
Re: BGP prefix count in ROS 7.1 stable
Posted: Sun Dec 04, 2022 12:20 pm
by captainproton
This seems like an easy to fix bug and though is still here from v7.1 through 7.6 ?!?
Re: BGP prefix count in ROS 7.1 stable
Posted: Sun Dec 04, 2022 1:23 pm
by pe1chl
This seems like an easy to fix bug
It is not. See reply #6 and #8.
Re: BGP prefix count in ROS 7.1 stable
Posted: Wed Dec 21, 2022 1:33 am
by Crami
It would be relay nice to see the number of received prefixes. Even if it does not consider if they get filtered further down the line. Just how many are received by that peer.
Re: BGP prefix count in ROS 7.1 stable
Posted: Wed Dec 21, 2022 11:01 am
by pe1chl
Yes that would at least be a start... in our network, the filters usually do not really remove routes, they are only a safeguard. And so the count would be fine.
Also, the "you can use a script to retrieve the count" is not easy at all due to another bug:
/routing/route/print count-only correctly prints the total number of routes
/routing/route/print where belongs-to="bgp-IP-xx.xx.xx.xx" and !filtered prints routes from specific neighbors
however the combination /routing/route/print count-only where belongs-to="bgp-IP-xx.xx.xx.xx" and !filtered always prints 0.
It has been admitted by support and noted as something to be fixed in the future, but hey there are many such small and larger issues in BGP and they are present and promised to be fixed for well over a year now... so I don't hold my breath.
Re: BGP prefix count in ROS 7.1 stable
Posted: Mon Mar 27, 2023 7:28 pm
by jayd2k
Yes that would at least be a start... in our network, the filters usually do not really remove routes, they are only a safeguard. And so the count would be fine.
Also, the "you can use a script to retrieve the count" is not easy at all due to another bug:
/routing/route/print count-only correctly prints the total number of routes
/routing/route/print where belongs-to="bgp-IP-xx.xx.xx.xx" and !filtered prints routes from specific neighbors
however the combination /routing/route/print count-only where belongs-to="bgp-IP-xx.xx.xx.xx" and !filtered always prints 0.
It has been admitted by support and noted as something to be fixed in the future, but hey there are many such small and larger issues in BGP and they are present and promised to be fixed for well over a year now... so I don't hold my breath.
Try the following:
/routing/route/print where bgp and belongs-to~"10.1.254.2" and !filtered
Flags: A - ACTIVE; b, a - SLAAC
Columns: DST-ADDRESS, GATEWAY, AFI, DISTANCE, SCOPE, TARGET-SCOPE, IMMEDIATE-GW
DST-ADDRESS GATEWAY AFI DISTANCE SCOPE TARGET-SCOPE IMMEDIATE-GW
b 10.1.254.0/30 10.1.254.2 ip4 20 40 10 10.1.254.2%ether2
Ab 10.100.0.0/24 10.1.254.2 ip4 20 40 10 10.1.254.2%ether2
Ab 10.100.1.0/24 10.1.254.2 ip4 20 40 10 10.1.254.2%ether2
And to get just the count:
/routing/route/print count-only where bgp and belongs-to~"10.1.254.2" and !filtered
3
Re: BGP prefix count in ROS 7.1 stable
Posted: Mon Mar 27, 2023 8:14 pm
by pe1chl
The postings above reflect the situation as it existed at that time. By now, the bug with count-only has been fixed so they are not all relevant anymore.
However, there still exist several bugs/problems. For example, I created this script to print the number of received routes for each neighbor:
/system script
add dont-require-permissions=no name=bgp-prefixes owner=admin policy=read \
source="/routing/bgp/session {\r\
\n :global prefixes ({});\r\
\n :local maxlen 0;\r\
\n :foreach ses in=[find] do={\r\
\n :set \$remote [get \$ses \"remote.address\"]\r\
\n :set \$name [get \$ses name]\r\
\n :if ([:len \$name] > \$maxlen) do={\r\
\n :set \$maxlen [:len \$name]\r\
\n }\r\
\n :set (\$prefixes->\$name) [/routing/route/print count-only where belongs-to=\"bgp-IP-\$remote\"]\r\
\n }\r\
\n :set \$name \"Session \"\r\
\n :set \$name [:pick \$name 0 \$maxlen]\r\
\n :put \"\"\r\
\n :put \"\$name : Prefixes\"\r\
\n :put \"---------------------------\"\r\
\n :foreach name,prefix in=\$prefixes do={\r\
\n :set \$name (\$name.\" \")\r\
\n :set \$name [:pick \$name 0 \$maxlen]\r\
\n :put \"\$name : \$prefix\"\r\
\n }\r\
\n}\r\
\n"
However, it does not work very nicely because the
[/routing/route/print count-only where belongs-to="bgp-IP-$remote"] construct, which now correctly retrieves the number of routes, also outputs to the terminal instead of setting only the variable. This is a generic scripting bug, not specific to this situation. Of course when [...] is used to get a value and then assign it to a variable, it should not be printed. Support says they will be reworking the scripting to resolve this, and it appears that part of that is now being done in 7.9beta.
Re: BGP prefix count in ROS 7.1 stable
Posted: Sat Apr 01, 2023 12:32 am
by mobilexpi
Does anyone know if Mikrotik has plans to fix this? I'm in v7.8 and still appears 0 prefix as received. How can you see all the prefixes being received by one BGP session?
Thanks,
Re: BGP prefix count in ROS 7.1 stable
Posted: Sat Apr 01, 2023 3:37 am
by maxrate
+1 for fixing the prefix counter!
Re: BGP prefix count in ROS 7.1 stable
Posted: Sat Apr 01, 2023 10:09 am
by pe1chl
Does anyone know if Mikrotik has plans to fix this?
I don't think it will be fixed. Probably the prefix count field will just disappear.
See the script above for a workaround.
Re: BGP prefix count in ROS 7.1 stable
Posted: Sat May 06, 2023 10:50 pm
by pLastUn
I constantly need to see the prefix count coming from different router servers on different IXs.
I will not upgrade to ROS 7 until this works!
Re: BGP prefix count in ROS 7.1 stable
Posted: Sun May 19, 2024 7:01 am
by etdijarwanto
prefix count works in version 7.13 stable.
looking at the stable release changelog, maybe prefix count will start working in version 7.10 stable
*) bgp - show approximate received prefix count by the session;
Re: BGP prefix count in ROS 7.1 stable
Posted: Sun May 19, 2024 11:39 am
by pe1chl
Yes, but it is not updated on the screen even when you press F5 for refresh (you need to toggle to another tab and back), and it does not reflect the number of accepted prefixes, only the (approximate) number of prefixes the other side sends. So, before filtering.
So it is not as useful as it was in v6.
Re: BGP prefix count in ROS 7.1 stable
Posted: Tue Oct 01, 2024 8:07 am
by markwien
Please make prefix auto refresh as ist was in ros6
Re: BGP prefix count in ROS 7.1 stable
Posted: Tue Oct 01, 2024 10:50 am
by pe1chl
Support personnel told me it wasn't possible in Winbox 3.x (suprises me...), and it would have to wait until a new Winbox is developed.
But now that there is a beta of Winbox 4, it still doesn't work!