379
In the figure shown above, a network consists of three Layer 3 switches, in which the
SwitchA as PE, SwitchB and SwitchC as CE1 and CE2. The PE is connected to CE1 and
CE2 through vlan 1 and vlan 2. The routing messages are exchanged between PE and
CE through RIP protocol.
a) SwitchA
Configures the VPN route/transmit example vpnb and vpnc
SwitchA#config
SwitchA(config)#ip vrf vpnb
SwitchA(config-vrf)#
SwitchA(config-vrf)#exit
SwitchA#(config)
SwitchA(config)#ip vrf vpnc
SwitchA(config-vrf)#
SwitchA(config-vrf)#exit
associate the vlan 1and vlan 2 respectively with vpnb and vpnc while configuring IP
address
SwitchA(config)#in vlan1
SwitchA(config-if-Vlan1)#ip vrf forwarding vpnb
SwitchA(config-if-Vlan1)#ip address 10.1.1.1 255.255.255.0
SwitchA(config-if-Vlan1)#exit
SwitchA(config)#in vlan2
SwitchA(config-if-Vlan2)#ip vrf forwarding vpnc
SwitchA(config-if-Vlan2)#ip address 20.1.1.1 255.255.255.0
SwitchA(config-if-Vlan2)#exit
Configures the RIP examples associated with vpnb and vpnc respectively
SwitchA(config)#
SwitchA(config)#router rip
SwitchA(config-router)#address-family ipv4 vrf vpnb
SwitchA(config-router-af)#redistribute bgp
SwitchA(config-router-af)#network Vlan1
SwitchA(config-router-af)#exit-address-family
SwitchA(config-router)#address-family ipv4 vrf vpnc
SwitchA(config-router-af)#redistribute bgp
SwitchA(config-router-af)#network Vlan2
SwitchA(config-router-af)#exit-address-family
SwitchA(config-router)#
b) SwitchB
configure the IP address of Ethernet port E 0/0/2
SwitchB#config