User's Manual

496
Switch_config# router ospf 1 vrf vpn1
Switch_config_ospf_1# network 11.0.0.0 255.0.0.0 area 0
Switch_config_ospf_1# redistribute bgp 100
Switch_config_ospf_1#exit
Switch_config# router ospf 2 vrf vpn2
Switch_config_ospf_2# network 15.0.0.0 255.0.0.0 area 0
Switch_config_ospf_2# redistribute bgp 100
Switch_config_ospf_2#exit
Configure the EBGP route between PE and CE.
Switch_config# router bgp 100
Switch_config_bgp# bgp log-neighbor-changes
Switch_config_bgp# address-family ipv4 vrf vpn1
Switch_config_bgp_vpn1# no synchronization
Switch_config_bgp_vpn1# redistribute ospf 1
Switch_config_bgp_vpn1# neighbor 21.0.0.1 remote-as 200
Switch_config_bgp_vpn1# exit-address-family
Switch_config_bgp# address-family ipv4 vrf vpn2
Switch_config_bgp_vpn2# no synchronization
Switch_config_bgp_vpn2# redistribute ospf 2
Switch_config_bgp_vpn2# neighbor 22.0.0.1 remote-as 200
Switch_config_bgp_vpn2# exit-address-family
Switch_config_bgp# exit
Create VLAN.
Switch_config# vlan 1,11-12,21-22
Enables the forwarding of subnet route of the switch.
Switch_config# ip exf
69.3 Configuring PE
Set VRF on PE:
Switch#config
Switch_config# ip vrf vpn1
Switch_config_vrf_vpn1# rd 200:1
Switch_config_vrf_vpn1# route-target export 200:1
Switch_config_vrf_vpn1# route-target import 200:1
Switch_config_vrf_vpn1# exit
Switch_config# ip vrf vpn2
Switch_config_vrf_vpn2# rd 200:2
Switch_config_vrf_vpn2# route-target export 200:2
Switch_config_vrf_vpn2# route-target import 200:2
Switch_config_vrf_vpn2# exit
Set the loopback interface as the router identifier:
Switch_config# interface loopback 0
Switch_config_l0# ip address 102.0.0.1 255.255.255.255
Switch_config_l0# exit
Set the physical interface which connects PE and CE: G1/1 and G1/2 connect S1 and S2 respectively: