The inbound peer fec command configures an inbound policy, which allows the label switching router (LSR) to receive Label Mapping messages for Interior Gateway Protocol (IGP) routes only from a specified peer.
The undo inbound peer fec command restores the default configuration.
By default, no inbound policy is configured.
inbound peer { peer-id | peer-group peer-group-name | all } fec { none | host | ip-prefix prefix-name }
undo inbound peer { peer-id | peer-group peer-group-name | all } fec
| 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 all Label Mapping messages. After the parameter none is configured, the specified LSR does not receive Label Mapping messages for IGP routes from its peers. | - |
| host | Allows only Label Mapping messages for host routes. After the parameter host is configured, a specified LSR receives only Label Mapping messages for host routes from its peers. | - |
| ip-prefix prefix-name | Allows only Label Mapping messages for IGP routes that are defined in the IP prefix list. After the parameter ip-prefix is configured, a specified LSR receives Label Mapping messages only for IGP routes that are defined in the IP prefix list by its peers. The parameter is specified by the ip ip-prefix command. | - |
Usage Scenario
By default, an LSR receives Label Mapping messages from all LDP peers to speed up LDP label switched path (LSP) convergence. This leads to a great number of unwanted LSPs, 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.
When running the inbound peer fec command specifies the peer ID and Forwarding Equivalence Class (FEC) of the IGP route, configuring the peer to receive only Label Mapping messages for specified IGP routes.
To apply a policy associated with the same FEC range to an LDP peer group or all LDP peers receiving Label Mapping messages, you can configure either peer-group peer-group-name or all in the command.
Prerequisites
MPLS LDP has been enabled globally using the mpls ldp command in the system view.
Precautions
inbound peer 2.2.2.2 fec host
inbound peer peer-group group1 fec noneAs group1 also contains an LDP peer with peer-id of 2.2.2.2, the following inbound policy takes effect:
inbound peer 2.2.2.2 fec host
inbound peer 2.2.2.2 fec host
inbound peer 2.2.2.2 fec noneThe second configuration overrides the first one. This means that the following inbound policy takes effect on the LDP peer with peer-id of 2.2.2.2:
inbound peer 2.2.2.2 fec 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 receives Label Mapping messages of all LDP FECs from the specified peer.