Community discussions

MikroTik App
 
markwien
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 75
Joined: Sun Jul 22, 2018 10:49 am

how can i get routes learned from a bgp peer to a file

Mon Jun 09, 2025 11:36 am

hi
how can i do ipv6/route/print where gateway=2001:7f8:XXXXXXXXXXX

and extract the learned prefixes to a file to compare?

i have a rootserver peering flapping and need to find out what peers are flapping over the rootserver so i can disable them ...
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7216
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: how can i get routes learned from a bgp peer to a file

Mon Jun 09, 2025 11:44 am

use "file" parameter
 
markwien
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 75
Joined: Sun Jul 22, 2018 10:49 am

Re: how can i get routes learned from a bgp peer to a file

Mon Jun 09, 2025 12:02 pm

use "file" parameter
/ipv6/route/print where gateway=2001:xxxx file=gw6939-routes

dosnt work it shows the data in print ...

i also tried

ssh admin@router '/routing/route/print detail without-paging where protocol=bgp and afi=ip6 and gateway=2001:7f8:XXX output=json' > ipv6_routes.json



ok this works:

/ipv6/route> print file=test.txt where gateway=2001:7f8:3XXXXX

but wired thing in the gateway of the routeserver it shows no output - when i test with other peers it gives output ....
i can see routes on rootserver peers ...

gateway of rootserver is pingable and reachable.