Community discussions

MikroTik App
 
gullio23
Trainer
Trainer
Topic Author
Posts: 24
Joined: Fri Dec 02, 2011 1:30 pm

BGP prefix count in ROS 7.1 stable

Wed Jan 05, 2022 2:12 pm

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
 
rootsh
just joined
Posts: 1
Joined: Tue Jan 25, 2022 11:22 pm

Re: BGP prefix count in ROS 7.1 stable

Tue Jan 25, 2022 11:29 pm

Hi, i have the same problem, i see "0" in "prefix count" column.
Screenshot_8.png
You do not have the required permissions to view the files attached to this post.
 
User avatar
Splash
Member Candidate
Member Candidate
Posts: 206
Joined: Fri Oct 16, 2015 10:09 am
Location: Johannesburg, South Africa

Re: BGP prefix count in ROS 7.1 stable

Fri Feb 18, 2022 7:15 pm

This is still an issue for me on version 7.1.2.

Please fix :)
 
formi
just joined
Posts: 1
Joined: Fri Feb 25, 2022 7:07 pm

Re: BGP prefix count in ROS 7.1 stable

Fri Feb 25, 2022 7:10 pm

Still an issue in 7.1.3 :(
 
User avatar
Splash
Member Candidate
Member Candidate
Posts: 206
Joined: Fri Oct 16, 2015 10:09 am
Location: Johannesburg, South Africa

Re: BGP prefix count in ROS 7.1 stable

Fri Mar 04, 2022 9:50 am

This sucks :)
 
pe1chl
Forum Guru
Forum Guru
Posts: 10183
Joined: Mon Jun 08, 2015 12:09 pm

Re: BGP prefix count in ROS 7.1 stable

Fri Mar 04, 2022 11:49 am

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.
 
User avatar
Splash
Member Candidate
Member Candidate
Posts: 206
Joined: Fri Oct 16, 2015 10:09 am
Location: Johannesburg, South Africa

Re: BGP prefix count in ROS 7.1 stable

Fri Mar 04, 2022 1:29 pm

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.....
 
pe1chl
Forum Guru
Forum Guru
Posts: 10183
Joined: Mon Jun 08, 2015 12:09 pm

Re: BGP prefix count in ROS 7.1 stable

Fri Mar 04, 2022 1:56 pm

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.
 
gammy69er
Frequent Visitor
Frequent Visitor
Posts: 79
Joined: Sun May 18, 2014 3:01 am

Re: BGP prefix count in ROS 7.1 stable

Thu Mar 17, 2022 10:47 pm

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.
 
buset1974
Frequent Visitor
Frequent Visitor
Posts: 86
Joined: Wed Sep 13, 2006 12:12 pm
Location: Jakarta

Re: BGP prefix count in ROS 7.1 stable

Fri Mar 18, 2022 4:23 am

you're not alone mate.
 
volkirik
Member Candidate
Member Candidate
Posts: 208
Joined: Sat Jul 23, 2016 2:03 pm

Re: BGP prefix count in ROS 7.1 stable

Tue Mar 22, 2022 4:59 pm

Be aware that the default action of the routing filter chain is "reject"

further reading = https://help.mikrotik.com/docs/pages/vi ... d=74678285
 
User avatar
etdijarwanto
just joined
Posts: 7
Joined: Fri Jan 26, 2018 3:34 am
Location: Indonesia

Re: BGP prefix count in ROS 7.1 stable

Sun Dec 04, 2022 10:51 am

need update, ros 7.6
 
captainproton
Frequent Visitor
Frequent Visitor
Posts: 72
Joined: Sat Jan 12, 2008 3:01 pm

Re: BGP prefix count in ROS 7.1 stable

Sun Dec 04, 2022 12:20 pm

This seems like an easy to fix bug and though is still here from v7.1 through 7.6 ?!?

:?
 
pe1chl
Forum Guru
Forum Guru
Posts: 10183
Joined: Mon Jun 08, 2015 12:09 pm

Re: BGP prefix count in ROS 7.1 stable

Sun Dec 04, 2022 1:23 pm

This seems like an easy to fix bug
It is not. See reply #6 and #8.
 
User avatar
Crami
newbie
Posts: 28
Joined: Wed Apr 24, 2013 4:07 pm
Location: Zürich, Switzerland
Contact:

Re: BGP prefix count in ROS 7.1 stable

Wed Dec 21, 2022 1:33 am

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.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10183
Joined: Mon Jun 08, 2015 12:09 pm

Re: BGP prefix count in ROS 7.1 stable

Wed Dec 21, 2022 11:01 am

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.
 
User avatar
jayd2k
newbie
Posts: 48
Joined: Tue Sep 10, 2013 6:46 am

Re: BGP prefix count in ROS 7.1 stable

Mon Mar 27, 2023 7:28 pm

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
 
pe1chl
Forum Guru
Forum Guru
Posts: 10183
Joined: Mon Jun 08, 2015 12:09 pm

Re: BGP prefix count in ROS 7.1 stable

Mon Mar 27, 2023 8:14 pm

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.
 
mobilexpi
Member Candidate
Member Candidate
Posts: 115
Joined: Thu May 26, 2005 5:24 am
Location: Santiago

Re: BGP prefix count in ROS 7.1 stable

Sat Apr 01, 2023 12:32 am

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,
 
User avatar
maxrate
Frequent Visitor
Frequent Visitor
Posts: 94
Joined: Mon Oct 23, 2006 10:55 pm
Location: Toronto

Re: BGP prefix count in ROS 7.1 stable

Sat Apr 01, 2023 3:37 am

+1 for fixing the prefix counter!
 
pe1chl
Forum Guru
Forum Guru
Posts: 10183
Joined: Mon Jun 08, 2015 12:09 pm

Re: BGP prefix count in ROS 7.1 stable

Sat Apr 01, 2023 10:09 am

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.
 
pLastUn
just joined
Posts: 1
Joined: Sat May 06, 2023 10:33 pm

Re: BGP prefix count in ROS 7.1 stable

Sat May 06, 2023 10:50 pm

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!

Who is online

Users browsing this forum: No registered users and 24 guests