Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k
New Member

Redistribution from BGP to OSPF

Router where i try to redistribute from BGP into OSPF -

interface Loopback0

ip address 172.22.21.104 255.255.255.255

!

interface GigabitEthernet0/0

description ### Int to AS65337 ###

ip address 9.9.9.2 255.255.255.248

ip ospf network non-broadcast

ip ospf dead-interval minimal hello-multiplier 10

ip ospf priority 0

duplex auto

speed auto

media-type rj45

!

router ospf 1

log-adjacency-changes

redistribute bgp 65334 subnets

network 9.9.9.0 0.0.0.7 area 0

!

router bgp 65334

no synchronization

bgp log-neighbor-changes

network 10.50.12.0 mask 255.255.252.0

network 10.60.12.0 mask 255.255.252.0

network 172.22.21.104 mask 255.255.255.255

neighbor 1.1.1.201 remote-as 65334

neighbor 1.1.1.201 next-hop-self

neighbor 1.1.1.201 soft-reconfiguration inbound

neighbor 1.1.1.201 filter-list 1 out

no auto-summary

Second router is neighbor via OSPF

!

interface Vlan1

ip address 9.9.9.1 255.255.255.248

ip ospf network non-broadcast

ip ospf dead-interval minimal hello-multiplier 10

!

!

router ospf 1

log-adjacency-changes

redistribute connected metric-type 1 subnets

network 9.9.9.0 0.0.0.7 area 0

neighbor 9.9.9.2

neighbor 9.9.9.3

maximum-paths 1

!

#sh ip ospf ne

Neighbor ID Pri State Dead Time Address Interface

172.22.21.104 0 FULL/DROTHER 941 msec 9.9.9.2 Vlan1

172.22.21.105 0 FULL/DROTHER 908 msec 9.9.9.3 Vlan1

and got next routes from 9.9.9.2

-

#sh ip route ospf

172.22.0.0/32 is subnetted, 2 subnets

O E2 172.22.21.104 [110/1] via 9.9.9.2, 00:01:25, Vlan1

But router 9.9.9.2 have a lot routes got via bgp -

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd

1.1.1.201 4 65334 17455 13044 207288 0 0 1d00h 161

and redistribute into ospf only route

172.22.21.104/32?

Why it is so?

1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Re: Redistribution from BGP to OSPF

Hi,

If you want to redistribute iBGP routes into OSPF, you need to configure "bgp redistribute-internal " in bgp routing process.

4 REPLIES

Re: Redistribution from BGP to OSPF

It shows to have learnt 161 prefixes from IBGP neighbor. Can you see the outpu of " sh bgp neighbor 1.1.1.201 received-routes".

If feasible, do a soft-reset of neighbor. & verify again.

New Member

Re: Redistribution from BGP to OSPF

1.1.1.201 is IBGP neighbor and i can see all 161 prefixes-

#sh bgp neighbor 1.1.1.201 received-routes

BGP table version is 216648, local router ID is 172.22.21.104

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

r RIB-failure, S Stale

Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path

r>i1.1.1.0/24 1.1.1.201 0 100 0 ?

*>i2.2.2.0/24 172.22.22.2 2 100 0 ?

*>i3.3.3.0/30 172.22.21.100 0 100 0 i

*>i5.5.5.0/30 172.22.23.2 0 100 0 i

*>i5.5.5.4/30 1.1.1.201 0 100 0 i

*>i5.5.5.8/30 1.1.1.201 0 100 0 i

*>i10.0.0.0/24 172.22.23.2 0 100 0 i

*>i10.10.16.0/24 172.22.23.2 0 100 0 2854 65011 i

*>i10.10.18.0/24 172.22.23.2 0 100 0 2854 65003 i

*>i10.10.22.0/24 172.30.0.66 0 100 0 3216 65415 i

*>i10.10.26.0/24 172.22.23.2 0 100 0 2854 65006 i

*>i10.10.28.0/24 172.22.23.2 0 100 0 2854 65009 i

*>i10.10.30.0/24 172.22.23.2 0 100 0 2854 65012 i

*>i10.10.34.0/24 172.30.0.66 0 100 0 3216 65411 i

*>i10.10.35.0/24 172.30.0.66 0 100 0 3216 65411 i

*>i10.10.36.0/24 172.22.23.2 0 100 0 2854 65007 i

*>i10.10.38.0/24 172.22.23.2 0 100 0 2854 65008 i

*>i10.10.42.0/24 172.22.23.2 0 100 0 2854 65005 i

*>i10.10.46.0/24 10.20.46.2 0 100 0 i

*>i10.10.48.0/24 172.22.23.2 0 100 0 2854 65010 i

*>i10.10.49.0/24 172.22.23.2 0 100 0 2854 65014 i

*>i10.10.140.32/30 172.22.23.2 0 100 0 i

New Member

Re: Redistribution from BGP to OSPF

Do you think the reason that redistribution don't work because routes got from IBGP neighbor?

Cisco Employee

Re: Redistribution from BGP to OSPF

Hi,

If you want to redistribute iBGP routes into OSPF, you need to configure "bgp redistribute-internal " in bgp routing process.

529
Views
0
Helpful
4
Replies
CreatePlease to create content