cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2515
Views
0
Helpful
1
Replies

redistributing inter vrf routes in OSPF

Hi 

 

I ma working on a VRF-Lite lab, I craeted 2 VRF instances ( student and staff) 

my network topology has 1 core switch and 2 distribution switches, I am using a cisco 9300 switches with IP routing enabled

i have configured configured OSPF fro my routing protocols for each VRF 

on the core switch I have configured BGP protocols to redistribute inter VRF route (BGP only on the core) to the OSPF instances

i can see all the routes on the core but on the distribution i only see ospf routes from the same VRF

the routes exist in the ospf database but in the table

need help figuring out why the inter VRF routes are no showing or populating in the VRF routing table

 

Core#show ip route vrf staff

Routing Table: staff
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 20 subnets, 2 masks
O IA 10.64.11.254/32 [110/3] via 10.196.2.10, 01:52:13, Vlan3002
O IA 10.64.21.254/32 [110/2] via 10.196.2.42, 01:52:17, Vlan3004
B 10.162.11.254/32 [20/3] via 10.196.1.10 (student), 01:52:13, Vlan3001
B 10.162.21.254/32 [20/2] via 10.196.1.42 (student), 01:52:17, Vlan3003
B 10.196.1.0/29 is directly connected, 07:19:37, Loopback1
L 10.196.1.1/32 is directly connected, Loopback1
B 10.196.1.2/32 [20/3] via 10.196.1.10 (student), 01:52:17, Vlan3001
B 10.196.1.3/32 [20/2] via 10.196.1.42 (student), 01:52:17, Vlan3003
B 10.196.1.8/29 is directly connected, 07:19:37, Vlan3001
L 10.196.1.9/32 is directly connected, Vlan3001
B 10.196.1.40/29 is directly connected, 02:40:18, Vlan3003
L 10.196.1.41/32 is directly connected, Vlan3003
C 10.196.2.0/29 is directly connected, Loopback2
L 10.196.2.1/32 is directly connected, Loopback2
O 10.196.2.2/32 [110/3] via 10.196.2.10, 01:52:17, Vlan3002
O 10.196.2.3/32 [110/2] via 10.196.2.42, 01:52:17, Vlan3004
C 10.196.2.8/29 is directly connected, Vlan3002
L 10.196.2.9/32 is directly connected, Vlan3002
C 10.196.2.40/29 is directly connected, Vlan3004
L 10.196.2.41/32 is directly connected, Vlan3004

 

Core#show ip route vrf student

Routing Table: student
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 20 subnets, 2 masks
B 10.64.11.254/32 [20/3] via 10.196.2.10 (staff), 01:52:35, Vlan3002
B 10.64.21.254/32 [20/2] via 10.196.2.42 (staff), 01:52:39, Vlan3004
O IA 10.162.11.254/32 [110/3] via 10.196.1.10, 01:52:35, Vlan3001
O IA 10.162.21.254/32 [110/2] via 10.196.1.42, 01:52:39, Vlan3003
C 10.196.1.0/29 is directly connected, Loopback1
L 10.196.1.1/32 is directly connected, Loopback1
O 10.196.1.2/32 [110/3] via 10.196.1.10, 01:52:39, Vlan3001
O 10.196.1.3/32 [110/2] via 10.196.1.42, 01:52:39, Vlan3003
C 10.196.1.8/29 is directly connected, Vlan3001
L 10.196.1.9/32 is directly connected, Vlan3001
C 10.196.1.40/29 is directly connected, Vlan3003
L 10.196.1.41/32 is directly connected, Vlan3003
B 10.196.2.0/29 is directly connected, 07:19:59, Loopback2
L 10.196.2.1/32 is directly connected, Loopback2
B 10.196.2.2/32 [20/3] via 10.196.2.10 (staff), 01:52:39, Vlan3002
B 10.196.2.3/32 [20/2] via 10.196.2.42 (staff), 01:52:39, Vlan3004

 

dore config:


B 10.196.2.8/29 is directly connected, 07:19:59, Vlan3002
L 10.196.2.9/32 is directly connected, Vlan3002
B 10.196.2.40/29 is directly connected, 02:40:40, Vlan3004
L 10.196.2.41/32 is directly connected, Vlan3004

 

Distr1#show ip route vrf student

