252
[Spoke-PE2-GigabitEthernet1/1/1] ip binding vpn-instance vpn1
[Spoke-PE2-GigabitEthernet1/1/1] ip address 10.2.1.2 24
[Spoke-PE2-GigabitEthernet1/1/1] quit
# Configure Hub-PE.
[Hub-PE] ip vpn-instance vpn1-in
[Hub-PE-vpn-instance-vpn1-in] route-distinguisher 100:3
[Hub-PE-vpn-instance-vpn1-in] vpn-target 222:2 import-extcommunity
[Hub-PE-vpn-instance-vpn1-in] quit
[Hub-PE] ip vpn-instance vpn1-out
[Hub-PE-vpn-instance-vpn1-out] route-distinguisher 100:4
[Hub-PE-vpn-instance-vpn1-out] vpn-target 111:1 export-extcommunity
[Hub-PE-vpn-instance-vpn1-out] quit
[Hub-PE] interface gigabitethernet 1/1/1
[Hub-PE-GigabitEthernet1/1/1] ip binding vpn-instance vpn1-in
[Hub-PE-GigabitEthernet1/1/1] ip address 10.3.1.2 24
[Hub-PE-GigabitEthernet1/1/1] quit
[Hub-PE] interface gigabitethernet 1/1/2
[Hub-PE-GigabitEthernet1/1/2] ip binding vpn-instance vpn1-out
[Hub-PE-GigabitEthernet1/1/2] ip address 10.4.1.2 24
[Hub-PE-GigabitEthernet1/1/2] quit
# Configure IP addresses for the CEs according to
. (Details not shown.)
# Execute the
display ip vpn-instance
command on the PEs to display the configuration of the
VPN instance, for example, on Spoke-PE 1.
[Spoke-PE1] display ip vpn-instance
Total VPN-Instances configured : 1
VPN-Instance Name RD Create time
vpn1 100:1 2009/04/08 10:55:07
# Use the
ping
command on the PEs to verify that the PEs can ping their attached CEs, for
example, on Spoke-PE 1.
[Spoke-PE1] ping -vpn-instance vpn1 10.1.1.1
Ping 10.1.1.1 (10.1.1.1): 56 data bytes, press CTRL_C to break
56 bytes from 10.1.1.1: icmp_seq=0 ttl=128 time=1.913 ms
56 bytes from 10.1.1.1: icmp_seq=1 ttl=128 time=2.381 ms
56 bytes from 10.1.1.1: icmp_seq=2 ttl=128 time=1.707 ms
56 bytes from 10.1.1.1: icmp_seq=3 ttl=128 time=1.666 ms
56 bytes from 10.1.1.1: icmp_seq=4 ttl=128 time=2.710 ms
--- Ping statistics for 10.1.1.1 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 1.666/2.075/2.710/0.406 ms
4.
Establish EBGP peer relationships between the PEs and CEs, and redistribute VPN routes into
BGP:
# Configure Spoke-CE 1.
<Spoke-CE1> system-view
[Spoke-CE1] bgp 65410
[Spoke-CE1-bgp-default] peer 10.1.1.2 as-number 100
[Spoke-CE1-bgp-default] address-family ipv4