525
# Configure the subinterface to terminate VLAN 20.
[MCE-GigabitEthernet1/1/3.2] vlan-type dot1q vid 20
# Configure an IP address for the subinterface.
[MCE-GigabitEthernet1/1/3.2] ip address 30.1.1.1 24
[MCE-GigabitEthernet1/1/3.2] quit
# On PE 1, bind subinterface GigabitEthernet 1/1/1.1 to the VPN instance
vpn1
.
[PE1] interface gigabitethernet 1/1/1.1
[PE1-GigabitEthernet1/1/1.1] ip binding vpn-instance vpn1
# Configure the subinterface to terminate VLAN 10.
[PE1-GigabitEthernet1/1/1.1] vlan-type dot1q vid 10
# Configure an IP address for the subinterface.
[PE1-GigabitEthernet1/1/1.1] ip address 20.1.1.2 24
[PE1-GigabitEthernet1/1/1.1] quit
# On PE 1, bind subinterface GigabitEthernet 1/1/1.2 to the VPN instance
vpn2
.
[PE1] interface gigabitethernet 1/1/1.2
[PE1-GigabitEthernet1/1/1.2] ip binding vpn-instance vpn2
# Configure the subinterface to terminate VLAN 20.
[PE1-GigabitEthernet1/1/1.2] vlan-type dot1q vid 20
# Configure an IP address for the subinterface.
[PE1-GigabitEthernet1/1/1.2] ip address 30.1.1.2 24
[PE1-GigabitEthernet1/1/1.2] quit
# Configure the IP address of the interface Loopback 0 as 101.101.10.1 for the MCE and as
100.100.10.1 for PE 1. Specify the loopback interface address as the router ID for the MCE and
PE 1. (Details not shown.)
# Enable OSPF process 10 on the MCE, and bind the process to VPN instance
vpn1
.
[MCE] ospf 10 router-id 101.101.10.1 vpn-instance vpn1
# Disable OSPF routing loop detection for the VPN instance.
[MCE-ospf-10] vpn-instance-capability simple
# Set the domain ID to 10.
[MCE-ospf-10] domain-id 10
# Advertise subnet 20.1.1.0/24 in area 0, and redistribute the static route of VPN 1.
[MCE-ospf-10] area 0
[MCE-ospf-10-area-0.0.0.0] network 20.1.1.0 0.0.0.255
[MCE-ospf-10-area-0.0.0.0] quit
[MCE-ospf-10] import-route static
# On PE 1, enable OSPF process 10, and bind the process to VPN instance
vpn1
.
[PE1] ospf 10 router-id 100.100.10.1 vpn-instance vpn1
# Set the domain ID to 10.
[PE1-ospf-10] domain-id 10
# Advertise subnet 20.1.1.0/24 in area 0.
[PE1-ospf-10] area 0
[PE1-ospf-10-area-0.0.0.0] network 20.1.1.0 0.0.0.255
[PE1-ospf-10-area-0.0.0.0] quit
[PE1-ospf-10] quit
# Configure OSPF process 20 between MCE and PE 1, and redistribute routes from RIP
process 20 into OSPF. (Details not shown.)