match additional-paths advertise-set
To match on paths that are marked (tagged) with a specific path-marking policy, use the match additional-paths advertise-set command in route-map configuration mode. To remove the match additional-paths advertise-set command from the configuration file, use the no form of this command.
match additional-paths advertise-set [best number] [best-range range-start range-end] [group-best] [all]
no match additional-paths advertise-set [best number] [best-range range-start range-end] [group-best] [all]
Syntax Description
best number |
(Optional) Matches on paths that are tagged with best number tag.
|
best-range range-start |
(Optional) Matches on paths that are tagged with best n (this starting number or any number in the range specified).
|
range-end |
(Optional) Matches on paths that are tagged with best n (this ending number or any number in the range specified).
|
group-best |
(Optional) Matches on paths that are tagged with the group-best tag. |
all |
(Optional) Matches on paths that are tagged with the all tag. |
Command Default
No matching is performed on additional path advertise sets.
Command Modes
Route-map configuration (config-route-map)
Command History
Release |
Modification |
---|---|
15.2(4)S |
This command was introduced. |
Cisco IOS XE Release 3.7S |
This command was integrated into Cisco IOS XE Release 3.7S. |
15.3(1)T |
This command was integrated into Cisco IOS Release 15.3(1)T. |
Usage Guidelines
Use this command in a route map to filter the advertisement of additional paths. Paths that have the same path marking (tag) as the marking that is configured in the match additional-paths advertise-set command match the route map entry (and are permitted or denied). A tag is an advertise-set, as defined in the bgp additional-paths select command.
If match additional-paths advertise-set best number is configured, any path that has the tag best number or a lower number tag matches the route map entry.
You can specify more than one selection policy in one match additional-paths advertise-set command; you must specify at least one selection policy if you use this command.
The best number keyword and argument are mutually exclusive with the best-range range-start range-end keyword and arguments. That is, the configuration of one disallows the configuration of the other. For practical purposes, it is preferable to use best number rather than best-range range-start range-end .
You can configure only one match additional-paths advertise-set command in the route map. If you configure more than one match additional-paths advertise-set command, the latest command overwrites the previous match additional-paths advertise-set command.
You can optionally specify in the route map one or more set commands to set characteristics of a path.
Although you can specify a route map that matches on paths that have marking policies other than the paths you want to advertise, you will typically create a route map that matches on the paths that you want to advertise (specified by the neighbor advertise additional-paths command).
Examples
In the following example, for every address family, there are one or more eBGP neighbors not shown in the configuration that are sending routes to the local device. The eBGP routes learned from these neighbors are advertised toward the neighbors shown in the configuration, and the path attributes are changed. The example configures that:
-
The route map called add_path1 specifies that all the paths are advertised toward neighbor 192.168.101.15, but any path that is marked with the best 2 tag will have its metric set to 780 before being sent toward that neighbor.
-
The route map called add_path2 specifies that any path that is marked with the best 3 tag will have its metric set to 640 and will be advertised toward neighbor 192.168.25.
-
The route map called add_path3 specifies that any path that is marked with the group-best tag will have its metric set to 825 and will be advertised toward neighbor 2001:DB8::1045.
-
In the IPv6 multicast address family, all paths are candidates to be advertised and will be advertised toward neighbor 2001:DB8::1037.
For the rest of advertise-set (not specified in a given route-map), the routes will be denied. If this is not what you want, then you can add another configuration command to permit routes, such as route-map add_pathX permit 20, for example.
router bgp 1
neighbor 192.168.101.15 remote-as 1
neighbor 192.168.101.25 remote-as 1
neighbor 2001:DB8::1045 remote-as 1
neighbor 2001:DB8::1037 remote-as 1
!
address-family ipv4 unicast
bgp additional-paths send receive
bgp additional-paths select all best 3 group-best
neighbor 192.168.101.15 activate
neighbor 192.168.101.15 route-map add_path1 out
neighbor 192.168.101.15 advertise additional-paths best 2
exit-address-family
!
address-family ipv4 multicast
bgp additional-paths send receive
bgp additional-paths select all best 3 group-best
neighbor 192.168.101.25 activate
neighbor 192.168.101.25 route-map add_path2 out
neighbor 192.168.101.25 advertise additional-paths best 3
exit-address-family
!
address-family ipv6 unicast
bgp additional-paths send receive
bgp additional-paths select group-best
neighbor 2001:DB8::1045 activate
neighbor 2001:DB8::1045 route-map add_path3 out
neighbor 2001:DB8::1045 advertise additional-paths all group-best
exit-address-family
!
address-family ipv6 multicast
bgp additional-paths send receive
bgp additional-paths select all
neighbor 2001:DB8::1037 activate
neighbor 2001:DB8::1037 advertise additional-paths all
exit-address-family
!
route-map add_path1 permit 10
match additional-paths advertise-set best 2
set metric 780
route-map add_path1 permit 20
!
route-map add_path2 permit 10
match additional-paths advertise-set best 3
set metric 640
!
route-map add_path3 permit 10
match additional-paths advertise-set group-best
set metric 825
!