User's Manual

499
Switch_config_ospf_1#exit
Switch_config# router ospf 2 vrf vpn2
Switch_config_ospf_2# network 46.0.0.0 255.0.0.0 area 0
Switch_config_ospf_2# redistribute bgp 300
Switch_config_ospf_2# exit
Configure the EBGP route between PE and CE.
Switch_config# router bgp 300
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 31.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 32.0.0.1 remote-as 200
Switch_config_bgp_vpn2# exit-address-family
Switch_config_bgp# exit
Create VLAN.
Switch_config# vlan 1,31-32,41,46
Enables the forwarding of subnet route of the switch.
Switch_config# ip exf
69.5 Setting S22
Set the VLAN attributes of the physical interface of CE, and connect S22 and S2 through interface f0/1:
Switch_config# interface gigaEthernet 0/1
Switch_config_g0/1# switchport pvid 46
Switch_config_g0/1# exit
Sets the IP address and the VLAN interface.
Switch_config# interface VLAN46
Switch_config_v46# ip address 46.0.0.2 255.0.0.0
Switch_config_v46# exit
Set the routing protocol between CE and customer's device:
Switch_config# router ospf 103
Switch_config_ospf_103# network 46.0.0.0 255.0.0.0 area 0
Switch_config_ospf_103# exit
69.6 Testifying VRF Connectivity
Run the PING command on S1 to testify the connectivity of VPN1 between S1 and S11:
Switch# ping -vrf vpn1 11.0.0.2
!!!!!
--- 11.0.0.2 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss