Junos OS

Expand all | Collapse all

How do you check for BGP advertised and received routes in JUNOS

Jump to Best Answer
  • 1.  How do you check for BGP advertised and received routes in JUNOS

    Posted 12-08-2009 05:03

    Does anyone know how to check BGP's advertised and received routes in JUNOS for a BGP neighbor?  I cannot figure it out in JUNOS.   In Cisco IOS it is simple:

     

    show ip bgp neighbor 10.1.1.1 advertised-routes

    show ip bgp neighbor 10.1.1.1 received-routes

     

    Thank you.



  • 2.  RE: How do you check for BGP advertised and received routes in JUNOS
    Best Answer

    Posted 12-08-2009 06:10

    Entering a question mark (?) at the JUNOS prompt allows you to obtain a list of commands available 🙂

     

    IOS# show ip bgp neighbor 10.1.1.1 advertised-routes

    JUNOS> show route advertising-protocol bgp 10.1.1.1

     

    IOS# show ip bgp neighbor 10.1.1.1 received-routes

    JUNOS# show route receive-protocol bgp 10.1.1.1



  • 3.  RE: How do you check for BGP advertised and received routes in JUNOS

    Posted 12-08-2009 06:41

    Thank you!Smiley Happy



  • 4.  RE: How do you check for BGP advertised and received routes in JUNOS

    Posted 12-11-2009 08:27

    Please correct me if I'm wrong (cause my memory is a little murky)...

     

    But doesn't the "show route advertise-protocol bgp" command show results AFTER export policies have been applied while "show route receive-protocol bgp" shows results BEFORE import policies have been applied? I could be offbase but I thought that was the case.



  • 5.  RE: How do you check for BGP advertised and received routes in JUNOS

    Posted 12-11-2009 08:30

    Hi,

     

    you are correct. Add-on: to see results after import policies processing use "show route".

     

    Kind Regards

    Michael Pergament



  • 6.  RE: How do you check for BGP advertised and received routes in JUNOS

    Posted 12-17-2014 15:54

    I'm not sure question from OP was fully answered if i'm reading the thread correctly?.

     

    its almost becoming confused around the question of bgp table vs routing table, where routes in bgp table are *not* automatically promoted and entered into rt, but remain eledgible unless explicity denied by policy filter.

     

    have i just confused the issue?



  • 7.  RE: How do you check for BGP advertised and received routes in JUNOS

    Posted 12-18-2014 22:06

    Yes, the question from teh OP was clearly and completely answered in the accepted solution. Here is some additional information to your query.

    Adjacency-RIB-IN: Contains all received routes from each peer. The Adjacency-RIB-In tables are the pre-policy tables, meaning that the routes in these tables have not been filtered or modified by routing policies. An Adjacency-RIB-In table is created on the local router for each established BGP peer. All routes received from the peer are placed in the appropriate memory table. There’s one notable exception to this rule: Routes containing an AS Path loop are immediately discarded by the local route
    RIB-LOCAL: Contains routes the local router uses to forward traffic. The Local-RIB tables are the post-policy tables. Even though some vendor may implement 3 different routing table, Junipers implementation use the local inet.0 as the BGP Local-RIB
    Adjacency-RIB-OUT: Contains all advertised routes sent to each peer and are placed in the appropriate memory table. In other words, a BGP router advertises only routes that it is currently using to forward data traffic. By default, all Local-RIB routes are placed in each Adjacency-RIB-O



  • 8.  RE: How do you check for BGP advertised and received routes in JUNOS

    Posted 08-19-2016 17:34

    how to you view the received routes if you are using a routing instance?



  • 9.  RE: How do you check for BGP advertised and received routes in JUNOS

     
    Posted 08-20-2016 07:00

    The show route receive-protocol bgp is based on the ip adddress of the neighbor, so it will not matter what routing instance the BGP peer is configured in to see these routes.  But these are the routes before your import policy is applied so they are the raw routes you get from that neighbor.

     

    show route receive-protocol bgp 1.1.1.1

    When looking at the live routing table then you will need to specifiy the routing instance table name to see which of these routes appear in that routing table.

     

    show route table NAME.inet.0


  • 10.  RE: How do you check for BGP advertised and received routes in JUNOS

    Posted 08-20-2016 13:19

    he does have the flexibility to view the routes per routing instance per neoghbor. Thats a nother cool feature.

    show route table <instance_name.inet.0> receive-protocol bgp 1.1.1.1

     



  • 11.  RE: How do you check for BGP advertised and received routes in JUNOS

    Posted 07-19-2017 08:43

    You need to add "all" at the end to see raw received routes BEFORE filter:

     

    show ip bgp neighbor 10.1.1.1 received-routes all

     

    At least that's the case on JUNOS Software Release [12.3X48-D30.7]