Home
Using VRF-Lite, EIGRP, and Static Routes

Carole Warner Reece I've been testing some VRF-Lite (also known as Multi VRF) configurations, and I thought I would briefly illustrate redistribution of static routes into EIGRP.

In my scenario, I'm trying to set up shared Voice services to a couple of sites. (There may be some other VRFs in the future, but my focus now is on the Voice VRF.)


The routing protocol is EIGRP, and the sites have non-overlapping IP address allocations.

Overview of Network

The network connects the remote sites as 'customers' to a CE, and the CE routers to PE routers in the core.
One of the PE routers connects to a cloud of VoIP servers - such as a Unified Communication Manager, a Unity server, ...
In the diagram, the Voice VRF is shown in blue, a future Internet VRF is in Red. The global routing for the infrastructure management is in black.

Simplified Network

However, we can break this up into a simpler example with just 3 devices to illustrate the VRF-lite redistribution behavior.

The VRF configuration on CE-A and PE-1 is straight-forward, and the same on both devices:

!
ip vrf Voice
 rd 26:2
!
router eigrp 24
 network 10.26.248.0 0.0.7.255
 auto-summary
 !
 address-family ipv4 vrf Voice
 network 10.26.0.0 0.0.255.255
 no auto-summary
 autonomous-system 26
 exit-address-family
 !


With only some loopbacks configured, CE-A and PE-1 are exchanging routes in the proper VRFs:

CE-A#sh ip ro vrf Voice
Routing Table: Voice
...
Gateway of last resort is not set

     10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
C       10.26.4.128/30 is directly connected, Vlan12
D       10.26.1.1/32 [90/130816] via 10.26.4.129, 00:00:22, Vlan12
C       10.26.1.33/32 is directly connected, Loopback26
CE-A#

 

PE-1#sh ip ro vrf Voice
Routing Table: Voice
...
Gateway of last resort is not set
      10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C        10.26.1.1/32 is directly connected, Loopback26
D        10.26.1.33/32 [90/130816] via 10.26.4.130, 00:28:31, Vlan12
C        10.26.4.128/30 is directly connected, Vlan12
L        10.26.4.129/32 is directly connected, Vlan12
PE-1#

Configuration Steps

Let's now look at connecting in the voice networks from the CustomerA site. First, I connect the link to the customer on 10.26.1.96/32.

CE-A#sh ip ro vrf Voice
Routing Table: Voice
...
Gateway of last resort is not set

     10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C       10.26.4.128/30 is directly connected, Vlan12
C       10.26.1.96/30 is directly connected, Vlan200
D       10.26.1.1/32 [90/130816] via 10.26.4.129, 00:32:48, Vlan12
C       10.26.1.33/32 is directly connected, Loopback26
CE-A#


PE-1 sees the new route:

PE-1#sh ip ro vrf Voice
Routing Table: Voice
...
Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
C        10.26.1.1/32 is directly connected, Loopback26
D        10.26.1.33/32 [90/130816] via 10.26.4.130, 00:34:11, Vlan12
D        10.26.1.96/30 [90/3072] via 10.26.4.130, 00:01:53, Vlan12
C        10.26.4.128/30 is directly connected, Vlan12
L        10.26.4.129/32 is directly connected, Vlan12
PE-1#


I then apply a static route at CE-A to advertise the routes at the customer site.

CE-A(config)#ip route vrf Voice 10.26.6.0 255.255.255.0 10.26.1.98


I had thought that with EIGRP redistribution, if the source of external routes is a static network, defining the metric is optional.
So I just redistribute the static route into the EIGRP:

CE-A(config)#router eigrp 24
CE-A(config-router)# address-family ipv4 vrf Voice
CE-A(config-router-af)#redist static
CE-A(config-router-af)#

 

The CE-A routing table looks fine:

CE-A(config)#do sh ip ro vrf Voice

Routing Table: Voice
...
Gateway of last resort is not set
     10.0.0.0/8 is variably subnetted, 5 subnets, 3 masks
