match mpls-label vs set mpls-label
set mpls-label
To enable a route to be distributed with a Multiprotocol Label Switching (MPLS) label if the route matches the conditions specified in the route map, use the set mpls-label command in route map configuration mode. To disable this function, use the no form of this command.
set mpls-label
no set mpls-label
Usage Guidelines
This command can be used only with the neighbor route-map out command to manage outbound route maps for a Border Gateway Protocol (BGP) session.
Use the route-map global configuration command with match and set route-map configuration commands to define the conditions for redistributing routes from one routing protocol into another. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria—the conditions under which redistribution is allowed for the current route-map command. The set commands specify the set actions—the particular redistribution actions to perform if the criteria enforced by the match commands are met. The no route-map command deletes the route map.
Examples
The following example creates a route map that enables the route to be distributed with a label if the IP address of the route matches an IP address in ACL 1.
match mpls-label
To redistribute routes that include Multiprotocol Label Switching (MPLS) labels if the routes meet the conditions specified in the route map, use the match mpls-label command in route map configuration mode. To disable this function, use the no form of this command.
Usage Guidelines
A route map that includes this command can be used in the following instances:
•With the neighbor route-map in command to manage inbound route maps in BGP
•With the redistribute bgp command to redistribute route maps in an IGP
Use the route-map global configuration command, and the match and set route map configuration commands, to define the conditions for redistributing routes from one routing protocol into another. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria—the conditions under which redistribution is allowed for the current route-map command. The set commands specify the set actions—the particular redistribution actions to perform if the criteria enforced by the match commands are met. The no route-map command deletes the route map.
The match route-map configuration command has multiple formats. The match commands can be given in any order, and all match commands must "pass" to cause the route to be redistributed according to the set actions given with the set commands. The no forms of the match commands remove the specified match criteria.
When you are passing routes through a route map, a route map can have several parts. Any route that does not match at least one match clause relating to a route-map command will be ignored; that is, the route will not be advertised for outbound route maps and will not be accepted for inbound route maps. If you want to modify only some data, you must configure a second route map section with an explicit match specified.
Examples
The following example shows how to create a route map that redistributes routes if the following conditions are met:
•The IP address of the route matches an IP address in ACL 2.
•The route includes an MPLS label.
To enable a route to be distributed with a Multiprotocol Label Switching (MPLS) label if the route matches the conditions specified in the route map, use the set mpls-label command in route map configuration mode. To disable this function, use the no form of this command.
set mpls-label
no set mpls-label
Usage Guidelines
This command can be used only with the neighbor route-map out command to manage outbound route maps for a Border Gateway Protocol (BGP) session.
Use the route-map global configuration command with match and set route-map configuration commands to define the conditions for redistributing routes from one routing protocol into another. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria—the conditions under which redistribution is allowed for the current route-map command. The set commands specify the set actions—the particular redistribution actions to perform if the criteria enforced by the match commands are met. The no route-map command deletes the route map.
Examples
The following example creates a route map that enables the route to be distributed with a label if the IP address of the route matches an IP address in ACL 1.
Router(config-router)# route-map incoming permit 10
Router(config-route-map)# match ip address 1
Router(config-route-map)# set mpls-label
match mpls-label
To redistribute routes that include Multiprotocol Label Switching (MPLS) labels if the routes meet the conditions specified in the route map, use the match mpls-label command in route map configuration mode. To disable this function, use the no form of this command.
match mpls-label
no match mpls-label
Usage Guidelines
A route map that includes this command can be used in the following instances:
•With the neighbor route-map in command to manage inbound route maps in BGP
•With the redistribute bgp command to redistribute route maps in an IGP
Use the route-map global configuration command, and the match and set route map configuration commands, to define the conditions for redistributing routes from one routing protocol into another. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria—the conditions under which redistribution is allowed for the current route-map command. The set commands specify the set actions—the particular redistribution actions to perform if the criteria enforced by the match commands are met. The no route-map command deletes the route map.
The match route-map configuration command has multiple formats. The match commands can be given in any order, and all match commands must "pass" to cause the route to be redistributed according to the set actions given with the set commands. The no forms of the match commands remove the specified match criteria.
When you are passing routes through a route map, a route map can have several parts. Any route that does not match at least one match clause relating to a route-map command will be ignored; that is, the route will not be advertised for outbound route maps and will not be accepted for inbound route maps. If you want to modify only some data, you must configure a second route map section with an explicit match specified.
Examples
The following example shows how to create a route map that redistributes routes if the following conditions are met:
•The IP address of the route matches an IP address in ACL 2.
•The route includes an MPLS label.
Router(config-router)# route-map incoming permit 10
Router(config-route-map)# match ip address 2
Router(config-route-map)# match mpls-label
Comments