Routing Table: student
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 10 subnets, 3 masks
C 10.162.11.0/24 is directly connected, Loopback10
L 10.162.11.254/32 is directly connected, Loopback10
O IA 10.162.21.254/32 [110/3] via 10.196.1.9, 01:52:54, Vlan3001
C 10.196.1.0/29 is directly connected, Loopback1
O 10.196.1.1/32 [110/2] via 10.196.1.9, 01:52:54, Vlan3001
L 10.196.1.2/32 is directly connected, Loopback1
O 10.196.1.3/32 [110/3] via 10.196.1.9, 01:52:54, Vlan3001
C 10.196.1.8/29 is directly connected, Vlan3001
L 10.196.1.10/32 is directly connected, Vlan3001
O 10.196.1.40/29 [110/2] via 10.196.1.9, 01:52:54, Vlan3001

 

Core config:

 

Core#show run
Building configuration...

Current configuration : 9450 bytes
!
! Last configuration change at 23:29:05 UTC Wed Aug 14 2019 by test
!
version 16.6
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no platform punt-keepalive disable-kernel-core
!
hostname Core
!
!
vrf definition Mgmt-vrf
!
address-family ipv4
exit-address-family
!
address-family ipv6
exit-address-family
!
vrf definition staff
rd 800:2
route-target export 800:2
route-target export 800:1
route-target import 800:2
route-target import 800:1
!
address-family ipv4
exit-address-family
!
address-family ipv6
exit-address-family
!
vrf definition student
rd 800:1
route-target export 800:1
route-target export 800:2
route-target import 800:1
route-target import 800:2
!
address-family ipv4
exit-address-family
!
address-family ipv6
exit-address-family
!
!
!
!
!
!
!
aaa session-id common
switch 1 provision c9300-24p
!
!
!
!
ip routing
!
ipv6 unicast-routing
!

!
vlan 30
name VRF-Lite-LP30
!
vlan 100
name ospf100
!
vlan 101
name ospf101
!
vlan 3001
name ospf3001StudentVRF
!
vlan 3002
name ospf3002StaffVRF
!
vlan 3003
name ospf3003StudentVRF
!
vlan 3004
name ospf3004StaffVRF
!
!
!
interface Loopback0
ip address 10.196.12.1 255.255.255.248
!
interface Loopback1
description OSPF router student VRF
vrf forwarding student
ip address 10.196.1.1 255.255.255.248
!
interface Loopback2
description OSPF router staff VRF
vrf forwarding staff
ip address 10.196.2.1 255.255.255.248
!
interface GigabitEthernet0/0
vrf forwarding Mgmt-vrf
ip address 10.194.177.231 255.255.240.0
speed 1000
negotiation auto
!
interface GigabitEthernet1/0/1
switchport trunk allowed vlan 30
switchport mode trunk
!

!
interface GigabitEthernet1/0/23
switchport trunk pruning vlan none
switchport mode trunk
!
interface GigabitEthernet1/0/24
switchport trunk pruning vlan none
switchport mode trunk
!

interface Vlan30
ip address 10.192.32.2 255.255.255.240
!
interface Vlan100
ip address 10.196.12.9 255.255.255.248
ip ospf network point-to-point
ip ospf 100 area 0
ip ospf cost 2
!
interface Vlan101
ip address 10.196.12.41 255.255.255.240
ip ospf network point-to-point
ip ospf 100 area 0
!
interface Vlan3001
description ospf L3 area0
vrf forwarding student
ip address 10.196.1.9 255.255.255.248
ip ospf network point-to-point
ip ospf 101 area 0
ip ospf cost 2
!
interface Vlan3002
description ospf L3 area0
vrf forwarding staff
ip address 10.196.2.9 255.255.255.248
ip ospf network point-to-point
ip ospf 102 area 0
ip ospf cost 2
!
interface Vlan3003
description ospf L3 area0 student VRF
vrf forwarding student
ip address 10.196.1.41 255.255.255.248
ip ospf network point-to-point
!
interface Vlan3004
description ospf L3 area0 staff VRF
vrf forwarding staff
ip address 10.196.2.41 255.255.255.248
ip ospf network point-to-point
!
router ospf 101 vrf student
router-id 10.196.1.1
redistribute bgp 800 metric-type 1 subnets
passive-interface default
no passive-interface Vlan3001
no passive-interface Vlan3003
network 10.196.1.0 0.0.0.255 area 0
!
router ospf 102 vrf staff
router-id 10.196.2.1
redistribute bgp 800 subnets
passive-interface default
no passive-interface Vlan3002
no passive-interface Vlan3004
network 10.196.2.0 0.0.0.255 area 0
!
router ospf 100
router-id 10.196.12.1
passive-interface default
no passive-interface Vlan100
no passive-interface Vlan101
network 10.196.12.0 0.0.0.255 area 0
!
router bgp 800
bgp log-neighbor-changes
!
address-family ipv4
exit-address-family
!
address-family ipv4 vrf staff
redistribute ospf 102 match internal external 1 external 2
exit-address-family
!
address-family ipv4 vrf student
redistribute ospf 101 match internal external 1 external 2
exit-address-family
!