C       10.26.4.128/30 is directly connected, Vlan12
C       10.26.1.96/30 is directly connected, Vlan200
D       10.26.1.1/32 [90/130816] via 10.26.4.129, 00:33:51, Vlan12
S       10.26.6.0/24 [1/0] via 10.26.1.98
C       10.26.1.33/32 is directly connected, Loopback26
CE-A(config)#


However, PE-1 does not see the static route:

PE-1#sh ip ro vrf Voice

Routing Table: Voice
...

Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
C        10.26.1.1/32 is directly connected, Loopback26
D        10.26.1.33/32 [90/130816] via 10.26.4.130, 00:34:11, Vlan12
D        10.26.1.96/30 [90/3072] via 10.26.4.130, 00:01:53, Vlan12
C        10.26.4.128/30 is directly connected, Vlan12
L        10.26.4.129/32 is directly connected, Vlan12
PE-1#


I look at the topology table for the Voice VRF on CE-A:

CE-A#sh ip eigrp vrf Voice topo
IP-EIGRP Topology Table for AS(26)/ID(10.26.1.33) Routing Table: Voice
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status
P 10.26.4.128/30, 1 successors, FD is 2816
        via Connected, Vlan12
P 10.26.1.96/30, 1 successors, FD is 2816
        via Connected, Vlan200
P 10.26.1.1/32, 1 successors, FD is 130816
        via 10.26.4.129 (130816/128256), Vlan12
P 10.26.1.33/32, 1 successors, FD is 128256
        via Connected, Loopback26
CE-A#


The static route is NOT in the table. OK, this is obviously a problem.
I update the redistribution statement to include a metric:

CE-A(config)#router eigrp 24
CE-A(config-router)# address-family ipv4 vrf Voice
CE-A(config-router-af)#redist static metric 10000 100 255 1 1500
CE-A(config-router-af)#

The static route is now in the topology table for the Voice VRF:

CE-A#sh ip eigrp vrf Voice topo
IP-EIGRP Topology Table for AS(26)/ID(10.26.1.33) Routing Table: Voice
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status

P 10.26.4.128/30, 1 successors, FD is 2816
        via Connected, Vlan12
P 10.26.1.96/30, 1 successors, FD is 2816
        via Connected, Vlan200
P 10.26.1.1/32, 1 successors, FD is 130816
        via 10.26.4.129 (130816/128256), Vlan12
P 10.26.6.0/24, 1 successors, FD is 281600
        via Rstatic (281600/0)
P 10.26.1.33/32, 1 successors, FD is 128256
        via Connected, Loopback26
CE-A#


and PE-1 now sees the static route:

PE-1#sh ip ro vrf Voice

Routing Table: Voice
...
Gateway of last resort is not set
      10.0.0.0/8 is variably subnetted, 6 subnets, 3 masks
C        10.26.1.1/32 is directly connected, Loopback26
D        10.26.1.33/32 [90/130816] via 10.26.4.130, 00:37:57, Vlan12
D        10.26.1.96/30 [90/3072] via 10.26.4.130, 00:05:39, Vlan12
C        10.26.4.128/30 is directly connected, Vlan12
L        10.26.4.129/32 is directly connected, Vlan12
D EX     10.26.6.0/24 [170/281856] via 10.26.4.130, 00:00:29, Vlan12
PE-1#


Conclusion:

With EIGRP, you probably need a metric when redistributing static routes with VRF-Lite.

 

____________________________________________________________________________________________________________



Postscript:

fwiw, when NOT running VRFs, here is a similar set of config snippets and show commands where the 'redistribute static' works fine with EIGRP without a metric:

CE-A#show run
. . .
router eigrp 26
 redistribute static
 network 10.0.200.0 0.0.0.255
 network 10.26.0.0 0.0.255.255
 auto-summary
!
ip route 10.0.0.0 255.0.0.0 10.0.200.2
!
. . .
end

CE-A#sh ip eigrp topo
IP-EIGRP Topology Table for AS(26)/ID(10.26.248.33)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status

P 10.0.0.0/8, 1 successors, FD is 2816
        via Rstatic (2816/0)
