cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2594
Views
0
Helpful
4
Replies

OSPF Prefixes in database but not in routing table.

Erico Verissimo
Level 1
Level 1

Hello guys,

I am racking my brain with this problem. I have two routing protocol running BGP and OSPF, the prefixes redistributed in other router OSPF are only in database. To get more weirder, when a shut the neighbor BGP, the prefixes in database OSPF go to routing table. Unbelievable!!

Following the configuration:

Cisco 3900

router ospf 100
router-id 10.206.4.13
log-adjacency-changes
auto-cost reference-bandwidth 100000
passive-interface GigabitEthernet0/2
network 10.206.4.0 0.0.0.255 area 0
!
router bgp 65353
bgp router-id 10.206.4.13
bgp log-neighbor-changes
neighbor 192.166.32.5 remote-as 8167
!
address-family ipv4
no synchronization
redistribute ospf 100 route-map OSPF_para_BGP
neighbor 192.166.32.5 activate
neighbor 192.166.32.5 allowas-in
no auto-summary
exit-address-family

C3900#sh ip route 10.128.86.0
% Subnet not in table

C3900#sh ip ospf database | in 10.128.86.0
10.128.86.0 10.206.0.10 1812 0x80008E24 0x00B557 0

C3900#sh ip bgp 10.128.86.0
BGP routing table entry for 0.0.0.0/0, version 5519
Paths: (1 available, best #1, table default)
Not advertised to any peer
8167 8167
192.166.32.5 from 192.166.32.5 (201.10.240.58)
Origin incomplete, localpref 100, valid, external, best
Extended Community: RT:8167:102702

I really thanks for any help!

1 Accepted Solution

Accepted Solutions

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Erico,

I would suggest to look more in detail in the OSPF database.

I guess that the entry 10.128.86.0 is an external route.

So you can use

show ip ospf database external 10.128.86.0

Look at the forwarding address listed in the output.

Perform a show ip route of the forwarding address.

In order for a router to accept an external route the forwarding address must be learned by an internal OSPF route (O or O IA ). If the forwarding address is learned by an OSPF external route, OSPF does not accept the external route to 10.128.86.0.

If this is the case you may need a passive-interface instead of a redistribute connected on the router before the C3900 the router that in the network diagram is injecting static routes into the OSPF domain.

Being not in the IP routing table the route is not redistributed to BGP even if permitted by the route-map OSPF_para_BGP.

Hope to help

Giuseppe

View solution in original post

4 Replies 4

trfinkenstadt
Level 1
Level 1

Erico,

I think you need to look at "show ip route 192.166.32.5" from that router.  eBGP has an administrative distance of 20 whilst OSPF is 110 in the absence of any commands in the routing protocols to change it.  The real question is why doesn't the route show up from BGP instead of OSPF.

Best regards,

tim

Hello Tim,

Thanks for your comment.

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Erico,

I would suggest to look more in detail in the OSPF database.

I guess that the entry 10.128.86.0 is an external route.

So you can use

show ip ospf database external 10.128.86.0

Look at the forwarding address listed in the output.

Perform a show ip route of the forwarding address.

In order for a router to accept an external route the forwarding address must be learned by an internal OSPF route (O or O IA ). If the forwarding address is learned by an OSPF external route, OSPF does not accept the external route to 10.128.86.0.

If this is the case you may need a passive-interface instead of a redistribute connected on the router before the C3900 the router that in the network diagram is injecting static routes into the OSPF domain.

Being not in the IP routing table the route is not redistributed to BGP even if permitted by the route-map OSPF_para_BGP.

Hope to help

Giuseppe

Hello Giuseppe,

I am facing the forwarding address again. Currently I have the forward address via BGP, crazy!!

C3900#sh ip ospf database external 10.128.86.0

OSPF Router with ID (10.206.4.13) (Process ID 100)

Type-5 AS External Link States

LS age: 568
Options: (No TOS-capability, DC)
LS Type: AS External Link
Link State ID: 10.128.86.0 (External Network Number )
Advertising Router: 10.206.0.10
LS Seq Number: 80008E4F
Checksum: 0x5F82
Length: 36
Network Mask: /24
Metric Type: 1 (Comparable directly to link state metric)
MTID: 0
Metric: 20
Forward Address: 10.127.1.20
External Route Tag: 0

**********************************************************************************

RT01_MPLS_OI_TRK#sh ip route 10.127.1.20

Routing entry for 10.127.1.16/28
Known via "bgp 65353", distance 20, metric 0
Tag 8167, type external
Last update from 192.166.32.5 1d19h ago
Routing Descriptor Blocks:
* 192.166.32.5, from 192.166.32.5, 1d19h ago
Route metric is 0, traffic share count is 1
AS Hops 2
Route tag 8167
MPLS label: none

***********************************************************************************

ip prefix-list forwarding_address_ospf seq 1 deny 10.127.1.16/28

ip prefix-list forwarding_address_ospf seq 2 permit 0.0.0.0/0 le 32

neighbor 192.166.32.5 prefix-list forwarding_address_ospf in

************************************************************************************

How you had mentioned, my router doesn't know the forward address by ospf and consequently the prefix doesn't go to routing table. I have configured a prefix-list blocking the forward address from BGP and all worked.

I really thanks for your advice.

Best regards!

 

Review Cisco Networking for a $25 gift card