The outbound peer bgp-label-route command configures an outbound policy which allows a label switching router (LSR) to send Label Mapping messages for labeled BGP routes only to a specified peer.
The undo outbound peer bgp-label-route command restores the default configuration.
By default, no outbound policy is configured.
outbound peer { peer-id | peer-group peer-group-name | all } bgp-label-route { none | ip-prefix prefix-name }
undo outbound peer { peer-id | peer-group peer-group-name | all } bgp-label-route
| Parameter | Description | Value |
|---|---|---|
| peer-id | Specifies the ID of an LDP peer. By default, the peer ID is specified by the mpls lsr-id command. If the lsr-id command has been configured, the peer ID is specified by the lsr-id command. | - |
| peer-group peer-group-name | Specifies the name of a peer group. The parameter is specified by the ip ip-prefix command. | - |
| all | Indicates all LDP peers. | - |
| none | Forbids Label Mapping messages for all Forwarding Equivalence Classes (FECs). After the parameter none is configured, the LSR does not send Label Mapping messages for labeled BGP routes to the specified peer. | - |
| ip-prefix prefix-name | Allows only Label Mapping messages for labeled BGP routes that are defined in the IP prefix list. After the parameter ip-prefix is configured on an LSR, the LSR sends only Label Mapping messages for labeled BGP routes that are defined in the IP prefix list to a specified peer. The parameter is specified by the ip ip-prefix command. | - |
Usage Scenario
A label switching router (LSR) sends Label Mapping messages to both upstream and downstream LDP peers by default, speeding up LDP label switched path (LSP) convergence. This leads to a great number of unwanted LSPs to be established, wasting resources. To reduce the number of LSPs and save memory resources, you can configure an outbound or inbound policy to filter out LDP LSPs not matching the policy.
To trigger the egress LSP using the BGP labeled route, run the outbound peer bgp-label-route command. You can specify the peer ID and FEC of the BGP labeled route in the command to configure the peer to receive only Label Mapping messages with specified BGP labeled routes, limiting the number of Label Mapping messages to be sent.
To apply a policy associated with a single FEC range to an LDP peer group or all LDP peers that send Label Mapping messages, configure either the peer-group peer-group-name or all parameter in the command.
Prerequisites
MPLS LDP has been enabled globally using the mpls ldp command in the system view.
Precautions
outbound peer 2.2.2.2 bgp-label-route ip-prefix prefix1
outbound peer peer-group group1 bgp-label-route noneAs group1 also contains an LDP peer with peer-id of 2.2.2.2, the following outbound policy takes effect:
outbound peer 2.2.2.2 bgp-label-route ip-prefix prefix1
outbound peer 2.2.2.2 bgp-label-route ip-prefix prefix1
outbound peer 2.2.2.2 bgp-label-route noneThe second configuration overrides the first one. This means that the following outbound policy takes effect on the LDP peer with peer-id of 2.2.2.2:
outbound peer 2.2.2.2 bgp-label-route none
Creating a peer group before it is referenced is recommended. By default, nonexistent peer groups cannot be referenced using the command. If the route-policy nonexistent-config-check disable command is run in the system view and a nonexistent peer group is referenced using the current command, the current command applies to all LDP peers.
Creating an IP prefix list before it is referenced is recommended. By default, nonexistent IP prefix lists cannot be referenced using the command. If the route-policy nonexistent-config-check disable command is run in the system view and a nonexistent IP prefix list is referenced using the current command, the device advertises Label Mapping messages of all public-network BGP labeled routes to the specified peer.