VRF Examples


The following examples show how to create VRFs for the examples in this document. In each VRF example, a VRF instance is created and then an interface in the VRF space is created for each entity in the communication loop. An OSPF is configured for the VRF to enable routing exchanges between the two entities. You can verify the configuration by using the show ip route vrf command.

VRF for Telepresence

VRF for Individual Subscribers

VRF for Network to Network Interface

VRF for Telepresence

CUCM1

vrf definition CUCM1 // Create a VRF instance
 !
 address-family ipv4
 exit-address-family
 
   
 address-family ipv6
 exit-address-family
!
interface SBC24 // Create an interface in the VRF space
 vrf forwarding CUCM1
 ip address 6.1.1.1 255.255.255.0 // Set the SIP adjacency address
 
   
interface GigabitEthernet0/0/0.101 // Set the VLAN identifier to 101
 vrf forwarding CUCM1
 encapsulation dot1Q 2301
 ip address 180.23.1.2 255.255.255.0
!
router ospf 2301 vrf CUCM1 // Create an OSPF instance for the CUCM1 VRF
 router-id 23.23.23.1
 network 6.1.1.0 0.0.0.255 area 1
 network 180.23.1.0 0.0.0.255 area 0
!
 
   

CUCM2

vrf definition CUCM2 // Create a VRF instance
 !
 address-family ipv4
 exit-address-family
 
   
 address-family ipv6
 exit-address-family
!
interface SBC25 // Create an interface in the VRF space
 vrf forwarding CUCM2
 ip address 6.1.2.1 255.255.255.0 // Set the SIP adjacency address
 
   
interface GigabitEthernet0/0/1.101 // Set the VLAN identifier to 101
 vrf forwarding CUCM2
 encapsulation dot1Q 2302
 ip address 180.23.2.2 255.255.255.0
!
router ospf 2302 vrf CUCM2 // Create an OSPF instance for the CUCM2 VRF
 router-id 23.23.23.2
 network 6.1.2.0 0.0.0.255 area 1
 network 180.23.2.0 0.0.0.255 area 0
!
 
   

Verify the Configuration

show ip route vrf vrf-name // Display routing table details for the VRF

VRF for Individual Subscribers

Subscribers

vrf definition subscribers // Create a VRF instance
 !
 address-family ipv4
 exit-address-family
 
   
 address-family ipv6
 exit-address-family
!
interface SBC24 // Create an interface in the VRF space
 vrf forwarding subscribers
 ip address 6.1.1.1 255.255.255.0 // Set the SIP adjacency address
 
   
interface GigabitEthernet0/0/0.101 // Set the VLAN identifier to 101
 vrf forwarding subscribers
 encapsulation dot1Q 2301
 ip address 180.23.1.2 255.255.255.0
!
router ospf 2301 vrf subscribers // Create an OSPF instance for the subscribers VRF
 router-id 23.23.23.1
 network 6.1.1.0 0.0.0.255 area 1
 network 180.23.1.0 0.0.0.255 area 0
!
 
   
 
   

Softswitch

vrf definition softswitch // Create a VRF instance
 !
 address-family ipv4
 exit-address-family
 
   
 address-family ipv6
 exit-address-family
!
interface SBC25 // Create an interface in the VRF space
 vrf forwarding softswitch
 ip address 6.1.2.1 255.255.255.0 // Set the SIP adjacency address
 
   
interface GigabitEthernet0/0/1.101 // Set the VLAN identifier to 101
 vrf forwarding softswitch
 encapsulation dot1Q 2302
 ip address 180.23.2.2 255.255.255.0
!
router ospf 2302 vrf softswitch // Create an OSPF instance for the softswitch VRF
 router-id 23.23.23.2
 network 6.1.2.0 0.0.0.255 area 1
 network 180.23.2.0 0.0.0.255 area 0
!
 
   

Verify the Configuration

show ip route vrf vrf-name // Display routing table details for the VRF
 
   

VRF for Network to Network Interface

PBX

vrf definition pbx // Create a VRF instance
 !
 address-family ipv4
 exit-address-family
 
   
 address-family ipv6
 exit-address-family
!
interface SBC24 // Create an interface in the VRF space
 vrf forwarding pbx
 ip address 6.1.1.1 255.255.255.0 // Set the SIP adjacency address
 
   
interface GigabitEthernet0/0/0.101 // Set the VLAN identifier to 101
 vrf forwarding pbx
 encapsulation dot1Q 2301
 ip address 180.23.1.2 255.255.255.0
!
router ospf 2301 vrf pbx // Create an OSPF instance for the pbx VRF
 router-id 23.23.23.1
 network 6.1.1.0 0.0.0.255 area 1
 network 180.23.1.0 0.0.0.255 area 0
!
 
   
 
   

Service Provider

vrf definition service_provider // Create a VRF instance
 !
 address-family ipv4
 exit-address-family
 
   
 address-family ipv6
 exit-address-family
!
interface SBC25 // Create an interface in the VRF space
 vrf forwarding service_provider
 ip address 6.1.2.1 255.255.255.0 // Set the SIP adjacency address
 
   
interface GigabitEthernet0/0/1.101 // Set the VLAN identifier to 101
 vrf forwarding service_provider
 encapsulation dot1Q 2302
 ip address 180.23.2.2 255.255.255.0
!
router ospf 2302 vrf service_provider // Create an OSPF instance for the service_provider 
                                     // VRF
 router-id 23.23.23.2
 network 6.1.2.0 0.0.0.255 area 1
 network 180.23.2.0 0.0.0.255 area 0
 
   

Verify the Configuration

show ip route vrf vrf-name // Display routing table details for the VRF