SRTE for Recursive VPN Routes

About SRTE for Recursive VPN Routes

Assume a use case that involves routes in a nondefault VRF that recurse over other routes in the same VRF before recursing over routes in the default VRF. In addition, these routes are signaled over BGP as EVPN Type-5 routes, where the Gateway IP field (GW-IP) in the route specifies the next hop. To support SR traffic engineering for these types of routes, the SRTE for Recursive VPN Routes feature allows the BGP to recursively resolve the route, iteratively find the next route that resolves the next-hop of the current route, until it reaches a route where the next hop is in the default VRF. This route must have the VPN label that is needed for routing, and the next hop being in the default VRF can now be used to select the endpoint for an SRTE policy to steer the traffic.

Thus, the SRTE for Recursive VPN Routes feature allows BGP to request policy from SRTE with GW-IP as the endpoint, wherein, SRTE returns the BSID for the matching policy. However, in default VRF, the BSID may change later if the CO policy is replaced with a better match.

Guidelines and Limitations for Configuring SRTE for Recursive VPN Routes

Beginning with Cisco NX-OS Release 10.3(2)F, the SRTE for Recursive VPN Routes feature is supported.

The guidelines and limitations for this feature are as follows:

  • This feature is supported on Cisco Nexus 9300-EX, 9300-FX, 9300-FX2, 9300-GX, and N9K-C9332D-GX2B platform switches.

  • This feature is only supported for Type 5 EVPN routes that have a Gateway IP as the next-hop. It is not supported for recursive routes in the default VRF.

  • Only IPv4 routes are supported.

  • The routes in the VRF whose next-hop is another route in the same VRF must have a prefix length of 32 bits (a host route).

  • Route leaking or importation of EVPN recursive VPN routes into more than a single IPv4 unicast nondefault VRF is not allowed.

  • Color-only routes are not supported.

  • It is not recommended to have the route injector integrated with one of the traffic bearing leafs in the network.

Configuring SRTE for Recursive VPN Routes

There are various ways to set the gateway IP for EVPN type-5 routes. This section demonstrates one method of setting the gateway IP for EVPN type-5 routes.

Procedure

  Command or Action Purpose

Step 1

configure terminal

Example:

switch# configure terminal
switch(config)#

Enter global configuration mode.

Step 2

router bgp number

Example:

switch(config)# router bgp 100 
switch(config-router)# 

Configure BGP.

Step 3

vrf vrf_name

Example:

switch(config-router)# vrf vrf3
switch(config-router)# 

Applies the route map to the vrf context.

Step 4

address-family ipv4 unicast

Example:

switch(config-router)# address-family ipv4 unicast
switch(config-router)#

Configure address family for IPv4.

Step 5

export-gateway-ip

Example:

switch(config-router)# export-gateway-ip
 switch(config-router)#

Exports and advertises the gateway-ip to reconnect the EVPN type-5 routes.

Note

 
The export gateway-ip and set the EVPN gateway configurations can be performed simultaneously. If you configure them simultaneously, all prefixes are exported with the gateway-ip.

Step 6

address-family l2vpn evpn

Example:

switch(config-router)# address-family l2vpn evpn
switch(config-router)#

Configure address family for L2VPN EVPN.

Step 7

route-map map-name out

Example:

switch(config-router)# route-map setrrrnh out 
switch(config-route-map)#

Applies the configured BGP policy to outgoing routes.

Step 8

route-map map-name [permit | deny] [seq]

Example:

switch(config-route-map)# route-map ABC permit 10
switch(config-route-map)

Creates a route map or enters route-map configuration mode for an existing route map.

Step 9

set extcommunity color color-num

Example:

switch(config-route-map)# set extcommunity color 20
switch(config-route-map)

Sets BGP extcommunity attribute for color extended community.

Example for Configuring SRTE for Recursive VPN Routes

switch# configure terminal
switch(config)# router bgp 100
switch(config-route-map)# vrf vrf3
switch(config-router)# address-family ipv4 unicast
switch(config-router)# export-gateway-ip
switch(config-router)# l2vpn evpn
switch(config-router)# route-map setrrnh out
switch(config-router)# route-map ABC permit 10 
switch(config-route-map)# set extcommunity color 20 

Verifying SRTE Configuration for Recursive VPN Routes

To display information about SRTE configuration for recursive VPN routes, perform one of the following tasks:

Table 1. Verifying SRTE Configuration for Recursive VPN Routes

Command

Purpose

show bgp ipv4 labeled-unicast prefix

Displays the advertised label index and the selected local label for the specified IPv4 prefix.

show bgp paths

Displays the BGP path information, including the advertised label index.

show mpls label range

Displays the configured SRGB range of labels.

show route-map [map-name]

Displays information about a route map, including the label index.

show running-config rpm

Displays information about Route Policy Manager (RPM).

show running-config | inc 'feature segment-routing'

Displays the status of the MPLS segment routing feature.

show running-config segment-routing

Displays the status of the segment routing feature.

show srte policy

Displays only the authorized policies.

show srte policy [all]

Displays the list of all policies available in the SR-TE.

show srte policy [detail]

Displays the detailed view of all the requested policies.

show srte policy <name>

Filters the SR-TE policy with the name and displays the list of all policies available with that name in the SR-TE.

Note

 

This command has the auto-complete feature for the policy-name. To use this feature, add a question mark or press TAB.

show srte policy color <color> endpoint <endpoint>

Displays the SR-TE policy for the color and endpoint.

Note

 

This command has the auto-complete feature for color and endpoint. To use this feature, add a question mark or press TAB.

show srte policy fh

Displays the set of first hops.

show segment-routing mpls clients

Displays the clients registered with the SR-APP.

show segment-routing mpls details

Displays detailed information.

show ip route vrf <vrf-name>

Displays the routing information for the VRF.