Example for Configuring a DS-TE Tunnel in Non-IETF Mode (MAM)
Networking Requirements
As shown in Figure 4-45, PEs and P on the MPLS backbone network are enabled with OSPF to interwork with each other. PE1 accesses VPN-A and PE2 accesses VPN-B. VPN-A transmits EF traffic and VPN-B transmits BE traffic. The QoS requirements of different types of traffic are as follows:
A static DS-TE tunnel between PE1 and PE2 is required to be set up in non-IETF mode to transmit the preceding traffic. The bandwidth constraints model is required to be MAM and the bandwidth preemption is not allowed between CTs.
Configuration Roadmap
The configuration roadmap is as follows:
- A static CR-LSP is set up for each type of traffic on each VPN because the static TE tunnel supports only single CT.
- Two static CR-LSPs are created in non-IETF mode, with tunnel interfaces of static CR-LSPs being Tunnel0/0/1 and Tunnel0/0/2 and CTs being CT0 and CT1 separately.
- Tunnel0/0/1 is configured to transmit EF traffic of VPN-A and Tunnel0/0/2 is configured to transmit BE traffic of VPN-B.
- Configure mappings between CTs and services, so that CT0 carries EF traffic and CT1 carries BE traffic. Maps DSCP priorities 46 (EF) to local priority 0; maps DSCP priorities 0 (BE) to local priority 1; maps the EXP field 5 to local priority 0 and the EXP field 0 to local priority 1.
- To implement accurate bandwidth control, bandwidth of a BC must be 125% of the corresponding CT. Because of the CT0 and CT1 bandwidths are 100 Mbit/s and 200 Mbit/s, the BC0 and BC1 bandwidths are 125 Mbit/s and 250 Mbit/s respectively. The reservable bandwidth of the link should be equal to or greater than the total bandwidth of BCs. Therefore, the reservable bandwidth of the link is equal to or greater than 375 Mbit/s.
Procedure
- Configure IP addresses for interfaces on the PEs and P.
Enable OSPF to ensure that the PEs and P can communicate with each
other.
# Configure PE1. The configurations of P and PE2 are similar to the configuration of PE1, and are not mentioned here.
<Huawei> system-view [Huawei] sysname PE1 [PE1] interface gigabitethernet 3/0/0 [PE1-GigabitEthernet3/0/0] ip address 172.1.1.1 255.255.255.0 [PE1-GigabitEthernet3/0/0] quit [PE1] interface loopback 1 [PE1-LoopBack1] ip address 1.1.1.9 255.255.255.255 [PE1-LoopBack1] quit [PE1] ospf 1 [PE1-ospf-1] area 0 [PE1-ospf-1-area-0.0.0.0] network 1.1.1.9 0.0.0.0 [PE1-ospf-1-area-0.0.0.0] network 172.1.1.0 0.0.0.255 [PE1-ospf-1-area-0.0.0.0] quit [PE1-ospf-1] quit
After the configurations, OSPF adjacency can be created between PE1, P, and PE2. By using the display ospf peer command, you can see that the status of the adjacency is Full. By using the display ip routing-table command, you can see that PEs can learn the route to Loopback1 from each other.
- Configure LSR ID and enable MPLS and MPLS-TE on each PE
and P.
# Configuration PE1.
[PE1] mpls lsr-id 1.1.1.9 [PE1] mpls [PE1-mpls] mpls te [PE1-mpls] quit [PE1] interface gigabitethernet 3/0/0 [PE1-GigabitEthernet3/0/0] mpls [PE1-GigabitEthernet3/0/0] mpls te [PE1-GigabitEthernet3/0/0] quit
# Configure P.
[P] mpls lsr-id 2.2.2.9 [P] mpls [P-mpls] mpls te [P-mpls] quit [P] interface gigabitethernet 1/0/0 [P-GigabitEthernet1/0/0] mpls [P-GigabitEthernet1/0/0] mpls te [P-GigabitEthernet1/0/0] quit [P] interface gigabitethernet 2/0/0 [P-GigabitEthernet2/0/0] mpls [P-GigabitEthernet2/0/0] mpls te [P-GigabitEthernet2/0/0] quit
# Configure PE2.
[PE2] mpls lsr-id 3.3.3.9 [PE2] mpls [PE2-mpls] mpls te [PE2-mpls] quit [PE2] interface gigabitethernet 3/0/0 [PE2-GigabitEthernet3/0/0] mpls [PE2-GigabitEthernet3/0/0] mpls te [PE2-GigabitEthernet3/0/0] quit
- Configure the DS-TE mode and the bandwidth constraints
model on each PE and P.
# Configure PE1.
[PE1] mpls [PE1-mpls] mpls te ds-te mode non-ietf [PE1-mpls] mpls te ds-te bcm mam [PE1-mpls] quit
# Configure P.
[P] mpls [P-mpls] mpls te ds-te mode non-ietf [P-mpls] mpls te ds-te bcm mam [P-mpls] quit
# Configure PE2.
[PE2] mpls [PE2-mpls] mpls te ds-te mode non-ietf [PE2-mpls] mpls te ds-te bcm mam [PE2-mpls] quit
After completing the configuration, run the display mpls te ds-te summary command on a PE or P to view information about DS-TE configuration.
The display on PE1 is used as an example.
[PE1] display mpls te ds-te summary DS-TE IETF Supported :YES DS-TE MODE :NON-IETF Bandwidth Constraint Model :MAM
- Configure link bandwidth on each PE and P.
# Configure PE1.
[PE1] interface gigabitethernet 3/0/0 [PE1-GigabitEthernet3/0/0] mpls te bandwidth max-reservable-bandwidth 375000 [PE1-GigabitEthernet3/0/0] mpls te bandwidth bc0 125000 bc1 250000 [PE1-GigabitEthernet3/0/0] quit
# Configure P.
[P] interface gigabitethernet 1/0/0 [P-GigabitEthernet1/0/0] mpls te bandwidth max-reservable-bandwidth 375000 [P-GigabitEthernet1/0/0] mpls te bandwidth bc0 125000 bc1 250000 [P-GigabitEthernet1/0/0] quit [P] interface gigabitethernet 2/0/0 [P-GigabitEthernet2/0/0] mpls te bandwidth max-reservable-bandwidth 375000 [P-GigabitEthernet2/0/0] mpls te bandwidth bc0 125000 bc1 250000 [P-GigabitEthernet2/0/0] quit
# Configure PE2.
[PE2] interface gigabitethernet 3/0/0 [PE2-GigabitEthernet3/0/0] mpls te bandwidth max-reservable-bandwidth 375000 [PE2-GigabitEthernet3/0/0] mpls te bandwidth bc0 125000 bc1 250000 [PE2-GigabitEthernet3/0/0] quit
After completing the configuration, run the display mpls te link-administration bandwidth-allocation command on the PE to view information about BC bandwidth allocation for interfaces.
The display on PE1 is used as an example.
[PE1] display mpls te link-administration bandwidth-allocation interface gigabitethernet 3/0/0 Link ID: GigabitEthernet3/0/0 Bandwidth Constraint Model : Maximum Allocation Model (MAM) Physical Link Bandwidth(Kbits/sec) : 1000000 Maximum Link Reservable Bandwidth(Kbits/sec): 375000 Reservable Bandwidth BC0(Kbits/sec) : 125000 Reservable Bandwidth BC1(Kbits/sec) : 250000 Downstream Bandwidth (Kbits/sec) : 0 IPUpdown Link Status : UP PhysicalUpdown Link Status : UP GracefulUpdown Link Status : DOWN ---------------------------------------------------------------------- TE-CLASS CT PRIORITY BW RESERVED BW AVAILABLE DOWNSTREAM (Kbit/sec) (Kbit/sec) RSVPLSPNODE COUNT ---------------------------------------------------------------------- 0 0 0 0 125000 0 1 0 1 0 125000 0 2 0 2 0 125000 0 3 0 3 0 125000 0 4 0 4 0 125000 0 5 0 5 0 125000 0 6 0 6 0 125000 0 7 0 7 0 125000 0 8 1 0 0 250000 0 9 1 1 0 250000 0 10 1 2 0 250000 0 11 1 3 0 250000 0 12 1 4 0 250000 0 13 1 5 0 250000 0 14 1 6 0 250000 0 15 1 7 0 250000 0 ----------------------------------------------------------------------
- Configure tunnel interfaces on PEs.
# Configure PE1.
[PE1] interface tunnel 0/0/1 [PE1-Tunnel0/0/1] description For VPN-A_EF [PE1-Tunnel0/0/1] ip address unnumbered interface loopback 1 [PE1-Tunnel0/0/1] tunnel-protocol mpls te [PE1-Tunnel0/0/1] destination 3.3.3.9 [PE1-Tunnel0/0/1] mpls te tunnel-id 300 [PE1-Tunnel0/0/1] mpls te signal-protocol cr-static [PE1-Tunnel0/0/1] mpls te commit [PE1-Tunnel0/0/1] quit [PE1] interface tunnel 0/0/2 [PE1-Tunnel0/0/2] description For VPN-B_BE [PE1-Tunnel0/0/2] ip address unnumbered interface loopback 1 [PE1-Tunnel0/0/2] tunnel-protocol mpls te [PE1-Tunnel0/0/2] destination 3.3.3.9 [PE1-Tunnel0/0/2] mpls te tunnel-id 301 [PE1-Tunnel0/0/2] mpls te signal-protocol cr-static [PE1-Tunnel0/0/2] mpls te commit [PE1-Tunnel0/0/2] quit
# Configure PE2.
[PE2] interface tunnel 0/0/1 [PE2-Tunnel0/0/1] description For VPN-A_EF [PE2-Tunnel0/0/1] ip address unnumbered interface loopback 1 [PE2-Tunnel0/0/1] tunnel-protocol mpls te [PE2-Tunnel0/0/1] destination 1.1.1.9 [PE2-Tunnel0/0/1] mpls te tunnel-id 300 [PE2-Tunnel0/0/1] mpls te signal-protocol cr-static [PE2-Tunnel0/0/1] mpls te commit [PE2-Tunnel0/0/1] quit [PE2] interface tunnel 0/0/2 [PE2-Tunnel0/0/2] description For VPN-B_BE [PE2-Tunnel0/0/2] ip address unnumbered interface loopback 1 [PE2-Tunnel0/0/2] tunnel-protocol mpls te [PE2-Tunnel0/0/2] destination 1.1.1.9 [PE2-Tunnel0/0/2] mpls te tunnel-id 301 [PE2-Tunnel0/0/2] mpls te signal-protocol cr-static [PE2-Tunnel0/0/2] mpls te commit [PE2-Tunnel0/0/2] quit
- Configure a static CR-LSP on each PE and P.
# Configure PE1.
[PE1] static-cr-lsp ingress tunnel-interface tunnel 0/0/1 destination 3.3.3.9 nexthop 172.1.1.2 out-label 100 bandwidth ct0 100000 [PE1] static-cr-lsp ingress tunnel-interface tunnel 0/0/2 destination 3.3.3.9 nexthop 172.1.1.2 out-label 200 bandwidth ct1 200000 [PE1] static-cr-lsp egress VPN-A_EF incoming-interface gigabitethernet 3/0/0 in-label 101 [PE1] static-cr-lsp egress VPN-B_BE incoming-interface gigabitethernet 3/0/0 in-label 201
# Configure P.
[P] static-cr-lsp transit VPN-A_EF-1to2 incoming-interface gigabitethernet1/0/0 in-label 100 nexthop 172.2.1.2 out-label 100 bandwidth ct0 100000 [P] static-cr-lsp transit VPN-B_BE-1to2 incoming-interface gigabitethernet1/0/0 in-label 200 nexthop 172.2.1.2 out-label 200 bandwidth ct1 200000 [P] static-cr-lsp transit VPN-A_EF-2to1 incoming-interface gigabitethernet2/0/0 in-label 101 nexthop 172.1.1.1 out-label 101 bandwidth ct0 100000 [P] static-cr-lsp transit VPN-B_BE-2to1 incoming-interface gigabitethernet2/0/0 in-label 201 nexthop 172.1.1.1 out-label 201 bandwidth ct1 200000
# Configure PE2.
[PE2] static-cr-lsp egress VPN-A_EF incoming-interface gigabitethernet 3/0/0 in-label 100 [PE2] static-cr-lsp egress VPN-B_BE incoming-interface gigabitethernet 3/0/0 in-label 200 [PE2] static-cr-lsp ingress tunnel-interface tunnel 0/0/1 destination 1.1.1.9 nexthop 172.2.1.1 out-label 101 bandwidth ct0 100000 [PE2] static-cr-lsp ingress tunnel-interface tunnel 0/0/2 destination 1.1.1.9 nexthop 172.2.1.1 out-label 201 bandwidth ct1 200000
After completing the configuration, run the display mpls static-cr-lsp command on a PE. The static CR-LSP goes Up.
The display on Tunnel0/0/1 of PE1 is used as an example.
[PE1] display mpls static-cr-lsp Tunnel0/0/1 TOTAL : 1 STATIC CRLSP(S) UP : 1 STATIC CRLSP(S) DOWN : 0 STATIC CRLSP(S) Name FEC I/O Label I/O If Status Tunnel0/0/1 3.3.3.9/32 NULL/100 -/GE3/0/0 Up
Run the display interface tunnel interface-number command on a PE. The tunnel interface goes Up.
The display on tunnel 0/0/1 of PE1 is used as an example.
[PE1] display interface tunnel 0/0/1 Tunnel0/0/1 current state : UP Line protocol current state : UP Last line protocol up time : 2012-12-29 20:16:44 Description:For VPN-A_EF Route Port,The Maximum Transmit Unit is 1500 Internet Address is unnumbered, using address of LoopBack1(1.1.1.9/32) Encapsulation is TUNNEL, loopback not set Tunnel destination 3.3.3.9 Tunnel up/down statistics 1 Tunnel protocol/transport MPLS/MPLS, ILM is available, primary tunnel id is 0x3, secondary tunnel id is 0x0 Current system time: 2012-12-29 20:25:04 300 seconds output rate 0 bits/sec, 0 packets/sec 0 seconds output rate 0 bits/sec, 0 packets/sec 0 packets output, 0 bytes 0 output error 0 output drop Input bandwidth utilization : 0% Output bandwidth utilization : 0%
Run the display mpls te link-administration bandwidth-allocation command again. The bandwidth has been allocated for CT0 and CT1 with priorities of 0.
[PE1] display mpls te link-administration bandwidth-allocation interface gigabitethernet 3/0/0 Link ID: GigabitEthernet3/0/0 Bandwidth Constraint Model : Maximum Allocation Model (MAM) Physical Link Bandwidth(Kbits/sec) : 1000000 Maximum Link Reservable Bandwidth(Kbits/sec): 375000 Reservable Bandwidth BC0(Kbits/sec) : 125000 Reservable Bandwidth BC1(Kbits/sec) : 250000 Downstream Bandwidth (Kbits/sec) : 300000 IPUpdown Link Status : UP PhysicalUpdown Link Status : UP GracefulUpdown Link Status : DOWN ---------------------------------------------------------------------- TE-CLASS CT PRIORITY BW RESERVED BW AVAILABLE DOWNSTREAM (Kbit/sec) (Kbit/sec) RSVPLSPNODE COUNT ---------------------------------------------------------------------- 0 0 0 100000 25000 0 1 0 1 0 25000 0 2 0 2 0 25000 0 3 0 3 0 25000 0 4 0 4 0 25000 0 5 0 5 0 25000 0 6 0 6 0 25000 0 7 0 7 0 25000 0 8 1 0 200000 50000 0 9 1 1 0 50000 0 10 1 2 0 50000 0 11 1 3 0 50000 0 12 1 4 0 50000 0 13 1 5 0 50000 0 14 1 6 0 50000 0 15 1 7 0 50000 0 ----------------------------------------------------------------------
- Configure the packet priority trusted by the inbound interface
and priority mapping on PEs.
# Configure PE1.
[PE1] interface gigabitethernet 1/0/0 [PE1-GigabitEthernet1/0/0] trust dscp [PE1-GigabitEthernet1/0/0] quit [PE1] interface gigabitethernet 2/0/0 [PE1-GigabitEthernet2/0/0] trust dscp [PE1-GigabitEthernet2/0/0] quit [PE1] interface gigabitethernet 3/0/0 [PE1-GigabitEthernet3/0/0] trust dscp [PE1-GigabitEthernet3/0/0] quit [PE1] qos map-table dscp-lp [PE1-maptbl-dscp-lp] input 46 output 0 [PE1-maptbl-dscp-lp] input 0 output 1 [PE1-maptbl-dscp-lp] quit [PE1] qos map-table exp-lp [PE1-maptbl-exp-lp] input 5 output 0 [PE1-maptbl-exp-lp] input 0 output 1 [PE1-maptbl-exp-lp] quit
# Configure P.
[P] interface gigabitethernet 1/0/0 [P-GigabitEthernet1/0/0] trust exp [P-GigabitEthernet1/0/0] quit [P] interface gigabitethernet 2/0/0 [P-GigabitEthernet2/0/0] trust exp [P-GigabitEthernet2/0/0] quit [P] qos map-table dscp-lp [P-maptbl-dscp-lp] input 46 output 0 [P-maptbl-dscp-lp] input 0 output 1 [P-maptbl-dscp-lp] quit [P] qos map-table exp-lp [P-maptbl-exp-lp] input 5 output 0 [P-maptbl-exp-lp] input 0 output 1 [P-maptbl-exp-lp] quit
# Configure PE2.
[PE2] interface gigabitethernet 1/0/0 [PE2-GigabitEthernet1/0/0] trust dscp [PE2-GigabitEthernet1/0/0] quit [PE2] interface gigabitethernet 2/0/0 [PE2-GigabitEthernet2/0/0] trust dscp [PE2-GigabitEthernet2/0/0] quit [PE2] interface gigabitethernet 3/0/0 [PE2-GigabitEthernet3/0/0] trust dscp [PE2-GigabitEthernet3/0/0] quit [PE2] qos map-table dscp-lp [PE2-maptbl-dscp-lp] input 46 output 0 [PE2-maptbl-dscp-lp] input 0 output 1 [PE2-maptbl-dscp-lp] quit [PE2] qos map-table exp-lp [PE2-maptbl-exp-lp] input 5 output 0 [PE2-maptbl-exp-lp] input 0 output 1 [PE2-maptbl-exp-lp] quit
Run the display qos map-table dscp-lp command on the PEs to check the mapping from DSCP priorities to local priorities. The display on PE1 is used as an example.
[PE1] display qos map-table dscp-lp Input DSCP LP ------------------- 0 1 1 0 2 0 3 0 4 0 5 0 6 0 7 0 8 1 ... 46 0 47 5 48 6 49 6 50 6 51 6 52 6 53 6 54 6 55 6 56 7 57 7 58 7 59 7 60 7 61 7 62 7 63 7
Run the display qos map-table exp-lp command on the PEs to check the mapping from EXP priorities to local priorities. The display on PE1 is used as an example.
[PE1] display qos map-table exp-lp Input EXP LP ------------------- 0 1 1 1 2 2 3 3 4 4 5 0 6 6 7 7
- Configure the scheduling mode for CTs.
# Configure PE1.
[PE1] qos queue-profile queue-profile1 [PE1-qos-queue-profile-queue-profile1] schedule wfq 0 to 1 pq 2 to 7 [PE1-qos-queue-profile-queue-profile1] quit [PE1] interface gigabitethernet 3/0/0 [PE1-GigabitEthernet3/0/0] qos te queue-profile queue-profile1 [PE1-GigabitEthernet3/0/0] quit
# Configure P.
[P] qos queue-profile queue-profile1 [P-qos-queue-profile-queue-profile1] schedule wfq 0 to 1 pq 2 to 7 [P-qos-queue-profile-queue-profile1] quit [P] interface gigabitethernet 1/0/0 [P-GigabitEthernet1/0/0] qos te queue-profile queue-profile1 [P-GigabitEthernet1/0/0] quit [P] interface gigabitethernet 2/0/0 [P-GigabitEthernet2/0/0] qos te queue-profile queue-profile1 [P-GigabitEthernet2/0/0] quit
# Configure PE2.
[PE2] qos queue-profile queue-profile1 [PE2-qos-queue-profile-queue-profile1] schedule wfq 0 to 1 pq 2 to 7 [PE2-qos-queue-profile-queue-profile1] quit [PE2] interface gigabitethernet 3/0/0 [PE2-GigabitEthernet3/0/0] qos te queue-profile queue-profile1 [PE2-GigabitEthernet3/0/0] quit
# After completing the configuration, run the display qos queue-profile command on PEs to view the information about queue profiles.
The display on PE1 is used as an example.
[PE1] display qos queue-profile queue-profile1 Queue-profile: queue-profile1 Queue Schedule Weight Length(Bytes/Packets) GTS(CIR/CBS) ----------------------------------------------------------------- 0 WFQ 10 -/- -/- 1 WFQ 10 -/- -/- 2 PQ - -/- -/- 3 PQ - -/- -/- 4 PQ - -/- -/- 5 PQ - -/- -/- 6 PQ - -/- -/- 7 PQ - -/- -/-
- Configure a tunnel policy on the PE.
# Configure PE1.
[PE1] interface tunnel 0/0/1 [PE1-Tunnel0/0/1] mpls te reserved-for-binding [PE1-Tunnel0/0/1] mpls te commit [PE1-Tunnel0/0/1] quit [PE1] interface tunnel 0/0/2 [PE1-Tunnel0/0/2] mpls te reserved-for-binding [PE1-Tunnel0/0/2] mpls te commit [PE1-Tunnel0/0/2] quit [PE1] tunnel-policy policya [PE1-tunnel-policy-policya] tunnel binding destination 3.3.3.9 te tunnel 0/0/1 [PE1-tunnel-policy-policya] quit [PE1] tunnel-policy policyb [PE1-tunnel-policy-policyb] tunnel binding destination 3.3.3.9 te tunnel 0/0/2 [PE1-tunnel-policy-policyb] quit
# Configure PE2.
[PE2] interface tunnel 0/0/1 [PE2-Tunnel0/0/1] mpls te reserved-for-binding [PE2-Tunnel0/0/1] mpls te commit [PE2-Tunnel0/0/1] quit [PE2] interface tunnel 0/0/2 [PE2-Tunnel0/0/2] mpls te reserved-for-binding [PE2-Tunnel0/0/2] mpls te commit [PE2-Tunnel0/0/2] quit [PE2] tunnel-policy policya [PE2-tunnel-policy-policya] tunnel binding destination 1.1.1.9 te tunnel 0/0/1 [PE2-tunnel-policy-policya] quit [PE2] tunnel-policy policyb [PE2-tunnel-policy-policyb] tunnel binding destination 1.1.1.9 te tunnel 0/0/2 [PE2-tunnel-policy-policyb] quit
- Configure VPN instances on PEs and connect CEs to PEs.
# Configure PE1.
[PE1] ip vpn-instance VPN-A [PE1-vpn-instance-VPN-A] ipv4-family [PE1-vpn-instance-VPN-A-af-ipv4] route-distinguisher 100:1 [PE1-vpn-instance-VPN-A-af-ipv4] vpn-target 111:1 both [PE1-vpn-instance-VPN-A-af-ipv4] tnl-policy policya [PE1-vpn-instance-VPN-A-af-ipv4] quit [PE1-vpn-instance-VPN-A] quit [PE1] ip vpn-instance VPN-B [PE1-vpn-instance-VPN-B] ipv4-family [PE1-vpn-instance-VPN-B-af-ipv4] route-distinguisher 100:2 [PE1-vpn-instance-VPN-B-af-ipv4] vpn-target 222:2 both [PE1-vpn-instance-VPN-B-af-ipv4] tnl-policy policyb [PE1-vpn-instance-VPN-B-af-ipv4] quit [PE1-vpn-instance-VPN-B] quit [PE1] interface gigabitethernet 1/0/0 [PE1-GigabitEthernet1/0/0] ip binding vpn-instance VPN-A [PE1-GigabitEthernet1/0/0] ip address 10.1.1.2 24 [PE1-GigabitEthernet1/0/0] quit [PE1] interface gigabitethernet 2/0/0 [PE1-GigabitEthernet2/0/0] ip binding vpn-instance VPN-B [PE1-GigabitEthernet2/0/0] ip address 10.2.1.2 24 [PE1-GigabitEthernet2/0/0] quit
# Configure PE2.
[PE2] ip vpn-instance VPN-A [PE2-vpn-instance-VPN-A] ipv4-family [PE2-vpn-instance-VPN-A-af-ipv4] route-distinguisher 200:1 [PE2-vpn-instance-VPN-A-af-ipv4] vpn-target 111:1 both [PE2-vpn-instance-VPN-A-af-ipv4] tnl-policy policya [PE2-vpn-instance-VPN-A-af-ipv4] quit [PE2-vpn-instance-VPN-A] quit [PE2] ip vpn-instance VPN-B [PE2-vpn-instance-VPN-B] ipv4-family [PE2-vpn-instance-VPN-B-af-ipv4] route-distinguisher 200:2 [PE2-vpn-instance-VPN-B-af-ipv4] vpn-target 222:2 both [PE2-vpn-instance-VPN-B-af-ipv4] tnl-policy policyb [PE2-vpn-instance-VPN-B-af-ipv4] quit [PE2-vpn-instance-VPN-B] quit [PE2] interface gigabitethernet 1/0/0 [PE2-GigabitEthernet1/0/0] ip binding vpn-instance VPN-A [PE2-GigabitEthernet1/0/0] ip address 10.3.1.2 24 [PE2-GigabitEthernet1/0/0] quit [PE2] interface gigabitethernet 2/0/0 [PE2-GigabitEthernet2/0/0] ip binding vpn-instance VPN-B [PE2-GigabitEthernet2/0/0] ip address 10.4.1.2 24 [PE2-GigabitEthernet2/0/0] quit
# Configure IP addresses for interfaces of CEs.
# Configure CE1. The configurations of CE2, CE3, and CE4 are similar to the configuration of CE1, and are not mentioned here.
<Huawei> system-view [Huawei] sysname CE1 [CE1] interface gigabitethernet 1/0/0 [CE1-GigabitEthernet1/0/0] ip address 10.1.1.1 255.255.255.0 [CE1-GigabitEthernet1/0/0] quit
After completing the configuration, run the display ipvpn-instance verbose command on the PE to view the configuration of VPN instances.
- Create the MP-IBGP peer relationship between PEs, and create
the EBGP peer relationship between PEs and CEs.
# Configure PE1. The configuration of PE2 is similar to that of PE1. The configuration detail is not provided here.
[PE1] bgp 100 [PE1-bgp] peer 3.3.3.9 as-number 100 [PE1-bgp] peer 3.3.3.9 connect-interface loopback 1 [PE1-bgp] ipv4-family vpnv4 [PE1-bgp-af-vpnv4] peer 3.3.3.9 enable [PE1-bgp-af-vpnv4] quit [PE1-bgp] ipv4-family vpn-instance VPN-A [PE1-bgp-VPN-A] peer 10.1.1.1 as-number 65410 [PE1-bgp-VPN-A] import-route direct [PE1-bgp-VPN-A] quit [PE1-bgp] ipv4-family vpn-instance VPN-B [PE1-bgp-VPN-B] peer 10.2.1.1 as-number 65420 [PE1-bgp-VPN-B] import-route direct [PE1-bgp-VPN-B] quit
# Configure CE1. The configurations of CE2, CE3, and CE4 are similar to the configuration of CE1, and are not mentioned here.
[CE1] bgp 65410 [CE1-bgp] peer 10.1.1.2 as-number 100 [CE1-bgp] import-route direct
After completing the configuration, run the display bgp vpnv4 all peer command on the PE. The BGP peer relationship is created between PEs and its status is Established.
[PE1] display bgp vpnv4 all peer BGP local router ID : 1.1.1.9 Local AS number : 100 Total number of peers : 3 Peers in established state : 3 Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv 3.3.3.9 4 100 3 5 0 00:01:23 Established 0 Peer of IPv4-family for vpn instance : VPN-Instance VPN-A, Router ID 1.1.1.9: 10.1.1.1 4 65410 25 25 0 00:17:57 Established 1 VPN-Instance VPN-B, Router ID 1.1.1.9: 10.2.1.1 4 65420 21 22 0 00:17:10 Established 0
- Verify the configuration.
# After the configuration, connect CE1, CE2, CE3, and CE4 to port 1, port 2, port 3, and port 4 of a tester. Inject EF traffic(DSCP46) from port 1 and port 2 to port 2 and port 1 respectively, with the bandwidth being 100 Mbit/s. Inject BE traffic(DSCP0) from port 3 and port 4 to port 4 and port 3 respectively, with the bandwidth being 200 Mbit/s. All the packets are not discarded and the jitter of EF traffic is shorter than 50 ms.
Configuration Files
PE1 configuration file
# sysname PE1 # ip vpn-instance VPN-A ipv4-family route-distinguisher 100:1 tnl-policy policya vpn-target 111:1 export-extcommunity vpn-target 111:1 import-extcommunity # ip vpn-instance VPN-B ipv4-family route-distinguisher 100:2 tnl-policy policyb vpn-target 222:2 export-extcommunity vpn-target 222:2 import-extcommunity # mpls lsr-id 1.1.1.9 mpls mpls te mpls te ds-te bcm mam # qos map-table dscp-lp input 0 output 1 input 46 output 0 # qos map-table exp-lp input 0 output 1 input 5 output 0 # qos queue-profile queue-profile1 schedule wfq 0 to 1 pq 2 to 7 # interface GigabitEthernet1/0/0 ip binding vpn-instance VPN-A ip address 10.1.1.2 255.255.255.0 trust dscp # interface GigabitEthernet2/0/0 ip binding vpn-instance VPN-B ip address 10.2.1.2 255.255.255.0 trust dscp # interface GigabitEthernet3/0/0 ip address 172.1.1.1 255.255.255.0 trust dscp qos te queue-profile queue-profile1 mpls mpls te mpls te bandwidth max-reservable-bandwidth 375000 mpls te bandwidth bc0 125000 bc1 250000 # interface LoopBack1 ip address 1.1.1.9 255.255.255.255 # interface Tunnel0/0/1 description For VPN-A_EF ip address unnumbered interface LoopBack1 tunnel-protocol mpls te destination 3.3.3.9 mpls te signal-protocol cr-static mpls te tunnel-id 300 mpls te reserved-for-binding mpls te commit # interface Tunnel0/0/2 description For VPN-B_BE ip address unnumbered interface LoopBack1 tunnel-protocol mpls te destination 3.3.3.9 mpls te signal-protocol cr-static mpls te tunnel-id 301 mpls te reserved-for-binding mpls te commit # bgp 100 peer 3.3.3.9 as-number 100 peer 3.3.3.9 connect-interface LoopBack1 # ipv4-family unicast undo synchronization peer 3.3.3.9 enable # ipv4-family vpnv4 policy vpn-target peer 3.3.3.9 enable # ipv4-family vpn-instance VPN-A import-route direct peer 10.1.1.1 as-number 65410 # ipv4-family vpn-instance VPN-B import-route direct peer 10.2.1.1 as-number 65420 # 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 # static-cr-lsp ingress tunnel-interface Tunnel0/0/1 destination 3.3.3.9 nexthop 172.1.1.2 out-label 100 bandwidth ct0 100000 static-cr-lsp ingress tunnel-interface Tunnel0/0/2 destination 3.3.3.9 nexthop 172.1.1.2 out-label 200 bandwidth ct1 200000 static-cr-lsp egress VPN-A_EF incoming-interface Gigabitethernet3/0/0 in-label 101 static-cr-lsp egress VPN-B_BE incoming-interface Gigabitethernet3/0/0 in-label 201 # tunnel-policy policya tunnel binding destination 3.3.3.9 te Tunnel0/0/1 # tunnel-policy policyb tunnel binding destination 3.3.3.9 te Tunnel0/0/2 # return
P configuration file
# sysname P # mpls lsr-id 2.2.2.9 mpls mpls te mpls te ds-te bcm mam # qos map-table dscp-lp input 0 output 1 input 46 output 0 # qos map-table exp-lp input 0 output 1 input 5 output 0 # qos queue-profile queue-profile1 schedule wfq 0 to 1 pq 2 to 7 # interface GigabitEthernet1/0/0 ip address 172.1.1.2 255.255.255.0 trust exp qos te queue-profile queue-profile1 mpls mpls te mpls te bandwidth max-reservable-bandwidth 375000 mpls te bandwidth bc0 125000 bc1 250000 # interface GigabitEthernet2/0/0 ip address 172.2.1.1 255.255.255.0 trust exp qos te queue-profile queue-profile1 mpls mpls te mpls te bandwidth max-reservable-bandwidth 375000 mpls te bandwidth bc0 125000 bc1 250000 # 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 # static-cr-lsp transit VPN-A_EF-1to2 incoming-interface Gigabitethernet1/0/0 in-label 100 nexthop 172.2.1.2 out-label 100 bandwidth ct0 100000 static-cr-lsp transit VPN-B_BE-1to2 incoming-interface Gigabitethernet1/0/0 in-label 200 nexthop 172.2.1.2 out-label 200 bandwidth ct1 200000 static-cr-lsp transit VPN-A_EF-2to1 incoming-interface Gigabitethernet2/0/0 in-label 101 nexthop 172.1.1.1 out-label 101 bandwidth ct0 100000 static-cr-lsp transit VPN-B_BE-2to1 incoming-interface Gigabitethernet2/0/0 in-label 201 nexthop 172.1.1.1 out-label 201 bandwidth ct1 200000 # return
PE2 configuration file
# sysname PE2 # ip vpn-instance VPN-A ipv4-family route-distinguisher 200:1 tnl-policy policya vpn-target 111:1 export-extcommunity vpn-target 111:1 import-extcommunity # ip vpn-instance VPN-B ipv4-family route-distinguisher 200:2 tnl-policy policyb vpn-target 222:2 export-extcommunity vpn-target 222:2 import-extcommunity # mpls lsr-id 3.3.3.9 mpls mpls te mpls te ds-te bcm mam # qos map-table dscp-lp input 0 output 1 input 46 output 0 # qos map-table exp-lp input 0 output 1 input 5 output 0 # qos queue-profile queue-profile1 schedule wfq 0 to 1 pq 2 to 7 # interface GigabitEthernet1/0/0 ip binding vpn-instance VPN-A ip address 10.3.1.2 255.255.255.0 trust dscp # interface GigabitEthernet2/0/0 ip binding vpn-instance VPN-B ip address 10.4.1.2 255.255.255.0 trust dscp # interface GigabitEthernet3/0/0 ip address 172.2.1.2 255.255.255.0 trust dscp qos te queue-profile queue-profile1 mpls mpls te mpls te bandwidth max-reservable-bandwidth 375000 mpls te bandwidth bc0 125000 bc1 250000 # interface LoopBack1 ip address 3.3.3.9 255.255.255.255 # interface Tunnel0/0/1 description For VPN-A_EF ip address unnumbered interface LoopBack1 tunnel-protocol mpls te destination 1.1.1.9 mpls te signal-protocol cr-static mpls te tunnel-id 300 mpls te reserved-for-binding mpls te commit # interface Tunnel0/0/2 description For VPN-B_BE ip address unnumbered interface LoopBack1 tunnel-protocol mpls te destination 1.1.1.9 mpls te signal-protocol cr-static mpls te tunnel-id 301 mpls te reserved-for-binding mpls te commit # bgp 100 peer 1.1.1.9 as-number 100 peer 1.1.1.9 connect-interface LoopBack1 # ipv4-family unicast undo synchronization peer 1.1.1.9 enable # ipv4-family vpnv4 policy vpn-target peer 1.1.1.9 enable # ipv4-family vpn-instance VPN-A import-route direct peer 10.3.1.1 as-number 65430 # ipv4-family vpn-instance VPN-B import-route direct peer 10.4.1.1 as-number 65440 # 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 # static-cr-lsp egress VPN-A_EF incoming-interface Gigabitethernet3/0/0 in-label 100 static-cr-lsp egress VPN-B_BE incoming-interface Gigabitethernet3/0/0 in-label 200 static-cr-lsp ingress tunnel-interface Tunnel0/0/1 destination 1.1.1.9 nexthop 172.2.1.1 out-label 101 bandwidth ct0 100000 static-cr-lsp ingress tunnel-interface Tunnel0/0/2 destination 1.1.1.9 nexthop 172.2.1.1 out-label 201 bandwidth ct1 200000 # tunnel-policy policya tunnel binding destination 1.1.1.9 te Tunnel0/0/1 # tunnel-policy policyb tunnel binding destination 1.1.1.9 te Tunnel0/0/2 # return
CE1 configuration file
# sysname CE1 # interface GigabitEthernet1/0/0 ip address 10.1.1.1 255.255.255.0 # bgp 65410 peer 10.1.1.2 as-number 100 # ipv4-family unicast undo synchronization import-route direct peer 10.1.1.2 enable # return
CE2 configuration file
# sysname CE2 # interface GigabitEthernet1/0/0 ip address 10.2.1.1 255.255.255.0 # bgp 65420 peer 10.2.1.2 as-number 100 # ipv4-family unicast undo synchronization import-route direct peer 10.2.1.2 enable # return
CE3 configuration file
# sysname CE3 # interface GigabitEthernet1/0/0 ip address 10.3.1.1 255.255.255.0 # bgp 65430 peer 10.3.1.2 as-number 100 # ipv4-family unicast undo synchronization import-route direct peer 10.3.1.2 enable # return
CE4 configuration file
# sysname CE4 # interface GigabitEthernet1/0/0 ip address 10.4.1.1 255.255.255.0 # bgp 65440 peer 10.4.1.2 as-number 100 # ipv4-family unicast undo synchronization import-route direct peer 10.4.1.2 enable # return