Route leaking between Global RT and VRF(lite) – I

Posted: June 27, 2010 in VRF lite
Tags: ,

Assume this scenario:

R0 is running OSPF and has two VRFs configured:

ip vrf 2
description R2
rd 1000:2
!
ip vrf 3
description R3
rd 1000:3

router ospf 1 vrf 2
log-adjacency-changes
!
router ospf 2 vrf 3
log-adjacency-changes
!
router ospf 3
log-adjacency-changes

interface FastEthernet0/0
ip vrf forwarding 2
ip address 10.0.20.1 255.255.255.0
ip ospf 1 area 5
duplex auto
speed auto

interface FastEthernet1/0
ip vrf forwarding 3
ip address 10.0.30.1 255.255.255.0
ip ospf 2 area 5
duplex auto
speed auto

interface FastEthernet2/0
ip address 10.0.40.1 255.255.255.0
ip ospf 3 area 5
duplex auto
speed auto

R0#sh ip route ospf
10.0.0.0/24 is subnetted, 3 subnets
O       10.0.60.0 [110/2] via 10.0.40.2, 00:05:55, FastEthernet2/0
O       10.0.50.0 [110/2] via 10.0.40.2, 00:05:55, FastEthernet2/0

R0#sh ip route vrf 2 ospf

Routing Table: 2

10.0.0.0/24 is subnetted, 3 subnets
O       10.0.70.0 [110/2] via 10.0.20.2, 00:09:30, FastEthernet0/0
O       10.0.80.0 [110/2] via 10.0.20.2, 00:09:30, FastEthernet0/0

R0#sh ip route vrf 3 ospf

Routing Table: 3

10.0.0.0/24 is subnetted, 3 subnets
O       10.0.90.0 [110/2] via 10.0.30.2, 00:07:34, FastEthernet1/0
O       10.0.99.0 [110/2] via 10.0.30.2, 00:07:34, FastEthernet1/0

Now we would like that hosts in the 10.0.50.0/24 network to be able to talk with hosts in the 10.0.90.0/24 network

This is done with static routing.

On R0:
ip route 10.0.90.0 255.255.255.0 FastEthernet1/0 10.0.30.2
ip route vrf 3 10.0.50.0 255.255.255.0 FastEthernet2/0 10.0.40.2

Static route redistribution needs to be done so that ospf can advertise these networks.

router ospf 2 vrf 3
log-adjacency-changes
redistribute static subnets

router ospf 3
log-adjacency-changes
redistribute static subnets

Verification:

R3#ping 10.0.50.1 source 10.0.90.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.50.1, timeout is 2 seconds:
Packet sent with a source address of 10.0.90.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 48/85/128 ms

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s