47
Label advertisement control configuration example
Network requirements
Two links, Router A—Router B—Router C and Router A—Router D—Router C, exist between
subnets 11.1.1.0/24 and 21.1.1.0/24.
Configure LDP to establish LSPs only for routes to subnets 11.1.1.0/24 and 21.1.1.0/24.
Configure LDP to establish LSPs only on the link Router A—Router B—Router C to forward traffic
between subnets 11.1.1.0/24 and 21.1.1.0/24.
Figure 20 Network diagram
Requirements analysis
•
To ensure that the LSRs establish IPv4 LSPs automatically, enable IPv4 LDP on each LSR.
•
To establish IPv4 LDP LSPs, configure an IPv4 routing protocol to ensure IP connectivity
between the LSRs. This example uses OSPF.
•
To ensure that LDP establishes IPv4 LSPs only for the routes 11.1.1.0/24 and 21.1.1.0/24,
configure IPv4 LSP generation policies on each LSR.
•
To ensure that LDP establishes IPv4 LSPs only over the link Router A—Router B—Router C,
configure IPv4 label advertisement policies as follows:
{
Router A advertises only the label mapping for FEC 11.1.1.0/24 to Router B.
{
Router C advertises only the label mapping for FEC 21.1.1.0/24 to Router B.
{
Router D does not advertise label mapping for FEC 21.1.1.0/24 to Router A. Router D does
not advertise label mapping for FEC 11.1.1.0/24 to Router C.
Configuration procedure
1.
Configure IP addresses and masks for interfaces, including the loopback interfaces, as shown
in
. (Details not shown.)
2.
Configure OSPF on each router to ensure IP connectivity between them. (Details not shown.)
3.
Enable MPLS and IPv4 LDP:
# Configure Router A.
<RouterA> system-view
[RouterA] mpls lsr-id 1.1.1.9
[RouterA] mpls ldp
Router A
Router B
Router C
Loop0
1.1.1.9/32
Loop0
3.3.3.9/32
GE1/1/2
10.1.1.1/24
GE1/1/3
20.1.1.1/24
GE1/1/2
10.1.1.2/24
GE1/1/2
20.1.1.2/24
11.1.1.0/24
21.1.1.0/24
GE1/1/1
11.1.1.1/24
GE1/1/1
21.1.1.1/24
Router D
Loop0
4.4.4.9/32
Loop0
2.2.2.9/32
GE1/1/3
30.1.1.1/24
GE1/1/3
40.1.1.2/24
GE1/1/2
30.1.1.2/24
GE1/1/3
40.1.1.1/24