29
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
192.168.0.0/24 OSPF 10 1 10.214.10.2 Vlan10
The output shows that the MCE has learned the private route of VPN 1 through OSPF process 10.
# On MCE, bind OSPF process 20 with VPN instance
vpn2
to learn the routes of VPN 2. The
configuration procedure is similar to that for OSPF process 10.
The following output shows that the MCE has learned the private route of VPN 2 through OSPF:
[MCE] display ip routing-table vpn-instance vpn2
Routing Tables: vpn2
Destinations : 5 Routes : 5
Destination/Mask Proto Pre Cost NextHop Interface
10.214.20.0/24 Direct 0 0 10.214.20.3 Vlan20
10.214.20.3/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
192.168.0.0/24 OSPF 10 1 10.214.20.2 Vlan20
3.
Configure routing between the MCE and PE 1:
# Configure the connecting ports between the MCE and PE 1 as trunk ports. The configuration
procedure is similar to that described in "
Using OSPF to advertise VPN routes to the PE
." (Details
not shown.)
# Start BGP process 100 on the MCE, and enter the IPv4 address family view of VPN instance
vpn1
.
[MCE] bgp 100
[MCE-bgp] ipv4-family vpn-instance vpn1
# Specify PE 1 as the EBGP peer of the MCE, and redistribute the routing information of OSPF
process 10. (The IP address of PE 1’s interface bound with VPN instance
vpn1
is 10.100.10.3,
and the BGP process is 200.)
[MCE-bgp-vpn1] peer 30.1.1.2 as-number 200
[MCE-BGP-vpn1] import-route ospf 10
# On PE 1, configure BGP process 200 and specify the MCE as its EBGP peer.
<PE1> system-view
[PE1] bgp 200
[PE1-bgp] ipv4-family vpn-instance vpn1
[PE1-bgp-vpn1] peer 30.1.1.1 as-number 100
[PE1-bgp-vpn1] quit
[PE1-bgp] quit
# On PE 1, display the routing information of VPN instance
vpn1
.
[PE1] display ip routing-table vpn-instance vpn1
Routing Tables: vpn1
Destinations : 5 Routes : 5
Destination/Mask Proto Pre Cost NextHop Interface
30.1.1.0/24 Direct 0 0 30.1.1.2 Vlan30
30.1.1.2/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0