EVPN Routing Policy Language Commands

This section describes the EVPN routing policy language (RPL) commands used to create, modify, monitor, and maintain routing policies.


Note


All commands applicable for the Cisco NCS 5500 Series Router are also supported on the Cisco NCS 540 Series Router that is introduced from Cisco IOS XR Release 6.3.2. References to earlier releases in Command History tables apply to only the Cisco NCS 5500 Series Router.



Note


  • Starting with Cisco IOS XR Release 6.6.25, all commands applicable for the Cisco NCS 5500 Series Router are also supported on the Cisco NCS 560 Series Routers.

  • Starting with Cisco IOS XR Release 6.3.2, all commands applicable for the Cisco NCS 5500 Series Router are also supported on the Cisco NCS 540 Series Router.

  • References to releases before Cisco IOS XR Release 6.3.2 apply to only the Cisco NCS 5500 Series Router.

  • Cisco IOS XR Software Release 7.0.1 specific updates are not applicable for the following variants of Cisco NCS 540 Series Routers:

    • N540-28Z4C-SYS-A

    • N540-28Z4C-SYS-D

    • N540X-16Z4G8Q2C-A

    • N540X-16Z4G8Q2C-D

    • N540X-16Z8Q2C-D

    • N540-12Z20G-SYS-A

    • N540-12Z20G-SYS-D

    • N540X-12Z16G-SYS-A

    • N540X-12Z16G-SYS-D


For detailed information about EVPN RPL concepts, configuration tasks, and examples, see the EVPN Features chapter in the L2VPN and Ethernet Services Configuration Guide for Cisco NCS 5500 Series Routers.


Note


For the rest of the RPL commands, see Routing Policy Language Commands chapter in the Routing Command Reference for Cisco NCS 5500 Series Routers.


esi in

To match a esi entry in a esi set name or inline esi set, use the esi in command in route-policy configuration mode.

esi in {esi-set-name | inline-esi-set | parameter}

Syntax Description

esi-set-name

Name of a esi set. The esi-set accepts H.H.H.H.H value.

inline-esi-set

Inline esi set. The inline esi set must be enclosed in parentheses.

parameter

Parameter name. The parameter name must be preceded with a “$.”

Command Default

No default behavior or values

Command Modes

Route-policy configuration

Command History

Release

Modification

Release 6.1.31

This command was introduced.

Usage Guidelines

Use the esi in command as a conditional expression within an if statement to match a esi entry in a named esi set or inline esi set.


Note


For a list of all conditional expressions available within an if statement, see the if command.


Task ID

Task ID

Operations

route-policy

read, write

Examples


Router(config)# route-policy policy_A
Router(config-rpl)# if esi in (abcd.aaaa.0000.dddd.ffff) then 
Router(config-rpl-if)# set local-preference 200
Router(config-rpl-if)# endif
Router(config-rpl)# end-policy

etag-in

To match a etag entry in a etag set name or inline etag set, use the etag in command in route-policy configuration mode.

etag in {etag-set-name | inline-etag-set | parameter}

Syntax Description

etag-set-name

Name of a etag set. The etag-set accepts 32-bit Integer value. Range is 0 to 4294967295.

inline-etag-set

Inline etag set. The inline etag set must be enclosed in parentheses.

parameter

Parameter name. The parameter name must be preceded with a “$.”

Command Default

No default behavior or values

Command Modes

Route-policy configuration

Command History

Release

Modification

Release 6.1.31

This command was introduced.

Usage Guidelines

Use the etag in command as a conditional expression within an if statement to match a etag entry in a named etag set or inline etag set.


Note


For a list of all conditional expressions available within an if statement, see the if command.


Task ID

Task ID

Operations

route-policy

read, write

Examples


Router(config)# route-policy policy_A
Router(config-rpl)# if etag in (200) then
Router(config-rpl-if)# pass 
Router(config-rpl-if)# endif
Router(config-rpl)# end-policy

evpn-gateway

To match the gateway IP address, use the evpn-gateway in command in route-policy configuration mode.

evpn-gateway in {IP address | parameter}

Syntax Description

IP address

