Deploying Multi-VRF MPLS L3VPN on Huawei AR2240 Routers

In this hands-on lab guide, we deploy a multi-tenant MPLS L3VPN backbone on Huawei AR2240 routers running VRP (V200R003C00), isolating two customer VPN instances across a shared OSPF + LDP core.

If you want to compare this enterprise/SP router deployment against an open-source software stack, check out our companion Linux walkthrough: Building an MPLS L3VPN Backbone on Debian Linux with FRRouting (FRR).

Lab Topology & Addressing Plan

Huawei AR2240 MPLS L3VPN topology showing AS 65000 core (AR1/AR3 PE, AR2 P, AR8 Route Reflector) serving isolated VRF green (AS 65001) and VRF red (AS 65002) sites
Figure 1: Multi-VRF MPLS L3VPN lab topology on Huawei AR2240 routers (AS 65000 core with VRF green and VRF red).

The service provider core runs in AS 65000 with AR1 (PE), AR2 (P), AR3 (PE), and an out-of-path Route Reflector AR8 (10.0.0.10) over OSPF Area 0 and MPLS LDP. Customer sites are partitioned into two isolated VPN instances: VRF green (AS 65001, RD/RT 65001:100) and VRF red (AS 65002, RD/RT 65002:100).

1. Underlay Verification: OSPF Adjacencies & MPLS LDP LSPs

After configuring interface addressing, OSPF Area 0, and MPLS LDP across the VPNv4 core domain, verify OSPF neighbor states, LDP sessions, and label bindings on core P router AR2:

<AR2-P>display ospf peer brief 

	 OSPF Process 1 with Router ID 10.0.0.2
		  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.0          GigabitEthernet4/0/1             10.0.0.3         Full        
 0.0.0.0          GigabitEthernet4/0/2             10.0.0.1         Full        
 0.0.0.0          GigabitEthernet4/0/3             10.0.0.10        Full        
 ----------------------------------------------------------------------------
<AR2-P>dis mpls ldp session 

 LDP Session(s) in Public Network
 Codes: LAM(Label Advertisement Mode), SsnAge Unit(DDDD:HH:MM)
 A '*' before a session means the session is being deleted.
 ------------------------------------------------------------------------------
 PeerID             Status      LAM  SsnRole  SsnAge      KASent/Rcv
 ------------------------------------------------------------------------------
 10.0.0.1:0         Operational DU   Active   0000:00:03  14/14
 10.0.0.3:0         Operational DU   Passive  0000:00:03  14/14
 10.0.0.10:0        Operational DU   Passive  0000:00:03  14/14
 ------------------------------------------------------------------------------
 TOTAL: 3 session(s) Found.
<AR2-P>display mpls lsp
-------------------------------------------------------------------------------
                 LSP Information: LDP LSP
-------------------------------------------------------------------------------
FEC                In/Out Label  In/Out IF                      Vrf Name       
10.0.0.3/32        NULL/3        -/GE4/0/1                                     
10.0.0.3/32        1024/3        -/GE4/0/1                                     
10.0.0.2/32        3/NULL        -/-                                           
10.0.0.1/32        NULL/3        -/GE4/0/2                                     
10.0.0.1/32        1025/3        -/GE4/0/2                                     
10.0.0.10/32       NULL/3        -/GE4/0/3                                     
10.0.0.10/32       1026/3        -/GE4/0/3                                     

With OSPF adjacencies Full and LDP transport LSPs operational end to end, we can configure the MP-BGP VPNv4 control plane.

2. Configuring Route Reflector AR8 (Critical VRP Gotchas)

Configure AR8 (Loopback 10.0.0.10) as the iBGP VPNv4 Route Reflector for PE routers AR1 (10.0.0.1) and AR3 (10.0.0.3):

