Inter-AS BGP/MPLS IP VPN Option-A Setup and Configuration on Huawei Routers

Inter-AS BGP/MPLS IP VPN Option-A Setup and Configuration on Huawei Routers

Service provider networks always have different ASes interconnected to each other and need to ensure there communication among the ASes. This can be achieved by implementing Inter-AS BGP MPLS VPN. There are three flavors of Inter-AS BGP MPLS VPNs, Options A, B, and C.

In this article, we focus on OPTION-A and its implementation on Huawei routers

Key Features BGP MPLS VPN Option-A:

  • No MPLS between the two ASBRs, IP routing is used between the ASBRs.
  • Either of the ASBR PEs takes the peer ASBR as its CE and advertises IPV4 routes to the peer ASBR through EBGP.
  • ASBR routers keep all the VRF routes for customers who require Inter AS services hence high memory usage.
  • Has poor scalability because ASBRs manage all VPN routes and create VPN instances for each VPN, each inter-AS VPN requires a different interface (physical interface, subinterfaces, or bound logical interface)
  • Preferred when the number of inter-AS VPNs is small.

The Objective: The objective of this lab is to ensure customers in the same VPN can communicate, CE1 should be able to reach CE2 in VPN A, and CE3 should be able to reach CE4 in VPNB.

INTER_AS EBGP Option-A Configuration Steps:

  1. Configure system name, and IP address of interfaces on CEs
------------------------------------CE01---------------------------
sys
sysname CE1
#
interface GigabitEthernet0/0/0
 ip address 192.168.0.1 255.255.255.252
#
interface LoopBack0
 ip address 5.5.5.5 255.255.255.255
#
-----------------------------------CE02---------------------------
sys
sysname CE2
#
interface GigabitEthernet0/0/0
 ip address 172.31.0.2 255.255.255.252
#
interface LoopBack0
 ip address 6.6.6.6 255.255.255.255
#
---------------------------------CE03---------------------------
sys
sysname CE3
#
interface GigabitEthernet0/0/0
 ip address 192.168.0.5 255.255.255.252
#
interface LoopBack0
 ip address 7.7.7.7 255.255.255.255
#
------------------------------CE04-------------------------------

sys
sysname CE4
#
interface GigabitEthernet0/0/0
 ip address 172.31.0.5 255.255.255.252
#
interface LoopBack0
 ip address 8.8.8.8 255.255.255.255
#

2. Configure interface IPs and IGP on PEs and ASBR, we use OSPF as our IGP.

-----------------------------------PE01----------------------------
ospf 10 router-id 1.1.1.1
 area 0.0.0.0
#
interface LoopBack0
 ip address 1.1.1.1 255.255.255.255
 ospf enable 10 area 0.0.0.0
#
interface GigabitEthernet0/0/1
 ip address 10.10.10.1 255.255.255.252
 ospf network-type p2p
 ospf enable 10 area 0.0.0.0
#
-----------------------------------PE02-------------------------------
ospf 10 router-id 4.4.4.4
 area 0.0.0.0
#
interface GigabitEthernet0/0/0
 ip address 10.10.20.2 255.255.255.252
 ospf network-type p2p
 ospf enable 10 area 0.0.0.0
#
interface LoopBack0
 ip address 4.4.4.4 255.255.255.255
 ospf enable 10 area 0.0.0.0
#
-----------------------------------ASBR01-------------------------------
ospf 10 router-id 2.2.2.2
 area 0.0.0.0
#
interface LoopBack0
 ip address 2.2.2.2 255.255.255.255
 ospf enable 10 area 0.0.0.0
#
interface GigabitEthernet0/0/0
 ip address 10.10.10.2 255.255.255.252
 ospf network-type p2p
 ospf enable 10 area 0.0.0.0
#
-------------------------------------ASBR02----------------------------
ospf 10 router-id 3.3.3.3
 area 0.0.0.0
#
interface LoopBack0
 ip address 3.3.3.3 255.255.255.255
 ospf enable 10 area 0.0.0.0
#
interface GigabitEthernet0/0/0
 ip address 10.10.20.1 255.255.255.252
 ospf network-type p2p
 ospf enable 10 area 0.0.0.0
#

3. Configure MPLS and LDP on PEs and ASBRs, enable MPLS and LDP on interfaces between PEs and ASBRs

----------------------PE01----------------------
mpls lsr-id 1.1.1.1
mpls
#
mpls ldp
#
quit
#
interface GigabitEthernet 0/0/1
mpls
mpls ldp
#
--------------------ASBR01----------------------
mpls lsr-id 2.2.2.2
mpls
#
mpls ldp
#
interface GigabitEthernet0/0/0
mpls
mpls ldp
#
--------------------ASBR02-------------------
mpls lsr-id 3.3.3.3
mpls
#
mpls ldp
#
interface GigabitEthernet0/0/0
mpls
mpls ldp
#
----------------------PE02-------------------
mpls lsr-id 4.4.4.4
mpls
#
mpls ldp
#
interface GigabitEthernet0/0/0
mpls
mpls ldp
#

4. Configure MP-IBGP between PE01 and ASBR01 and between PE02 and ASBR02

