cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
617
Views
10
Helpful
2
Replies

BGP to OSPF redistribution

iores
Level 1
Level 1

Hi,

I followed this lab: https://packetlife.net/blog/2010/mar/29/inter-vrf-routing-vrf-lite/ .

However, at the final stage, BGP to OSPF redistribution is not working. Everything else is working fine.

This is my configuration on S1:

ip vrf Blue
 rd 65000:3
!
ip vrf Green
 rd 65000:2
 route-target export 65000:2
 route-target import 65000:99
!
ip vrf Red
 rd 65000:1
 route-target export 65000:1
 route-target import 65000:99
!
ip vrf Shared
 rd 65000:99
 route-target export 65000:99
 route-target import 65000:1
 route-target import 65000:2
!
!
router ospf 1 vrf Red
 redistribute bgp 65000 subnets
 network 0.0.0.0 255.255.255.255 area 0
!
router ospf 2 vrf Green
 redistribute bgp 65000 subnets
 network 0.0.0.0 255.255.255.255 area 0
!
router ospf 3 vrf Blue
 network 0.0.0.0 255.255.255.255 area 0
!
router bgp 65000
 bgp log-neighbor-changes
 bgp redistribute-internal
 !
 address-family ipv4 vrf Blue
  redistribute connected
  redistribute ospf 3
 exit-address-family
 !
 address-family ipv4 vrf Green
  redistribute connected
  redistribute ospf 2
 exit-address-family
 !
 address-family ipv4 vrf Red
  redistribute connected
  redistribute ospf 1
 exit-address-family
 !
 address-family ipv4 vrf Shared
  redistribute connected
 exit-address-family
!

The routing table at S1:

ateway of last resort is not set

      172.16.0.0/16 is variably subnetted, 6 subnets, 3 masks
B        172.16.0.0/24 is directly connected, 00:24:03, Vlan16
L        172.16.0.1/32 is directly connected, Vlan16
B        172.16.1.0/30 is directly connected, 00:24:03, GigabitEthernet0/0
L        172.16.1.2/32 is directly connected, GigabitEthernet0/0
B        172.16.2.0/24 [20/2] via 172.16.0.2 (Red), 00:24:03, Vlan16
B        172.16.3.0/24 [20/2] via 172.16.0.3 (Red), 00:24:03, Vlan16
      172.17.0.0/16 is variably subnetted, 5 subnets, 3 masks
B        172.17.0.0/24 is directly connected, 00:24:03, Vlan17
L        172.17.0.1/32 is directly connected, Vlan17
B        172.17.1.0/30 is directly connected, 00:24:03, GigabitEthernet0/1
L        172.17.1.2/32 is directly connected, GigabitEthernet0/1
B        172.17.2.0/24 [20/2] via 172.17.0.2 (Green), 00:24:03, Vlan17
      192.168.99.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.99.0/24 is directly connected, Loopback99
L        192.168.99.1/32 is directly connected, Loopback99

At S2 and S3 I don't see any route in VRF Red and Green to 192.168.99.0/24 prefix.

For example, this was taken at S2: 

Gateway of last resort is not set

      172.16.0.0/16 is variably subnetted, 6 subnets, 3 masks
C        172.16.0.0/24 is directly connected, Vlan16
L        172.16.0.2/32 is directly connected, Vlan16
O        172.16.1.0/30 [110/2] via 172.16.0.1, 00:34:01, Vlan16
C        172.16.2.0/24 is directly connected, Vlan216
L        172.16.2.1/32 is directly connected, Vlan216
O        172.16.3.0/24 [110/2] via 172.16.0.3, 00:34:01, Vlan16

 

 

 

 

 

 

2 Accepted Solutions

Accepted Solutions

Harold Ritter
Cisco Employee
Cisco Employee

Hi @iores ,

You need to add the following command under the ospf processes configuration on S2 and S3 for vrf Red and Green.

router ospf x vrf xxx

capability vrf-lite

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

View solution in original post

balaji.bandi
Hall of Fame
Hall of Fame

Try :

router ospf 1 vrf Red
capability vrf-lite

Note : I have same lab setup, I have struggled way back for 1 hour to figure it out. - then I debug and found I missing the above command, once I added I can see the OSPF route E2 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

View solution in original post

2 Replies 2

Harold Ritter
Cisco Employee
Cisco Employee

Hi @iores ,

You need to add the following command under the ospf processes configuration on S2 and S3 for vrf Red and Green.

router ospf x vrf xxx

capability vrf-lite

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

balaji.bandi
Hall of Fame
Hall of Fame

Try :

router ospf 1 vrf Red
capability vrf-lite

Note : I have same lab setup, I have struggled way back for 1 hour to figure it out. - then I debug and found I missing the above command, once I added I can see the OSPF route E2 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Review Cisco Networking for a $25 gift card