Configure Route Map on devices
Procedure
-
Run the following command to
configure the route map with one or more rules:
efa policy route-map create ? Flags: --name string Name of route-map --rule stringArray Rule in format seq[seq-num],action[permit/deny]
Following is an example of creating a route map rmap_1 with two rules:
efa policy route-map create –-name rmap_1 –-rule seq[5],action[permit] –-rule seq[10],action[permit]
-
Run the following command to
update the route map configuration on a list of devices:
The update command configures the route map on device, removes configuration from a device or updates action of route-maps.
efa policy route-map update ? Flags: --name string Name of route-map --rule string Rule in format seq[seq-num],action[permit/deny] --operation string Valid options are add-device, remove-device, update-action --ip string Comma separated range of device IP addresses. Example: 1.1.1.1-3,1.1.1.2,2.2.2.2
You can associate a route map with multiple rules.
The add-device operation adds all the rules of the route map on the specified devices.
The delete-device operation deletes all the rules of the route map on the specified devices.
.Note
Thedelete-device
operation fails if the route map is bound to any BGP neighbor.For an update-action operation, specify the route map name and the rule. You can modify the action to permit or deny for a specific rule. You can provide only one rule at a time.
Following are the examples of route map configuration update:- Add device: Configures a route map rule on devices
10.20.246.10 and 10.20.246.11. Assume there are two route map rules
for a map named rmap_1 that already exists in EFA:
- rmap_1 seq 5 action permit
- rmap_1 seq 10 action permit
efa policy route-map update –-name rmap_l –-operation add-device --ip 10.20.246.10-11
- Delete device: Removes route map from the specified
devices:
efa policy route-map update –-name rmap_l –-operation delete-device --ip 10.20.246.10-11
- Update action: Changes the action from permit to deny for the
specified
rule:
efa policy route-map update –-name rmap_l –-rule seq[5],action[deny] –-operation update-action
-
Verify the switch
configuration on the SLX device.
Example 1 SLX# show running-config route-map route-map rmap_1 permit 5
Example 2 SLX# show running-config route-map route-map rmap_1 permit 5 route-map rmap_1 permit 10
Example 3 SLX# show running-config route-map route-map rmap_1 deny 5 route-map rmap_1 permit 10
- Add device: Configures a route map rule on devices
10.20.246.10 and 10.20.246.11. Assume there are two route map rules
for a map named rmap_1 that already exists in EFA:
-
Run the following command to
create route map match criteria:
The IPv4 prefix list is the only match supported.
efa policy route-map-match create ? Flags: --name string Name of route-map --rule string Rule in format seq[seq-num],action[permit/deny] --match-ipv4-prefix string IPv4 prefix-list name
Following is an example of route map match create in IPv4:
efa policy route-map-match create –-name rmap_1 –-rule seq[5],action[permit] --match-ipv4-prefix prefix_1
-
Verify the switch
configuration on the SLX device.
SLX# show running-config route-map route-map rmap_1 permit 5 match ip address prefix-list prefix_1
-
Verify the switch
configuration on the SLX device.
-
Run the following command to
remove the route map match criteria:
The IPv4 prefix list is the only match supported.
efa policy route-map-match delete ? Flags: --name string Name of route-map --rule string Rule in format seq[seq-num],action[permit/deny] --match-ipv4-prefix string IPv4 prefix-list name
Following is an example of route map match delete in IPv4:
efa policy route-map-match delete –-name rmap_1 –-rule seq[5],action[permit]
-
Verify the switch
configuration on the SLX device.
SLX# show running-config route-map route-map rmap_1 permit 5
-
Verify the switch
configuration on the SLX device.
-
Run the following command to
display the route map for a list of devices:
In the command output, the App State column reflects the state of configuration on the specified device. When there is drift in a rule, the App State is shown as
cfg-refreshed
.efa policy route-map list ? Flags: --ip string Comma separated range of device IP addresses. Example: 1.1.1.1-3,1.1.1.2,2.2.2.2
Example:
efa policy route-map list –-ip 10.20.246.10-11 Route-map details: Name: rmap_1 Seq: 5 Action: permit Match-ipv4-prefixlist: Prefix-list: prefix_1 Name: rmap_2 Seq: 5 Action: permit Match-ipv4-prefixlist: Prefix-list: prefix_1 IP Addresses: +----------------+-----+---------------+-----------------+ | Name | Seq | IP Address | App State | +--------------+-----+---------------+-------------------+ | rmap_1 | 5 | 10.20.246.10 | cfg-in-sync | +--------------+-----+---------------+-------------------+ | rmap_1 | 5 | 10.20.246.11 | cfg-in-sync | +--------------+-----+---------------+-------------------+ | rmap_2 | 5 | 10.20.246.10 | cfg-in-sync | +--------------+-----+---------------+-------------------+ | rmap_2 | 5 | 10.20.246.11 | cfg-in-sync | +--------------+-----+---------------+-------------------+
-
Run the following command to
delete a route map and the associated rules on the devices:
efa policy route-map delete ? Flags: --name stringArray Name of route-map --seq string Sequence numbers. For example 5,10,20, or all
The command removes the route map rule from the EFA database and from the associated devices.
You can delete a specific rule of a route map by specifying the route map name and the sequence number of the rule.
You can delete all the route map rules for a specific route map name by specifying the sequence number as "all".
The result of this command depends on whether the route map is bound with a BGP neighbor.- If the route map is bound to BGP peer, you cannot delete the last route map rule.
- If the route map has no bindings, the command deletes the configuration on all devices associated with the route map.
Following example deletes two rules with sequence numbers 5 and 10 from a route map (rmap_1) that has three rules:
- rmap_1 seq 5 action permit
- rmap_1 seq 10 action permit
- rmap_1 seq 20 action
permit
efa policy route-map delete –-name rmap_l –-seq 5,10
-
Verify the switch
configuration on the SLX device.
SLX1# show running-config route-map rmap_1 route-map rmap_1 permit 20