Example for Configuring MPLS L2VPN QoS
Networking Requirements
As shown in Figure 3-8, an enterprise has its own MPLS backbone network. The enterprise has a small number of branch sites (two in this example). Site1 connects CE1 to PE1 to access the MPLS backbone network, and Site2 connects CE2 to PE2 to access the MPLS backbone network. Users in Site1 and Site2 want to exchange Layer 2 services with each other and require that user information in Layer 2 packets be retained when the packets are transmitted over the backbone network. The users want to assign 802.1p priorities 7, 6, and 5 for voice, video, and data services respectively, so that the devices provide different QoS for the three services in case of network congestion.
Configuration Roadmap
The configuration roadmap is as follows:
Configure VPLS in Martini mode so that Site1 and Site2 can exchange Layer 2 services with each other and that user information in Layer 2 packets can be retained when the packets are transmitted over the backbone network.
Create a DiffServ domain on PE1 and PE2 and configure priority mapping on the VPLS network to set the EXP priorities of voice, video, and data packets to 6, 5, and 4 respectively, so that quality of the voice service is ensured.
Set the DiffServ mode to pipe on PE1 and PE2, so that VPN services are forwarded over the VPLS network based on the priorities required by the enterprise and the egress schedules the packets based on the EXP priorities in VPLS labels but not change the PHBs and colors carried in the packets.
CE switches cannot function as PE devices. The configurations of PE devices in this example are only for your reference. In real-world networking, you need to select the devices that can function as PE devices and configure the devices according to the product manual. It is recommended that NE routers be used as PE devices.
Procedure
- Configure VPLS in Martini mode so that Site1 and Site2 can exchange Layer 2 services with each other.
For detailed configuration, see Example for Configuring Martini VPLS.
- Map 802.1p priorities of VLAN packets to PHBs and colors.802.1p priorities of VLAN packets are mapped to PHBs and colors based on the default mapping shown in Table 3-5.
- Configure a DiffServ domain.
# Configure PE1.
[~PE1] diffserv domain ds1 [*PE1-dsdomain-ds1] exp-outbound cs7 green map 6 [*PE1-dsdomain-ds1] exp-outbound cs6 green map 5 [*PE1-dsdomain-ds1] exp-outbound ef green map 4 [*PE1-dsdomain-ds1] quit [*PE1] commit
# Configure PE2.
[~PE2] diffserv domain ds1 [*PE2-dsdomain-ds1] exp-outbound cs7 green map 6 [*PE2-dsdomain-ds1] exp-outbound cs6 green map 5 [*PE2-dsdomain-ds1] exp-outbound ef green map 4 [*PE2-dsdomain-ds1] quit [*PE2] commit
- Configure the DiffServ mode on PE1 and PE2.
# Configure PE1.
[~PE1] mpls l2vpn mode pipe domain ds1 [*PE1] commit
# Configure PE2.
[~PE2] mpls l2vpn mode pipe domain ds1 [*PE2] commit
Configuration Files
CE1 configuration file
# sysname CE1 # vlan batch 10 # interface Vlanif10 ip address 192.168.1.5 255.255.255.0 # interface 10GE1/0/1 port link-type trunk port trunk allow-pass vlan 10 # return
CE2 configuration file
# sysname CE2 # vlan batch 40 # interface Vlanif40 ip address 192.168.1.6 255.255.255.0 # interface 10GE1/0/1 port link-type trunk port trunk allow-pass vlan 40 # return
PE1 configuration file
# sysname PE1 # vlan batch 10 20 # diffserv domain ds1 exp-outbound ef green map 4 exp-outbound cs6 green map 5 exp-outbound cs7 green map 6 # vlan 10 trust upstream ds1 # mpls lsr-id 1.1.1.9 # mpls # mpls l2vpn mode pipe domain ds1 # mpls l2vpn # vsi a2 static pwsignal ldp vsi-id 2 peer 3.3.3.9 # mpls ldp # mpls ldp remote-peer 3.3.3.9 remote-ip 3.3.3.9 # interface Vlanif10 l2 binding vsi a2 # interface Vlanif20 ip address 172.1.1.1 255.255.255.0 mpls mpls ldp # interface 10GE1/0/1 port link-type trunk port trunk allow-pass vlan 10 # interface 10GE2/0/2 port link-type trunk port trunk allow-pass vlan 20 # interface LoopBack1 ip address 1.1.1.9 255.255.255.255 # ospf 1 area 0.0.0.0 network 1.1.1.9 0.0.0.0 network 172.1.1.0 0.0.0.255 # return
P configuration file
# sysname P # vlan batch 20 30 # mpls lsr-id 2.2.2.9 # mpls # mpls ldp # interface Vlanif20 ip address 172.1.1.2 255.255.255.0 mpls mpls ldp # interface Vlanif30 ip address 172.2.1.1 255.255.255.0 mpls mpls ldp # interface 10GE1/0/1 port link-type trunk port trunk allow-pass vlan 20 # interface 10GE2/0/2 port link-type trunk port trunk allow-pass vlan 30 # interface LoopBack1 ip address 2.2.2.9 255.255.255.255 # ospf 1 area 0.0.0.0 network 2.2.2.9 0.0.0.0 network 172.1.1.0 0.0.0.255 network 172.2.1.0 0.0.0.255 # return
PE2 configuration file
# sysname PE2 # vlan batch 30 40 # diffserv domain ds1 exp-outbound ef green map 4 exp-outbound cs6 green map 5 exp-outbound cs7 green map 6 # vlan 40 trust upstream ds1 # mpls lsr-id 3.3.3.9 # mpls # mpls l2vpn mode pipe domain ds1 # mpls l2vpn # vsi a2 static pwsignal ldp vsi-id 2 peer 1.1.1.9 # mpls ldp # mpls ldp remote-peer 1.1.1.9 remote-ip 1.1.1.9 # interface Vlanif30 ip address 172.2.1.2 255.255.255.0 mpls mpls ldp # interface Vlanif40 l2 binding vsi a2 # interface 10GE1/0/1 port link-type trunk port trunk allow-pass vlan 30 # interface 10GE2/0/2 port link-type trunk port trunk allow-pass vlan 40 # interface LoopBack1 ip address 3.3.3.9 255.255.255.255 # ospf 1 area 0.0.0.0 network 3.3.3.9 0.0.0.0 network 172.2.1.0 0.0.0.255 # return