cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
16983
Views
15
Helpful
11
Replies

Display bgp routes filtered on Route Target

pbelletty
Level 1
Level 1

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

1 Accepted Solution

Accepted Solutions

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

Best Regards Please rate all helpful posts and close solved questions

View solution in original post

11 Replies 11

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


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Sindhu_kumar
Level 1
Level 1

R1#sh ip bgp vpnv4 vrf XXX ?

  A.B.C.D            IP prefix /, e.g., 35.0.0.0/8

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#

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

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

Best Regards Please rate all helpful posts and close solved questions

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?

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

Best Regards Please rate all helpful posts and close solved questions

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 permit rt

Next you use the extcommunity-list in the show command

    sh ip bgp vpnv4 vrf extcommunity

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

 

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.

Amalfy Vargas López

Hi,

 

Try "show bgp vpnv4 unicast all extcommunity-list <extended-community-list>" instead. This should solve your problem.

 

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Hemant Sharma
Level 1
Level 1

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

Review Cisco Networking for a $25 gift card