NX-OS VRFs and EIGRP Default Routes…
- April 1st, 2010
- Write comment
I’ve talked a little bit about NX-OS and the Nexus 7000 platform in previous posts. In this post I want to share with you an interesting aspect of NX-OS I came across recently regarding VRFs (Virtual Routing and Forwarding) and originating default routes with EIGRP. VRFs are not a new concept in the networking world and are extremely handy. Basically, a VRF is a separate routing table instance on a particular router. Those of you who have worked with Cisco IOS know that the “show ip route” command will display a list of all the routes the devices “knows” about. If you had a VRF configured the “show ip route vrf “VRF-NAME’” command will display all the routes the device knows about for that particular routing table. On the Nexus, the concept is similar but working with VRFs are a tad different.
Configuring a VRF in NX-OS is pretty straight forward:
Nexus# conf t Enter configuration commands, one per line. End with CNTL/Z. Nexus(config)# vrf context TEST Nexus(config-vrf)#
We have now created the “TEST” VRF and are in “config-vrf” mode. In this mode we have some options for further configuration. One in particular is the ability to configure static routes:
Nexus(config-vrf)# ip ? auto-discard Auto 0.0.0.0/0 discard route domain-list Add additional domain names domain-name Specify default domain name igmp IGMP global configuration commands mroute Configure multicast RPF static route name-server Specify nameserver address route Route information Nexus(config-vrf)# ip route ? A.B.C.D IP prefix in format i.i.i.i A.B.C.D/LEN IP prefix and network mask length in format x.x.x.x/m Nexus(config-vrf)# ip route 0.0.0.0/0 192.168.1.1 Nexus(config-vrf)#
At this point, we have configured a static default route within the TEST VRF. So, now how do we advertise this route? Well, I’m glad you asked:
Nexus(config)# router eigrp 10 Nexus(config-router)# vrf TEST Nexus(config-router-vrf)# autonomous-system 15 Nexus(config-router-vrf)# address-family ipv4 unicast Nexus(config-router-af)# default-information originate Nexus(config-router-af)#
Pretty cool, huh? At this point, any EIGRP neigbhors to this NX-OS router on the TEST VRF will recieve a default route so long as the appropriate interfaces have been configured for use with EIGRP (more on that another time). I most definitely like this method than redistributing statics in IOS as it seems much easier to me. Enjoy!
-Tim


