Verifying the configuration, Configuring a label acceptance policy – H3C Technologies H3C S12500-X Series Switches User Manual
Page 48
37
# On Switch D, create IP prefix list switchd, and configure LDP to use only the routes permitted by
the prefix list to establish LSPs.
[SwitchD] ip prefix-list switchd index 10 permit 11.1.1.0 24
[SwitchD] ip prefix-list switchd index 20 permit 21.1.1.0 24
[SwitchD] mpls ldp
[SwitchD-ldp] lsp-trigger prefix-list switchd
[SwitchD-ldp] quit
5.
Configure label acceptance policies:
# On Switch A, create an IP prefix list prefix-from-b that permits subnet 21.1.1.0/24. Switch A
uses this list to filter FEC-label mappings received from Switch B.
[SwitchA] ip prefix-list prefix-from-b index 10 permit 21.1.1.0 24
# On Switch A, create an IP prefix list prefix-from-d that denies subnet 21.1.1.0/24. Switch A
uses this list to filter FEC-label mappings received from Switch D.
[SwitchA] ip prefix-list prefix-from-d index 10 deny 21.1.1.0 24
# On Switch A, configure label acceptance policies to filter FEC-label mappings received from
Switch B and Switch D.
[SwitchA] mpls ldp
[SwitchA-ldp] accept-label peer 2.2.2.9 prefix-list prefix-from-b
[SwitchA-ldp] accept-label peer 4.4.4.9 prefix-list prefix-from-d
[SwitchA-ldp] quit
# On Switch C, create an IP prefix list prefix-from-b that permits subnet 11.1.1.0/24. Switch C
uses this list to filter FEC-label mappings received from Switch B.
[SwitchC] ip prefix-list prefix-from-b index 10 permit 11.1.1.0 24
# On Switch C, create an IP prefix list prefix-from-d that denies subnet 11.1.1.0/24. Switch A
uses this list to filter FEC-label mappings received from Switch D.
[SwitchC] ip prefix-list prefix-from-d index 10 deny 11.1.1.0 24
# On Switch C, configure label acceptance policies to filter FEC-label mappings received from
Switch B and Switch D.
[SwitchC] mpls ldp
[SwitchC-ldp] accept-label peer 2.2.2.9 prefix-list prefix-from-b
[SwitchC-ldp] accept-label peer 4.4.4.9 prefix-list prefix-from-d
[SwitchC-ldp] quit
Verifying the configuration
# Execute the display mpls ldp lsp command on each switch to view the LDP LSP information. For
example, on Switch A:
[SwitchA] display mpls ldp lsp
Status Flags: * - stale, L - liberal
Statistics:
FECs: 2 Ingress LSPs: 1 Transit LSPs: 1 Egress LSPs: 1
FEC In/Out Label Nexthop OutInterface
11.1.1.0/24 1277/-
-/1148(L)
21.1.1.0/24 -/1149(L)
-/1276 10.1.1.2 Vlan-int2
1276/1276 10.1.1.2 Vlan-int2