ip route 0.0.0.0 0.0.0.0 10.192.32.1

end

 

Dstr1 config:

Distr1#show run
Building configuration...

Current configuration : 8565 bytes
!
! Last configuration change at 22:18:20 UTC Wed Aug 14 2019 by test
!
version 16.6
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no platform punt-keepalive disable-kernel-core
!
hostname Distr1
!
!
vrf definition Mgmt-vrf
!
address-family ipv4
exit-address-family
!
address-family ipv6
exit-address-family
!
vrf definition staff
rd 800:2
route-target export 800:2
route-target export 800:1
route-target import 800:1
route-target import 800:2
!
address-family ipv4
exit-address-family
!
address-family ipv6
exit-address-family
!
vrf definition student
rd 800:1
route-target export 800:1
route-target export 800:2
route-target import 800:1
route-target import 800:2
!
address-family ipv4
exit-address-family
!
address-family ipv6
exit-address-family
!
!
!
!
aaa session-id common
switch 1 provision c9300-24p
!
!
!
!
ip routing
!
ipv6 unicast-routing
!
!
!
transceiver type all
monitoring
!
vlan 100
name ospf100
!
vlan 3001
name ospf3001StudentVRF
!
vlan 3002
name ospf3002StaffVRF
!
!
interface Loopback0
ip address 10.196.12.2 255.255.255.248
!
interface Loopback1
description OSPF router LSA id student VRF
vrf forwarding student
ip address 10.196.1.2 255.255.255.248
!
interface Loopback2
description OSPF router LSA id staff VRF
vrf forwarding staff
ip address 10.196.2.2 255.255.255.248
!
interface Loopback10
vrf forwarding student
ip address 10.162.11.254 255.255.255.0
!
interface Loopback11
vrf forwarding staff
ip address 10.64.11.254 255.255.255.0
!
interface GigabitEthernet0/0
vrf forwarding Mgmt-vrf
ip address 10.194.177.232 255.255.240.0
speed 1000
negotiation auto
!
!
interface GigabitEthernet1/0/23
switchport mode trunk
!
!
interface Vlan100
ip address 10.196.12.10 255.255.255.248
ip ospf network point-to-point
!
interface Vlan3001
description ospf L3 area0 student VRF
vrf forwarding student
ip address 10.196.1.10 255.255.255.248
ip ospf network point-to-point
!
interface Vlan3002
description ospf L3 area0 staff VRF
vrf forwarding staff
ip address 10.196.2.10 255.255.255.248
ip ospf network point-to-point
!
router ospf 4001 vrf student
router-id 10.196.1.2
redistribute ospf 101 subnets match internal external 1 external 2
passive-interface default
no passive-interface Vlan3001
network 10.162.10.0 0.0.0.255 area 101
network 10.162.11.0 0.0.0.255 area 101
network 10.196.1.0 0.0.0.255 area 0
!
router ospf 4002 vrf staff
router-id 10.196.2.2
redistribute ospf 102 subnets match internal external 1 external 2
passive-interface default
no passive-interface Vlan3002
network 10.64.10.0 0.0.0.255 area 102
network 10.64.11.0 0.0.0.255 area 102
network 10.196.2.0 0.0.0.255 area 0
!
router ospf 4000
router-id 10.196.12.2
passive-interface default
no passive-interface Vlan100
network 10.196.12.0 0.0.0.255 area 0
!

end

 

Distr2 config:

 

 

 

 

 

 

 

 

 

 

1 Reply 1

forgot the Distr2 config
Distr2#show run
Building configuration...

