SGS-6340 Series User Manual

Table Of Contents
26.5.5 Configuration Examples of OSPF VPN
Figure 26-7 OSPF VPN Example
The above figure shows that 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
VLAN1 and VLAN2. The routing messages are exchanged between PE and CE through OSPF
protocol.
a) SwitchA, the Layer 3 switch as PE
Configure VPN route/transmitting examples 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 1 and 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
Configure OSPF examples associated with vpnb and vpnc respectively
SwitchA(config)#
SwitchA(config)#router ospf 100 vpnb
Interface
vlan1:10.1.1.
1/24
Interface
SWITCHB
vlan1:10.1.1.
2/24
SWITCHC
SWITCHA
Interface Interface
vlan2:20.1.1.1/24 vlan1:20.1.1.2/24
26-43