05-07-2013 07:31 AM - edited 03-04-2019 07:50 PM
Hi
Hope you can help.
Is there a show command that will display the bgp routes in a vrf filtered on a specific route target?
Phil
Solved! Go to Solution.
05-08-2013 02:57 AM
Hello,
This command produces the same output as sh ip bgp vpnv4 vrf.
That is correct behaviour.
You can try to match BGP routes based on communities:
#sh ip bgp vpnv4 vrf vpn1 ?
community Display routes matching the communities
community-list Display routes matching the community-list
extcommunity-list Display routes matching the extcommunity-list
Best Regards
Please rate all helpful posts and close solved questions
05-07-2013 09:59 AM
Hello
Sh ip bgp vpnv4 all
Sh ip bgp vpnv4 rd
Sh ip bgp vpnv4 vrf xx
show ip bgp vpnv4 vrf xx neighbours xxreceived-routes
http://www.cisco.com/en/US/docs/ios/iproute_bgp/command/reference/irg_bgp5.html#wp1163912
Res
Paul
Sent from Cisco Technical Support iPad App
05-07-2013 11:27 AM
R1#sh ip bgp vpnv4 vrf XXX ?
A.B.C.D IP prefix
A.B.C.D Network in the BGP routing table to display
R1#sh ip bgp vpnv4 vrf BGP_VRF 50.50.50.50 (Target Route)
BGP routing table entry for 1:1:50.50.50.50/32, version 3
Paths: (1 available, best #1, table BGP_VRF)
Flag: 0x820
Not advertised to any peer
Local
192.168.30.5 from 192.168.30.5 (50.50.50.50)
Origin IGP, metric 0, localpref 100, valid, internal, best,
mpls labels in/out 16/nolabel
R1#
05-07-2013 02:27 PM
Hi
Thanks for the replies. Afraid the replies do not answer the question.
I have a vrf that is importing routes from two route targets.
What I want to know is the routes that have been imported by one of the route targets when I look on the PE.
Any idea?
Phil
05-07-2013 03:04 PM
Hello,
I assume that for each VRF you are using unique RD, so you can filter routes based on RD ->
#sh ip bgp vpnv4 rd ?
ASN:nn or IP-address:nn VPN Route Distinguisher
Best Regards
Please rate all helpful posts and close solved questions
05-07-2013 11:06 PM
Thanks for the reply
There are unique RDs on the PE but it is not possible to filter based on the RT using the command sh ip bpg vpnv4 rd. This command produces the same output as sh ip bgp vpnv4 vrf.
Any other ideas?
05-08-2013 02:57 AM
Hello,
This command produces the same output as sh ip bgp vpnv4 vrf.
That is correct behaviour.
You can try to match BGP routes based on communities:
#sh ip bgp vpnv4 vrf vpn1 ?
community Display routes matching the communities
community-list Display routes matching the community-list
extcommunity-list Display routes matching the extcommunity-list
Best Regards
Please rate all helpful posts and close solved questions
05-08-2013 11:02 PM
Hi
Thanks for the reply.
Managed to get this to work.
To do this you first need to define an extcommunity-list
ip extcommunity-list standard
Next you use the extcommunity-list in the show command
sh ip bgp vpnv4 vrf
08-11-2015 07:33 AM
Hi,
Was you able to use that command?
I have a VRF which receive routes with several RT and I need to separate them to find which route is from what RT and when I do this:
ip extcommunity-list standard NAME1 permit rt xxxx:YYYYYY
and then this
sh ip bgp vpnv4 vrf VRFname extcommunity NAME1
I get % Unknown VRF
But if I use sh ip bgp vpnv4 vrf VRFname I get all routs for that VRF.
I´m trying in Cisco 7600 and 10000 and I get the same.
What could be wrong?
Thank you
11-21-2017 01:47 PM - edited 11-21-2017 01:48 PM
Hello,
I was also looking for the response to this but I think that based on the question, this answer is wrong. Yes, you could view the routes that run through a vrf if you know what's the name of the vrf that relates to that route in question (which defeats the question). What I wanted to know is, how can I view the routes that are being imported/exported through a route-target. Remember, I can ask a multi-vrf router about it's routes based on vrf, if the vrf is on that router, but if the router receives the route through a route-target and the vrf is not on the router..., then how can I know which routes are being distributed via x route-target.
Thanks in advance and I don't mean to poop on the answer for it is valid, if the vrf is on the router in question, if not.., ten it is wrong.
11-21-2017 04:45 PM - edited 11-21-2017 04:46 PM
Hi,
Try "show bgp vpnv4 unicast all extcommunity-list <extended-community-list>" instead. This should solve your problem.
Regards,
01-28-2019 01:02 PM - edited 01-28-2019 01:18 PM
Hi,
There is no direct command but there is a trick.
Instead of configuring the import route-target, apply a route-target import policy and then check the routes based on that policy.
In your case, multiple import polices, one for each RT would do.
#show bgp vrf <vrf-name> route-policy <import route-target policy-name>
Regards,
Hemant
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide