<SPE>
system-view
[SPE]
bgp 100
[SPE-bgp]
peer 1.1.1.9 as-number 100
[SPE-bgp]
peer 1.1.1.9 connect-interface loopback 1
[SPE-bgp]
peer 3.3.3.9 as-number 100
[SPE-bgp]
peer 3.3.3.9 connect-interface loopback 1
[SPE-bgp]
ipv4-family vpnv4
[SPE-bgp-af-vpnv4]
peer 1.1.1.9 enable
[SPE-bgp-af-vpnv4]
peer 3.3.3.9 enable
[SPE-bgp-af-vpnv4]
quit
[SPE-bgp]
quit
# Configure PE.
<PE>
system-view
[PE]
bgp 100
[PE-bgp]
peer 2.2.2.9 as-number 100
[PE-bgp]
peer 2.2.2.9 connect-interface loopback 1
[PE-bgp]
ipv4-family vpnv4
[PE-bgp-af-vpnv4]
peer 2.2.2.9 enable
[PE-bgp-af-vpnv4]
quit
[PE-bgp]
quit
Step 5
Configure SPE.
# Configure VPN instances.
[SPE]
ip vpn-instance vpna
[SPE-vpn-instance-vpna]
ipv4-family
[SPE-vpn-instance-vpna-af-ipv4]
route-distinguisher 200:1
[SPE-vpn-instance-vpna-af-ipv4]
vpn-target 1:1
[SPE-vpn-instance-vpna-af-ipv4]
quit
[SPE-vpn-instance-vpna]
quit
# Specify a UPE for the SPE.
[SPE]
bgp 100
[SPE-bgp]
ipv4-family vpnv4
[SPE-bgp-af-vpnv4]
peer 1.1.1.9 upe
# Advertise the default route of VPN instances to UPE.
[SPE-bgp-af-vpnv4]
peer 1.1.1.9 default-originate vpn-instance vpna
[SPE-bgp-af-vpnv4]
quit
Step 6
Verify the configuration.
After the configuration, CE1 does not have a route to the network segment of the interface on
CE2, but has a default route with the next hop to UPE. The CE2 has the route to the network
segment of the interface on CE1. Therefore, CE1 and CE2 can ping through each other using
the
ping
ip-address
command.
<CE1>
display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 5 Routes : 5
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 EBGP 255 0 D 10.1.1.2
GigabitEthernet1/0/0
10.1.1.0/24 Direct 0 0 D 10.1.1.1
GigabitEthernet1/0/0
10.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
[CE1]
ping 10.2.1.1
PING 10.2.1.1: 56 data bytes, press CTRL_C to break
Reply from 10.2.1.1: bytes=56 Sequence=1 ttl=253 time=85 ms
Reply from 10.2.1.1: bytes=56 Sequence=2 ttl=253 time=70 ms
Huawei AR1200 Series Enterprise Routers
Configuration Guide - VPN
3 BGP MPLS IP VPN Configuration
Issue 01 (2012-04-20)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
212