VRF
Define a VRF
- vrf (VRF_NAME)
Define a new VRF
Example :
n1(config)# vrf vrf-green
Add an interface to VRF
- ip vrf forwarding NAME
Add interface to VRF NAME
- no ip vrf forwarding [NAME]
Add interface to VRF default
Note
When adding/removing interface to VRF, make sure no valid IP is set on it
Example:
n1(config)# int ge3 n1(config-if)# ip vrf forwarding vrf-green n1(config-if)# ip address 200.1.2.20/24
VRF Configuration examples
VRF Trunking
Example :
n1(config)# int ge1.100 n1(config-if)# encapsulation dot1q 100 n1(config-if)# ip vrf forwarding vrf-green n1(config-if)# ip address 200.1.2.20/24 n1(config)# int ge2 n1(config-if)# rewrite tag push 1 dot1q 300
Dynamic routing in VRF
Example:
soodar3(config)# router ospf vrf vrf-green soodar3(config-router)# network 200.2.3.0/24 area 0 soodar3(config-router)# network 3.2.1.0/24 area 0 soodar3(config-if) # end
VRF FIB
Example:
soodar1# sh ip ospf vrf vrf-green route soodar1# sh ip fib vrf vrf-green soodar1# sh ip fib vrf all
Display VRF info
Logging
Debugging logs can be set in case of need.
- [no] debug vrf event
logs data plane installation processes and results