43
5 packets transmitted, 5 packets received, 0.0% packet loss
Round-trip min/avg/max = 1/1/1 ms
Label acceptance 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 19 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 acceptance policies as follows:
{
Router A accepts only the label mapping for FEC 21.1.1.0/24 received from Router B.
Router A denies the label mapping for FEC 21.1.1.0/24 received from Router D.
{
Router C accepts only the label mapping for FEC 11.1.1.0/24 received from Router B.
Router C denies the label mapping for FEC 11.1.1.0/24 received from Router D.
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
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