03-09-2016 10:39 AM - edited 03-05-2019 03:31 AM
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!
Solved! Go to Solution.
03-10-2016 01:37 AM
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
03-09-2016 01:06 PM
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
03-10-2016 11:03 AM
Hello Tim,
Thanks for your comment.
03-10-2016 01:37 AM
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
03-10-2016 11:00 AM
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!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide