Before a BGP LSP is established, a routing policy must be configured to control label distribution. The egress of the BGP LSP to be established needs to assign an MPLS label to the route advertised to an upstream node. If a transit node receives a labeled IPv4 route from downstream, the downstream node must re-assign an MPLS label to the transit node and advertises the label upstream.
Procedure
- Perform the following steps on each AGG and MASG:
- Run system-view
The system view is displayed.
- Run route-policy route-policy-name permit node node
A Route-Policy node is created.
- Run apply mpls-label
The local device is enabled to assign a label to an IPv4 route.
- Run quit
Return to the system view.
- Run bgp { as-number-plain | as-number-dot }
The BGP view is displayed.
- Run peer { ipv4-address | group-name } route-policy route-policy-name export
A routing policy for advertising routes matching Route-Policy conditions to a BGP peer or a BGP peer group is configured.
Repeat this step for each BGP peer.
- Run network ip-address [ mask | mask-length ] [ route-policy route-policy-name ]
The route destined for the loopback interface address is advertised.
This route is labeled and advertised along a path over which a BGP LSP is established.
- Run commit
The configuration is committed.
- Perform the following steps on each AGG ASBR and core ASBR:
- Run system-view
The system view is displayed.
- Run route-policy route-policy-name permit node node
A Route-Policy node is created.
- Run if-match mpls-label
An IPv4 route is enabled to match an MPLS label.
- Run apply mpls-label
The local device is enabled to assign a label to an IPv4 route.
- Run quit
Return to the system view.
- Run bgp { as-number-plain | as-number-dot }
The BGP view is displayed.
- Run peer { ipv4-address | group-name } route-policy route-policy-name export
A routing policy for advertising routes matching Route-Policy conditions to a BGP peer or a BGP peer group is configured.
Repeat this step for each BGP peer.
- Run commit
The configuration is committed.