[AR8-RR-bgp]dis this
[V200R003C00]
#
bgp 65000
 undo default ipv4-unicast
 peer 10.0.0.1 as-number 65000 
 peer 10.0.0.1 connect-interface LoopBack0
 peer 10.0.0.3 as-number 65000 
 peer 10.0.0.3 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  peer 10.0.0.1 enable
  peer 10.0.0.1 reflect-client
  peer 10.0.0.1 advertise-community
  peer 10.0.0.3 enable
  peer 10.0.0.3 reflect-client
  peer 10.0.0.3 advertise-community
 # 
 ipv4-family vpnv4
  undo policy vpn-target
  peer 10.0.0.1 enable
  peer 10.0.0.1 reflect-client
  peer 10.0.0.1 advertise-community
  peer 10.0.0.3 enable
  peer 10.0.0.3 reflect-client
  peer 10.0.0.3 advertise-community

Two critical Huawei VRP details to watch out for:

  • Explicit advertise-community: Without this command, VRP will not propagate inet-vpnv4 extended communities (Route Targets) to RR clients, causing remote PEs to receive zero usable VRF routes.
  • undo policy vpn-target on the RR: Because a dedicated Route Reflector typically does not instantiate customer VRFs locally, VRP’s default VPN target filter will silently drop incoming VPNv4 routes unless disabled with undo policy vpn-target.

3. Configuring PE Routers (AR1 / AR3): VRFs, MP-BGP & substitute-as

On both PE routers (AR1 and AR3), define the green and red VPN instances, bind the CE-facing interfaces, and configure per-VRF eBGP peerings with substitute-as:

<AR1-PE>dis current-configuration
[V200R003C00]
#
ip vpn-instance green
 ipv4-family
  route-distinguisher 65001:100
  vpn-target 65001:100 export-extcommunity
  vpn-target 65001:100 import-extcommunity
#
ip vpn-instance red
 ipv4-family
  route-distinguisher 65002:100
  vpn-target 65002:100 export-extcommunity
  vpn-target 65002:100 import-extcommunity
#
interface GigabitEthernet4/0/0
 ip binding vpn-instance green
 ip address 10.1.0.1 255.255.255.0 
#
interface GigabitEthernet4/0/2
 ip binding vpn-instance red
 ip address 10.2.0.1 255.255.255.0 
#
bgp 65000
 undo default ipv4-unicast
 peer 10.0.0.10 as-number 65000 
 peer 10.0.0.10 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  peer 10.0.0.10 enable
  peer 10.0.0.10 advertise-community
 # 
 ipv4-family vpnv4
  policy vpn-target
  peer 10.0.0.10 enable
  peer 10.0.0.10 advertise-community
 #
 ipv4-family vpn-instance green 
  peer 10.1.0.2 as-number 65001 
  peer 10.1.0.2 substitute-as
 #
 ipv4-family vpn-instance red 
  peer 10.2.0.2 as-number 65002 
  peer 10.2.0.2 substitute-as

Enabling substitute-as replaces the originating customer ASN in the AS_PATH with the provider’s own ASN (65000). This prevents CE routers sharing the same ASN across sites (such as AS 65001 at both ends of VRF green) from rejecting remote prefixes due to BGP’s AS_PATH loop-prevention check—identical in function to Cisco’s as-override.

<AR3-PE>dis current-configuration 
[V200R003C00]
#
ip vpn-instance green
 ipv4-family
  route-distinguisher 65001:100
  vpn-target 65001:100 export-extcommunity
  vpn-target 65001:100 import-extcommunity
#
ip vpn-instance red
 ipv4-family
  route-distinguisher 65002:100
  vpn-target 65002:100 export-extcommunity
  vpn-target 65002:100 import-extcommunity
#
interface GigabitEthernet4/0/0
 ip binding vpn-instance red
 ip address 10.3.0.1 255.255.255.0 
#
interface GigabitEthernet4/0/2
 ip binding vpn-instance green
 ip address 10.4.0.1 255.255.255.0 
#
bgp 65000
 undo default ipv4-unicast
 peer 10.0.0.10 as-number 65000 
 peer 10.0.0.10 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  peer 10.0.0.10 enable
  peer 10.0.0.10 advertise-community
 # 
 ipv4-family vpnv4
  policy vpn-target
  peer 10.0.0.10 enable
  peer 10.0.0.10 advertise-community
 #
 ipv4-family vpn-instance green 
  peer 10.4.0.2 as-number 65001 
  peer 10.4.0.2 substitute-as
 #
 ipv4-family vpn-instance red 
  peer 10.3.0.2 as-number 65002 
  peer 10.3.0.2 substitute-as

