106
[RouterB-Serial2/1/1] mpls ldp
[RouterB-Serial2/1/1] quit
4.
Configure Router C:
# Configure a VPN instance.
<RouterC> system-view
[RouterC] ip vpn-instance vpn1
[RouterC-vpn-instance-vpn1] route-distinguisher 200:1
[RouterC-vpn-instance-vpn1] vpn-target 200:1 export-extcommunity
[RouterC-vpn-instance-vpn1] vpn-target 200:1 import-extcommunity
[RouterC-vpn-instance-vpn1] quit
# Configure a BGP connection.
[RouterC] router id 2.2.2.2
[RouterC] bgp 200
[RouterC-bgp] peer 1.1.1.1 as-number 200
[RouterC-bgp] peer 1.1.1.1 connect-interface LoopBack0
[RouterC-bgp] ipv4-family vpn-instance vpn1
[RouterC-bgp-vpn1] peer 169.1.1.1 as-number 300
[RouterC-bgp-vpn1] peer 169.1.1.1 route-policy qppb import
[RouterC-bgp-vpn1] quit
[RouterC-bgp] ipv4-family vpnv4
[RouterC-bgp-af-vpnv4] peer 1.1.1.1 enable
[RouterC-bgp-af-vpnv4] peer 1.1.1.1 route-policy qppb import
[RouterC-bgp-af-vpnv4] quit
[RouterC-bgp] quit
# Configure a routing policy.
[RouterC] route-policy qppb permit node 0
[RouterC-route-policy] apply qos-local-id 1023
[RouterC-route-policy] quit
# Configure MPLS.
[RouterC] mpls lsr-id 2.2.2.2
[RouterC] mpls
[RouterC-mpls] quit
[RouterC] mpls ldp
[RouterC-mpls-ldp] quit
# Configure OSPF.
[RouterC] ospf
[RouterC-ospf-1] area 0
[RouterC ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0
[RouterC ospf-1-area-0.0.0.0] network 168.1.1.0 0.0.0.255
[RouterC ospf-1-area-0.0.0.0] quit
[RouterC-ospf-1] quit
# Configure a QoS policy.
[RouterC] traffic classifier qppb
[RouterC-classifier-qppb] if-match qos-local-id 1023
[RouterC-classifier-qppb] quit
[RouterC] traffic behavior qppb
[RouterC-behavior-qppb] car cir 2000 green pass red discard
[RouterC-behavior-qppb] quit