P 10.26.248.33/32, 1 successors, FD is 128256
        via Connected, Loopback0
P 10.26.4.128/30, 1 successors, FD is 2816
        via Connected, GigabitEthernet0/3
P 10.0.200.0/24, 1 successors, FD is 2816
        via Connected, Vlan200
P 10.26.1.1/32, 1 successors, FD is 130816
        via 10.26.4.129 (130816/128256), GigabitEthernet0/3
CE-A#

CE-A#sh ip ro
...
Gateway of last resort is not set
     10.0.0.0/8 is variably subnetted, 5 subnets, 4 masks
S       10.0.0.0/8 [1/0] via 10.0.200.2
C       10.26.248.33/32 is directly connected, Loopback0
C       10.26.4.128/30 is directly connected, GigabitEthernet0/3
C       10.0.200.0/24 is directly connected, Vlan200
D       10.26.1.1/32
           [90/130816] via 10.26.4.129, 00:10:43, GigabitEthernet0/3
CE-A#



PE-1#show run
. . .
router eigrp 26
 network 10.26.0.0 0.0.255.255
!
. . .
end

PE-1#sh ip ro
. . .
Gateway of last resort is not set
      10.0.0.0/8 is variably subnetted, 6 subnets, 4 masks
D EX     10.0.0.0/8
           [170/3072] via 10.26.4.130, 00:03:09, GigabitEthernet1/0/0
D        10.0.200.0/24
           [90/3072] via 10.26.4.130, 00:07:43, GigabitEthernet1/0/0
C        10.26.1.1/32 is directly connected, Loopback0
C        10.26.4.128/30 is directly connected, GigabitEthernet1/0/0
L        10.26.4.129/32 is directly connected, GigabitEthernet1/0/0
D        10.26.248.33/32
           [90/130816] via 10.26.4.130, 00:12:33, GigabitEthernet1/0/0
PE-1#
 

____________________________________________________________________________________________________________

 

More on VRF-Lite

Other recent NetCraftsmen blogs on VRF-Lite include:

Using BGP with VRF-Lite for Shared Service Support

IP Multicast in a VRF

Comments (6)Add Comment
0
Alternate method for using a metric
written by Robert Bergman, March 08, 2010
I've been looking into vrf routing and eigrp and noticed in the Cisco documentation that while a metric is required for redistributing static routes as you've indicated, you may also use the default metric in your eigrp configuration rather than putting a metric on the static route directly.

Quote: The metric must be configured for routes from external EIGRP autonomous systems and non-EIGRP networks before these routes can be redistributed into an EIGRP CE router. The metric can be configured in the redistribute statement using the redistribute (IP) command or configured with the default-metric (EIGRP) command.

http://www.cisco.com/en/US/docs/ios/12_2t/12_2t15/feature/guide/fteipece.html
0
Thank You
written by Anonymous, June 30, 2010
Your redistribution of static routes via EIGRP needing metric statements at the end saved me during a recent maintenance window.
0
...
written by Lowell, May 23, 2012
we ran into this very thing when trying to redistribute vrf static routes. Things worked right away but when the router was reloaded or power cycled, the advertisement of the vrf static routes were lost at the distribution layer router. Very strange. We added metrics to the redistribute static statement under the address-family and that solved the issue.
0
Interface config
written by Mide, June 30, 2012
It would be nice if you could put up the config of the interfaces for PE-1. CE-A and the customer's network. Thank you smilies/smiley.gif
0
...
written by Benoit, October 24, 2012
As cisco states and your test shows a default-metric must be configured. That's said I have on an ASR in production redistributed static routes into eigrp (in a vrf) without the default-metric config and it's working. Lowell comments might explain what I am seeing.
Carole Warner Reece
Reply to Benoit
written by Carole Warner Reece, October 29, 2012
I'd follow Lowell & Cisco and add metrics. I've seen stuff working in EIGRP, such as policy routes, that later failed when one EIGRP neighbor needed to send an update to another. (I'm writing that up as a blog, should be posted this week.)

Carole

Write comment

busy