Finally, configure interface addressing and eBGP advertisement of the LAN subnets on each CE router (AR4, AR5, AR6, AR7).

4. Verifying Control-Plane & Data-Plane Isolation

Inspecting the BGP RIB on CE routers AR4 (VRF Green) and AR5 (VRF Red) confirms strict VRF separation and the rewritten AS_PATH (65000 65000 i):

<AR4-VRF-Green>dis bgp routing-table

 BGP Local router ID is 10.1.0.2 
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete


 Total Number of Routes: 2
      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn

 *>   192.168.0.0        0.0.0.0         0                     0      i
 *>   192.168.3.0        10.1.0.1                              0      65000 65000i

<AR5-VRF-Red>dis bgp routing-table 

 BGP Local router ID is 192.168.1.1 
 Status codes: * - valid, > - best, d - damped,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete


 Total Number of Routes: 2
      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn

 *>   192.168.1.0        0.0.0.0         0                     0      i
 *>   192.168.2.0        10.2.0.1                              0      65000 65000i

Next, validate end-to-end reachability within the same VRF and complete traffic isolation across VRFs from PC1 and PC2:

PC1-VRF-Green>ping 192.168.3.2

Ping 192.168.3.2: 32 data bytes, Press Ctrl_C to break
Request timeout!  <== Initial packet dropped during ARP resolution
From 192.168.3.2: bytes=32 seq=2 ttl=123 time=32 ms
From 192.168.3.2: bytes=32 seq=3 ttl=123 time=47 ms
From 192.168.3.2: bytes=32 seq=4 ttl=123 time=31 ms
From 192.168.3.2: bytes=32 seq=5 ttl=123 time=31 ms

--- 192.168.3.2 ping statistics ---
  5 packet(s) transmitted
  4 packet(s) received
  20.00% packet loss
  round-trip min/avg/max = 0/35/47 ms

PC1-VRF-Green>ping 192.168.2.2

Ping 192.168.2.2: 32 data bytes, Press Ctrl_C to break
Request timeout!
Request timeout!
Request timeout!
Request timeout!
Request timeout!

--- 192.168.2.2 ping statistics ---
  5 packet(s) transmitted
  0 packet(s) received
  100.00% packet loss
PC2-VRF-Red>ping 192.168.2.2

Ping 192.168.2.2: 32 data bytes, Press Ctrl_C to break
Request timeout!
From 192.168.2.2: bytes=32 seq=2 ttl=123 time=31 ms
From 192.168.2.2: bytes=32 seq=3 ttl=123 time=31 ms
From 192.168.2.2: bytes=32 seq=4 ttl=123 time=47 ms
From 192.168.2.2: bytes=32 seq=5 ttl=123 time=31 ms

--- 192.168.2.2 ping statistics ---
  5 packet(s) transmitted
  4 packet(s) received
  20.00% packet loss
  round-trip min/avg/max = 0/35/47 ms

PC2-VRF-Red>ping 192.168.3.2

Ping 192.168.3.2: 32 data bytes, Press Ctrl_C to break
Request timeout!
Request timeout!
Request timeout!
Request timeout!
Request timeout!

--- 192.168.3.2 ping statistics ---
  5 packet(s) transmitted
  0 packet(s) received
  100.00% packet loss

Both VRF data planes are cleanly isolated end to end, completing our Huawei AR2240 MPLS L3VPN deployment.

Key Takeaways

  • The overall MPLS L3VPN architecture on Huawei VRP mirrors Cisco IOS/IOS-XE closely, though specific defaults differ—most notably disabling VPN target filtering on dedicated RRs (undo policy vpn-target) and enabling advertise-community.
  • Engineers already fluent in Cisco IOS CLI can map Huawei VRP keywords (such as substitute-as ↔ as-override) almost 1:1.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.