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
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
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.
you are correct. Add-on: to see results after import policies processing use "show route".
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?
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 routeRIB-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-RIBAdjacency-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
how to you view the received routes if you are using a routing instance?
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 184.108.40.206
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
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 220.127.116.11
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]