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

Basic BGP<->OSPF redist:why subnet not being learned?

news2010a
Level 3
Level 3

Hi,

From R1 I can't ping 10.2.55.133.

I advertised 10.2.55.133 interface under ospf 1 interface on R3 (bgp AS 200 side).


Then I redistributed OSPF into BGP.

Therefore I expected that my router R1 should learn how to get to 10.2.55.133 via OSPF (on BGP AS 100 side).


However I can't ping 10.2.55.133.

Please find attached show run for all devices.

1 Reply 1

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Marlon,

be aware that  the ip source of a ping test counts for the final result.

In your logs we can see that when the ping to 10.2.80.1 is performed from device internal with source 192.168.1.4 the ping is successful

>>SW3#ping 10.2.80.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.2.80.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms

if you start the ping from R3 the edge router speaking BGP and OSPF the source address is 10.2.55.133 unless specified.

the subnet is not advertised in OSPF and in BGP so we can see that for example:

SW2#ping 192.168.1.4

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.4, timeout is 2 seconds:
.....

this fails because SW3 doesn't know IP subnet 10.2.55.0/24

the subnet is not advertised by OSPF and not advertised by BGP (no network command matching the border subnet 10.2.55.0/24)

As a result of this internal devices in the two sites are not aware of it.

R3 config:

router ospf 1
log-adjacency-changes
redistribute bgp 200 subnets
network 192.168.1.0 0.0.0.255 area 0
!
router bgp 200
no synchronization
bgp log-neighbor-changes
redistribute ospf 1
neighbor 10.2.55.132 remote-as 100
no auto-summary
!

Sw2 config:

router ospf 1
log-adjacency-changes
redistribute bgp 100 metric 10 subnets
default-information originate
!
outer bgp 100
no synchronization
bgp log-neighbor-changes
redistribute ospf 1
neighbor 10.2.55.133 remote-as 200
no auto-summary
!

for example by adding under router  bgp the line

router bgp XX

network 10.2.55.0 mask 255.255.255.0

the IP subnet is placed in the BGP table and will be redistributed into OSPF

Edit:

I don't see under R3 config a network area command for border IP subnet.

You may have done changes to your initial configuration during the troubleshooting phase.

However, advertising it under BGP process should be a better choice.

Hope to help

Giuseppe

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco