I'm working in a complex BGP environment on Juniper MX480s. We have many peers in various routing instances advertising prefixes to us, and then we advertise a subset of those prefixes to a subset of the other peers. There are various import and export policies controlling our advertisements.

Is there an easy way to see all the peers to whom we are advertising a given network, say

I know I can use show route advertising-protocol bgp [peer] for each individual peer, but I'd like to check them all in one go.

  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer.
    – Ron Maupin
    Dec 25, 2018 at 10:03

1 Answer 1


I'm not aware of any JunOS command to achieve this. Judging by your problem description I guess that you have per peer export policies, not just a few policies, one per peer group.

If the list of peers is large enough, I'd consider scripting something using Juniper's python libraries or just by screen scraping SSH output.

  • Yeah, if I have to do it more than once or twice, I'm going to use PyEZ to find all peers and loop through them to get advertised routes. I was just hoping to get it done quick and easy.
    – Jacktose
    Nov 21, 2018 at 0:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.