The gateway IP address (32-bit or 128-bit field (IPv4 or IPv6)).

parameter

Parameter name. The parameter name must be preceded with a “$.”

Command Default

No default behavior or values

Command Modes

Route-policy configuration

Command History

Release

Modification

Release 6.1.31

This command was introduced.

Usage Guidelines

Use the evpn-gateway in command as a conditional expression within an if statement.


Note


For a list of all conditional expressions available within an if statement, see the if command.


Task ID

Task ID

Operations

route-policy

read, write

Examples


Router(config)# route-policy policy gateway_A
Router(config-rpl)# if evpn-gateway in (10.0.0.0/24)then 
Router(config-rpl-if)# pass
Router(config-rpl-if)# else
Router(config-rpl-else)# drop
Router(config-rpl-if)# endif
Router(config-rpl)# end-policy

evpn-originator in

To match the originating router's IP address, use the evpn-originator in command in route-policy configuration mode.

evpn-originator in {IP address | parameter}

Syntax Description

IP address

The originating router's IP address (4 or 16 octets).

parameter

Parameter name. The parameter name must be preceded with a “$.”

Command Default

No default behavior or values

Command Modes

Route-policy configuration

Command History

Release

Modification

Release 6.1.31

This command was introduced.

Usage Guidelines

Use the evpn-originator in command as a conditional expression within an if statement.


Note


For a list of all conditional expressions available within an if statement, see the if command.


Task ID

Task ID

Operations

route-policy

read, write

Examples


Router(config)# route-policy policy originator_A
Router(config-rpl)# if evpn-originator in (10.0.0.0/24) then
Router(config-rpl-if)# set local-preference 100 
Router(config-rpl-if)# else
Router(config-rpl-else)# set med 200
Router(config-rpl-else)# endif
Router(config-rpl)# end-policy

evpn-route-type is

To match the EVPN route types, use the evpn-route-type is command in route-policy configuration mode.

evpn-route-type is {route types in decimal | parameter}

Syntax Description

route type in decimal

A three bit decimal number. Range is from 1 to 5.

  • Use route type 1 to specify Ethernet Auto-Discovery Route

  • Use route type 2 to specify MAC/IP Advertisement Route

  • Use route type 3 to specify Inclusive Multicast Ethernet Tag Route

  • Use route type 4 to specify Ethernet Segment Route

  • Use route type 5 to specify IP Prefix Route

parameter

Parameter name. The parameter name must be preceded with a “$.”

Command Default

No default behavior or values

Command Modes

Route-policy configuration

Command History

Release

Modification

Release 6.1.31

This command was introduced.

Usage Guidelines

Use the evpn-route-type is command as a conditional expression within an if statement.


Note


For a list of all conditional expressions available within an if statement, see the if command.


Task ID

Task ID

Operations

route-policy

read, write

Examples


Router(config)# route-policy policy_A
Router(config-rpl)# if evpn-route-type is 3 then 
Router(config-rpl-if)# set local-preference 200
Router(config-rpl-if)# endif
Router(config-rpl)# end-policy

mac in

To match a mac entry in a mac set name or inline mac set, use the mac in command in route-policy configuration mode.

mac in {mac-set-name | inline-mac-set | parameter}

Syntax Description

mac-set-name

Name of a mac-set. The mac-set accepts H.H.H value.

inline-mac-set

Inline mac set. The inline mac set must be enclosed in parentheses.

parameter

Parameter name. The parameter name must be preceded with a “$.”

Command Default

No default behavior or values

Command Modes

Route-policy configuration

Command History

Release

Modification

Release 6.1.31

This command was introduced.

Usage Guidelines

Use the mac in command as a conditional expression within an if statement to match a mac entry in a named mac set or inline mac set.


Note


For a list of all conditional expressions available within an if statement, see the if command.


Task ID

Task ID

Operations

route-policy

read, write

Examples


Router(config)# route-policy policy_A
Router(config-rpl)# if mac in (abcd.1234.ffff) then 
Router(config-rpl-if)# set local-preference 300
Router(config-rpl-if)# endif
Router(config-rpl)# end-policy