50
Examples
# Configure the device to accept only the label bindings of FECs with destination addresses on segments
10 .1.1. 0 / 24 a n d 10 . 2 .1. 0 / 24 f r o m L D P p e e r 1.1.1. 9.
<Sysname> system-view
[Sysname] mpls ldp
[Sysname-mpls-ldp] accept-label peer 1.1.1.9 ip-prefix prefix-from-RTA
[Sysname-mpls-ldp] quit
[Sysname] ip ip-prefix prefix-from-RTA index 1 permit 10.1.1.0 24
[Sysname] ip ip-prefix prefix-from-RTA index 2 permit 10.2.1.0 24
advertise-label
Description
Use the advertise-label command to configure a label advertisement control policy.
Use the undo advertise-label command to restore the default.
By default, an LSR does not filter label bindings to be advertised.
When advertising label bindings to peers, an LSR follows these rules:
• If the IP prefix of a label binding to be advertised fails the IP prefix checking, the LSR does not
advertise the label binding to any peer.
• If the IP prefix of a label binding to be advertised passes the IP prefix checking and the peer list is
not specified, the LSR will advertise the label binding to all peers.
• If the IP prefix of a label binding to be advertised passes the IP prefix checking and you specify a
peer list, the LSR will advertise the label binding to the peers that pass the peer list checking.
• If the IP prefix of a label binding to be advertised passes the checking of more than one IP prefix
lists (which are specified by executing the advertise-label command for multiple times), the LSR will
advertise the label binding based on the configuration by the first advertise-label command.
Syntax
advertise-label ip-prefix ip-prefix-name [ peer peer-ip-prefix-name ]
undo advertise-label ip-prefix ip-prefix-name
View
MPLS LDP view, MPLS LDP VPN instance view
Default level
2: System level
Parameters
ip-prefix ip-prefix-name: Specifies an IP prefix list to be used for filtering the label bindings to be
advertised. ip-prefix-name is the name of the IP prefix list, which is a string of 1 to 19 characters.
peer peer-ip-prefix-name: Specifies a list of LDP peers. peer-ip-prefix-name is the IP prefix list name, which
is a string of 1 to 19 characters. If you do not specify the LDP peer list, the label advertisement control
policy is for all LDP peers.
Examples
# Configure label advertisement control policies so that the device:
• Advertises label bindings for FEC 10.1.1.0/24 to the LDP peer with the LSR ID 3.3.3.9