Community discussions

MikroTik App
 
SwissWISP
Member Candidate
Member Candidate
Topic Author
Posts: 186
Joined: Fri Sep 23, 2011 12:16 pm

BGP - Prefix Count

Mon Jul 03, 2023 3:58 pm

Hi all

I stumbled across something that looks like a bug to me.
When prefixes get removed from an already running session, "Prefix Count" shows a value of around 4,294,967,295 (32-bit unsigned integer?) and stays in this area until the session gets restarted.
As you can see in the image below, the number of prefixes in the routing table looks plausible though.
prefix.png
In this scenario, the first two sessions should show a prefix count of maybe 0 - 10.

Is this a known bug?

Edit:
After the two sessions got restartet it looks like this:
prefix2.png
ROS Version: 7.11beta2

- Mat
You do not have the required permissions to view the files attached to this post.
 
angoran
just joined
Posts: 14
Joined: Sat Feb 21, 2015 12:16 pm
Contact:

Re: BGP - Prefix Count

Tue Oct 10, 2023 1:09 am

Hello Mat
I have exactly the same problem with version 7.11.2
I'm a bit disappointed that Mikrotik hasn't replied to you since June 2023, It's inconceivable to me...
Regards.
Capture d’écran 2023-10-10 à 00.08.10.png
You do not have the required permissions to view the files attached to this post.
 
SwissWISP
Member Candidate
Member Candidate
Topic Author
Posts: 186
Joined: Fri Sep 23, 2011 12:16 pm

Re: BGP - Prefix Count

Tue Oct 10, 2023 8:29 am

Hi Angoran

yes it's a bit disappointing that I didn't get a reply. I mean a simple "yes it's a known bug, we're working on it", would have been better than what I've got.
Sure it seems to be a minor bug, but on the other hand it's quite annoying to administer a system that shows such impossible values.

- Mat
 
savage
Forum Guru
Forum Guru
Posts: 1264
Joined: Mon Oct 18, 2004 12:07 am
Location: Cape Town, South Africa
Contact:

Re: BGP - Prefix Count

Tue Oct 10, 2023 1:40 pm

Same story here.

Also find it amusing that you still have to revert to looking at packet dumps, to see what is actually advertised too.

ROSv7 feels like a pet project that got started and just never got finished. Def. not prod ready IMHO.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10248
Joined: Mon Jun 08, 2015 12:09 pm

Re: BGP - Prefix Count

Tue Oct 10, 2023 2:17 pm

Hello Mat
I have exactly the same problem with version 7.11.2
I'm a bit disappointed that Mikrotik hasn't replied to you since June 2023, It's inconceivable to me...
Well, this forum is mainly for inter-user communication. When you want a reply from support and/or some chance your topic gets put on an action list, it is better to create a ticket in the support portal: https://help.mikrotik.com/servicedesk/servicedesk/
 
angoran
just joined
Posts: 14
Joined: Sat Feb 21, 2015 12:16 pm
Contact:

Re: BGP - Prefix Count

Wed Oct 11, 2023 1:28 am

Good evening pe1chl,
I wrote to support and they had the same attitude, no reply, no consideration.
All the best.
 
User avatar
spippan
Member
Member
Posts: 334
Joined: Wed Nov 12, 2014 1:00 pm
Location: Austria

Re: BGP - Prefix Count

Wed Oct 11, 2023 1:34 am

overall on v7 BGP development/improvement is a bit stalled at MT
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7056
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: BGP - Prefix Count

Wed Oct 11, 2023 11:02 am

This problem should be already fixed in v7.12
 
pe1chl
Forum Guru
Forum Guru
Posts: 10248
Joined: Mon Jun 08, 2015 12:09 pm

Re: BGP - Prefix Count

Wed Oct 11, 2023 11:12 am

Maybe you can use this script to show you prefix counts on commandline:
/system script
add comment="print BGP prefix count" dont-require-permissions=no name=\
    bgp-prefixes owner=admin policy=read source="/routing/bgp/session {\r\
    \n   :global prefixes ({});\r\
    \n   :global active ({});\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 \
    !filtered and belongs-to=\"bgp-IP-\$remote\"]\r\
    \n      :set (\$active->\$name) [/routing/route/print count-only  where ac\
    tive and 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 Active\"\r\
    \n   :put \"----------------------------------\"\r\
    \n   :foreach name,prefix in=\$prefixes do={\r\
    \n      :set \$act (\$active->\$name)\r\
    \n      :set \$name (\$name.\"                              \")\r\
    \n      :set \$name [:pick \$name 0 \$maxlen]\r\
    \n      :set \$prefix (\$prefix.\"          \")\r\
    \n      :set \$prefix [:pick \$prefix 0 8]\r\
    \n      :put \"\$name : \$prefix \$act\"\r\
    \n   }\r\
    \n}\r\
    \n"
Use /system/script/run bgp-prefixes to show the current number of prefixes for each peer, both received and active.
It first prints a couple of lines with only numbers, ignore that (it is due to the strange design of scripting language).
After that it prints a header and a line for each peer.
 
angoran
just joined
Posts: 14
Joined: Sat Feb 21, 2015 12:16 pm
Contact:

Re: BGP - Prefix Count

Wed Oct 11, 2023 1:07 pm

Maybe you can use this script to show you prefix counts on commandline:
/system script
add comment="print BGP prefix count" dont-require-permissions=no name=\
    bgp-prefixes owner=admin policy=read source="/routing/bgp/session {\r\
    \n   :global prefixes ({});\r\
    \n   :global active ({});\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 \
    !filtered and belongs-to=\"bgp-IP-\$remote\"]\r\
    \n      :set (\$active->\$name) [/routing/route/print count-only  where ac\
    tive and 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 Active\"\r\
    \n   :put \"----------------------------------\"\r\
    \n   :foreach name,prefix in=\$prefixes do={\r\
    \n      :set \$act (\$active->\$name)\r\
    \n      :set \$name (\$name.\"                              \")\r\
    \n      :set \$name [:pick \$name 0 \$maxlen]\r\
    \n      :set \$prefix (\$prefix.\"          \")\r\
    \n      :set \$prefix [:pick \$prefix 0 8]\r\
    \n      :put \"\$name : \$prefix \$act\"\r\
    \n   }\r\
    \n}\r\
    \n"
Use /system/script/run bgp-prefixes to show the current number of prefixes for each peer, both received and active.
It first prints a couple of lines with only numbers, ignore that (it is due to the strange design of scripting language).
After that it prints a header and a line for each peer.
Hello pe1chl,
I tested your script and it works.
Thanks a lot!

Who is online

Users browsing this forum: No registered users and 3 guests