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

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 …

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.

I guess what you are looking for is something like “routes received” from bgp-peer.

If you query the routing table as in your example you probably will not see the route-server which is delivering the routes but is usually not the next-hop for those routes.

afaik neither anything like cisco style “sh bgp ipv6 unicast neighbors routes” nor “sh bgp ipv6 unicast neighbors received-routes” or juniper-style “show route receive-protocol bgp ” is available in ROSv7, but I’m happy to learn any time that I’m wrong as we also miss this feature for a sane bgp deployments using ROSv7.