Current configuration : 8543 bytes
!
! Last configuration change at 22:36:34 UTC Wed Aug 14 2019 by test
!
version 16.6
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no platform punt-keepalive disable-kernel-core
!
hostname Distr2
!
!
vrf definition Mgmt-vrf
!
address-family ipv4
exit-address-family
!
address-family ipv6
exit-address-family
!
vrf definition staff
rd 800:2
route-target export 800:2
route-target export 800:1
route-target import 800:1
route-target import 800:2
!
address-family ipv4
exit-address-family
!
address-family ipv6
exit-address-family
!
vrf definition student
rd 800:1
route-target export 800:1
route-target export 800:2
route-target import 800:1
route-target import 800:2
!
address-family ipv4
exit-address-family
!
address-family ipv6
exit-address-family
!
!
!
!
!
aaa session-id common
switch 1 provision c9300-24p
!
!
!
!
ip routing
!
!
vtp mode transparent
ipv6 unicast-routing
!
!
vlan 101
name ospf101
!
vlan 3003
name ospf3003StudentVRF
!
vlan 3004
name ospf3004StaffVRF
!
!
interface Loopback0
ip address 10.196.12.3 255.255.255.248
!
interface Loopback1
description OSPF router LSA id student VRF
vrf forwarding student
ip address 10.196.1.3 255.255.255.248
!
interface Loopback2
description OSPF router LSA id staff VRF
vrf forwarding staff
ip address 10.196.2.3 255.255.255.248
!
interface Loopback10
vrf forwarding student
ip address 10.162.21.254 255.255.255.0
!
interface Loopback11
vrf forwarding staff
ip address 10.64.21.254 255.255.255.0
!
interface GigabitEthernet0/0
vrf forwarding Mgmt-vrf
ip address 10.194.177.233 255.255.240.0
speed 1000
negotiation auto
!

!
interface GigabitEthernet1/0/24
switchport trunk pruning vlan none
switchport mode trunk
!

!
interface Vlan101
ip address 10.196.12.42 255.255.255.248
ip ospf network point-to-point
ip ospf 100 area 0
!
interface Vlan3001
no ip address
!
interface Vlan3003
description ospf L3 area0 student VRF
vrf forwarding student
ip address 10.196.1.42 255.255.255.248
ip ospf network point-to-point
!
interface Vlan3004
description ospf L3 area0 staff VRF
vrf forwarding staff
ip address 10.196.2.42 255.255.255.248
ip ospf network point-to-point
!
router ospf 5001 vrf student
router-id 10.196.1.3
passive-interface default
no passive-interface Vlan3003
network 10.162.20.0 0.0.0.255 area 5001
network 10.162.21.0 0.0.0.255 area 5001
network 10.196.1.0 0.0.0.255 area 0
!
router ospf 5002 vrf staff
router-id 10.196.2.3
passive-interface default
no passive-interface Vlan3004
network 10.64.20.0 0.0.0.255 area 5002
network 10.64.21.0 0.0.0.255 area 5002
network 10.196.2.0 0.0.0.255 area 0
!
router ospf 5000
router-id 10.196.12.3
passive-interface default
no passive-interface Vlan101
network 10.196.12.0 0.0.0.255 area 0
!

end

Distr2# show ip route vrf student

Routing Table: student
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 10 subnets, 3 masks
O IA 10.162.11.254/32 [110/4] via 10.196.1.41, 02:10:56, Vlan3003
C 10.162.21.0/24 is directly connected, Loopback10
L 10.162.21.254/32 is directly connected, Loopback10
C 10.196.1.0/29 is directly connected, Loopback1
O 10.196.1.1/32 [110/2] via 10.196.1.41, 02:11:00, Vlan3003
O 10.196.1.2/32 [110/4] via 10.196.1.41, 02:11:00, Vlan3003
L 10.196.1.3/32 is directly connected, Loopback1
O 10.196.1.8/29 [110/3] via 10.196.1.41, 02:11:00, Vlan3003
C 10.196.1.40/29 is directly connected, Vlan3003
L 10.196.1.42/32 is directly connected, Vlan3003

Distr2# show ip route vrf staff

Routing Table: staff
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 10 subnets, 3 masks
O IA 10.64.11.254/32 [110/4] via 10.196.2.41, 02:11:08, Vlan3004
C 10.64.21.0/24 is directly connected, Loopback11
L 10.64.21.254/32 is directly connected, Loopback11
C 10.196.2.0/29 is directly connected, Loopback2
O 10.196.2.1/32 [110/2] via 10.196.2.41, 02:11:12, Vlan3004
O 10.196.2.2/32 [110/4] via 10.196.2.41, 02:11:12, Vlan3004
L 10.196.2.3/32 is directly connected, Loopback2
O 10.196.2.8/29 [110/3] via 10.196.2.41, 02:11:12, Vlan3004
C 10.196.2.40/29 is directly connected, Vlan3004
L 10.196.2.42/32 is directly connected, Vlan3004