Routing

 View Only
last person joined: 2 days ago 

Ask questions and share experiences about ACX Series, CTP Series, MX Series, PTX Series, SSR Series, JRR Series, and all things routing, including portfolios and protocols.
  • 1.  Any quick way to find the bgp prefixes blocked by either import or export policy?

    Posted 12-10-2020 22:08
    When I did a bgp lab, one prefix was dropped by the export policy. It took some time for me to find it out.  What is the quick way to find out the policy blocks import or export?

    thanks !!


  • 2.  RE: Any quick way to find the bgp prefixes blocked by either import or export policy?

     
    Posted 12-11-2020 04:45
    Checking if you accept an incoming prefix:
    show route receive-protocol bgp <peer address>

    Checking if you deny an incoming prefix:
    show route receive-protocol bgp <peer address> hidden

    Checking if you advertise a prefix:
    show route advertising-protocol bgp <peer address>

    ------------------------------
    ------------------------------
    If my answer provides the solution, please mark my post as "Accepted Solution".
    If you think my answer helps, please spend some Kudos
    ------------------------------



  • 3.  RE: Any quick way to find the bgp prefixes blocked by either import or export policy?

    Posted 12-11-2020 08:54
    thanks !!


  • 4.  RE: Any quick way to find the bgp prefixes blocked by either import or export policy?

    Posted 12-11-2020 05:05
    BGP has three tables, among them 'adj-rib-in' and 'adj-rib-out' tables which store prefixes before policy is applied to the routes received from a peer (in) and prefixes after the policies are applied to the peer (out).

    In this case, to check the prefixes, you would need to add the hidden keyword in the show route receive-protocol bgp <peer> hidden for inbound check, you will be able to see the reason as to why the prefix is being filtered (due to inbound policy), and show route advertising-protocol bgp <peer> hidden for outbound check of policy applied.

    Regards,

    Elvin


  • 5.  RE: Any quick way to find the bgp prefixes blocked by either import or export policy?

    Posted 12-11-2020 08:53
    thanks !

    I did check the bgp  table to see the prefix is valid. I show route advertising-protocol bgp peer and did not see it was advertised.  It was not hidden. I show route x.x.x.x extensive and it seems fine to me.  eventually I checked the policy to find it was rejected by reject statement.

    I am wondering any quick way to find which policy statement blocks the prefix exports if I have a long and complicated policy statements.  something like show route hidden extensive will explicitly tell the next-hop unreachable.

    Just curious.


  • 6.  RE: Any quick way to find the bgp prefixes blocked by either import or export policy?
    Best Answer

    Posted 12-11-2020 11:56
    Is hard to know which statements block which prefix, is an 'eye test' mostly, there is a 'test policy <POLICY> <PREFIX>' statement.

    Regards,

    Elvin




  • 7.  RE: Any quick way to find the bgp prefixes blocked by either import or export policy?

    Posted 12-11-2020 12:07
    Thanks a lot !!

    This is a great command.


  • 8.  RE: Any quick way to find the bgp prefixes blocked by either import or export policy?

    Posted 12-11-2020 12:10
    Glad to know it helped.

    Regards,

    Elvin

    ------------------------------
    Elvin
    ------------------------------