--------------------------PE01--------------------
bgp 100
 peer 2.2.2.2 as-number 100
 peer 2.2.2.2 connect-interface LoopBack0
 ipv4-family unicast
  undo synchronization
  peer 2.2.2.2 enable
 ipv4-family vpnv4
  policy vpn-target
  peer 2.2.2.2 enable
 #
-------------------------ASBR01---------------------
bgp 100
 peer 1.1.1.1 as-number 100
 peer 1.1.1.1 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  peer 1.1.1.1 enable
 #
 ipv4-family vpnv4
  policy vpn-target
  peer 1.1.1.1 enable
 #
-------------------------PE02-----------------------------
bgp 200
 peer 3.3.3.3 as-number 200
 peer 3.3.3.3 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  peer 3.3.3.3 enable
 #
 ipv4-family vpnv4
  policy vpn-target
  peer 3.3.3.3 enable
 #
--------------------------ASBR02---------------------------
bgp 200
 peer 4.4.4.4 as-number 200
 peer 4.4.4.4 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  peer 4.4.4.4 enable
 #
 ipv4-family vpnv4
  policy vpn-target
  peer 4.4.4.4 enable
 #

5. Configure VPN instances VPNA and VPNB on PEs and ASBRs. Define RDs and RTs

ip vpn-instance VPN
 ipv4-family
  route-distinguisher 100:1
  vpn-target 1:1 export-extcommunity
  vpn-target 1:1 import-extcommunity
#
ip vpn-instance VPNB
 ipv4-family
  route-distinguisher 200:1
  vpn-target 2:1 export-extcommunity
  vpn-target 2:1 import-extcommunity
#

6. Bind the Interfaces connecting to CEs on PEs and interfaces between ASBRs to respective VPN instances. Note: Reconfigure IPs after binding VRFs.

-------------------------------PE01---------------------------------
interface GigabitEthernet0/0/0
 ip binding vpn-instance VPNA
 ip address 192.168.0.2 255.255.255.252
#
interface GigabitEthernet0/0/2
 ip binding vpn-instance VPNB
 ip address 192.168.0.6 255.255.255.252
#
-------------------------------PE02---------------------------------------
interface GigabitEthernet0/0/1
 ip binding vpn-instance VPNA
 ip address 172.31.0.1 255.255.255.252
#
interface GigabitEthernet0/0/2
 ip binding vpn-instance VPNB
 ip address 172.31.0.6 255.255.255.252
#
------------------------------------ASBR01----------------------------------
interface GigabitEthernet0/0/1
 ip binding vpn-instance VPNA
 ip address 20.20.20.1 255.255.255.252
#

interface GigabitEthernet0/0/2
 ip binding vpn-instance VPNB
 ip address 20.20.20.6 255.255.255.252
#
---------------------------------------ASBR02-------------------------------
interface GigabitEthernet0/0/1
 ip binding vpn-instance VPNA
 ip address 20.20.20.2 255.255.255.252
#
interface GigabitEthernet0/0/2
 ip binding vpn-instance VPNB
 ip address 20.20.20.5 255.255.255.252
#

7. Configure EBGP in the VPN instances between PEs and CEs

-----------------------CE01----------------------
bgp 65500
 peer 192.168.0.2 as-number 100
 ipv4-family unicast
  undo synchronization
  import-route direct
  peer 192.168.0.2 enable
#
----------------------CE02----------------------
bgp 65500
 peer 172.31.0.1 as-number 200
 #
 ipv4-family unicast
  undo synchronization
  import-route direct
  peer 172.31.0.1 enable
#
-----------------------CE03-----------------------
bgp 300
 peer 192.168.0.6 as-number 100
 #
 ipv4-family unicast
  undo synchronization
  import-route direct
  peer 192.168.0.6 enable
#
-------------------------CE04----------------------
bgp 400
 peer 172.31.0.6 as-number 200
 #
 ipv4-family unicast
  undo synchronization
  network 8.8.8.8 255.255.255.255
  peer 172.31.0.6 enable
#

---------------------PE01---------------------------------
bgp 100
 ipv4-family vpn-instance VPN
  peer 192.168.0.1 as-number 65505
 #
 ipv4-family vpn-instance VPNB
  peer 192.168.0.5 as-number 300
#
-----------------------PE02---------------------------------
bgp 200
ipv4-family vpn-instance VPN
  peer 172.31.0.2 as-number 65500
 #
 ipv4-family vpn-instance VPNB
  peer 172.31.0.5 as-number 400
#

8. Configure EBGP in the VPN instances between ASBRs

------------------------------------ASBR01-------------------
bgp 100
 ipv4-family vpn-instance VPNA
  peer 20.20.20.2 as-number 200
 #
 ipv4-family vpn-instance VPNB
  peer 20.20.20.5 as-number 200
#
-----------------------------------ASBR02-------------------------
bgp 200
 ipv4-family vpn-instance VPNA
  peer 20.20.20.1 as-number 100
 #
 ipv4-family vpn-instance VPNB
  peer 20.20.20.6 as-number 100
#

9. Verify the communication between CEs in the same VPN instances.

Leave your comments in the comments section.



2 Comments

Leave a Reply

This website uses cookies and asks your personal data to enhance your browsing experience.