cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3665
Views
5
Helpful
6
Replies

BGP VPNV4 Routes in XR

Anuj Singhi
Level 1
Level 1

Hi,

Is there any way to filter out routes based on route-target in XR platform? If i want to find out routes specific to RT 1:1 in a vrf or in complete bgp vpnv4 table, how can I do that through show commands?

 

If there is no specific command for RT, can regexp can be used for filtering?

 

Regards,

Anuj

1 Accepted Solution

Accepted Solutions

that is possibly too!
say you have a route-policy defined like this:

route-policy RTshow
if extcommunity rt (x:y) then
pass
endif

you can do show bgp vrf RED route-policy RTshow
xander

View solution in original post

6 Replies 6

smilstea
Cisco Employee
Cisco Employee

The VPNv4 table is divided by RD, not RT. You can filter either on RD or VRF.

 

Edit: Forgot to mention the CLI.

show bgp vpnv4 unicast rd <rd>

show bgp vpnv4 unicast vrf <vrf>

 

Sam

Yeah through rd and vrf I can filter but then I will get the complete routing table pertaining to that vrf or rd including all the RT's. Is there any way by which I can find out which routes are getting imported through which RT through single or group of commands?

@xthuijs

you can check the bgp prefix to see what the RD and RT's are, example below.

also you can filter the routes import at the vrf address family level with a route-policy import rule.

xander

 

RP/0/RSP0/CPU0:A9K-BNG#show bgp vrf RED 22.1.1.1/32

Mon Jul 16 12:39:17.766 EDT

BGP routing table entry for 22.1.1.1/32, Route Distinguisher: 10.86.188.99:0

Versions:

  Process           bRIB/RIB  SendTblVer

  Speaker                 18          18

Last Modified: May 14 07:22:21.564 for 9w0d

Paths: (1 available, best #1)

  Not advertised to any peer

  Path #1: Received by speaker 0

  Not advertised to any peer

  Local

    131.1.1.2 from 131.1.1.2 (2.2.2.2)

      Received Label 24002

      Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, import-candidate, imported

      Received Path ID 0, Local Path ID 0, version 18

      Extended community: RT:10:10 RT:100:100

      Source AFI: VPNv4 Unicast, Source VRF: default, Source Route Distinguisher: 2.2.2.2:0

so that means there is no way I can find out routes related to one RT, for example

 

show bgp vpnv4 unicast vrf RED <RT>

 

something like that.

I have seen the option to use regular expression in order to see the routes coming from any particular AS but there is nothing for RT's.

that is possibly too!
say you have a route-policy defined like this:

route-policy RTshow
if extcommunity rt (x:y) then
pass
endif

you can do show bgp vrf RED route-policy RTshow
xander

Thanks Xander,

 

As always you are of great help..!!

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: