cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
790
Views
0
Helpful
5
Replies

Networks Routing in OSPF and BGP

Good Boite Gentlemen,

I'm having a small doubt related to routing with BGP and OSPF. I have the scenario in the picture attached in the topic. I would like the valid ips or networks that are in the home Router OSPF be disclosed in EBGP. I thank you for your help!

5 Replies 5

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Tiago,

>> I would like the valid ips or networks that are in the home Router OSPF be disclosed in EBGP

use network commands in BGP matching the desired ip subnets even if learned by OSPF

router bgp XX

network 172.24.234.0 mask 255.255.255.0

notice also that no auto-summary allows to see IP subnets of other major networks

Hope to help

Giuseppe

You could also redistribute ospf into bgp:

     router bgp

          redistribute ospf

This would inject any ospf routing table entries or enabled interfaces into the ip bgp table.

This method will also allow you to filter routes and apply tags and metric values via a route-map.

Hope that helps, Ash.

Good Afternoon Gentlemen

I put the setting as the friend showed up for my redistribute OSPF routes into BGP and yet when a drop ip from one end to another that are behind the EBGP the other end, not receive any reply from the host. I will send a configuration of edge routers!

BORDER-01

Current configuration : 767 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname BORDER-01
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 189.1.1.1 255.255.255.252
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 200.1.1.1 255.255.255.252
duplex auto
speed auto
!
interface FastEthernet1/1
no ip address
duplex auto
speed auto
!
router ospf 100
log-adjacency-changes
network 189.1.1.0 0.0.0.3 area 1
!
router bgp 1000
bgp log-neighbor-changes
bgp redistribute-internal
no synchronization
neighbor 200.1.1.2 remote-as 2000
network 189.1.1.0 mask 255.255.255.0
redistribute ospf 100
!
ip classless
!
!
!
!
!
!
!
line con 0
line vty 0 4
login
!
!
!
end

BORDER-02

Current configuration : 769 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname BORDER-02
!
!
!
!
!
interface FastEthernet0/0
ip address 189.2.2.13 255.255.255.252
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 200.1.1.2 255.255.255.252
duplex auto
speed auto
!
interface FastEthernet1/1
no ip address
duplex auto
speed auto
!
router ospf 100
log-adjacency-changes
network 189.2.2.12 0.0.0.3 area 2
!
router bgp 2000
bgp log-neighbor-changes
bgp redistribute-internal
no synchronization
neighbor 200.1.1.1 remote-as 1000
network 189.2.2.0 mask 255.255.255.0
redistribute ospf 100
!
ip classless
!
!
!
!
!
!
line con 0
line vty 0 4
login
!
!
!
end

The network statement in bgp for 189.1.1.0 may be clashing, so I would remove this.

To test redistribution from OSPF to BGP, we must first check that OSPF is enabled for the interface and that the network (and appropriate LSA) is in our OSPF link database.

Can we have output for:

     border1# show ip ospf int -> ensure fa0/0 is present

     border1# show ip ospf data data -> check for type 2 lsa for 189.1.1.0/24

Also, redistribution will only occur if the source routing protocol has the route in the routing table:

     border1# show ip route ospf -> check for 189.1.1.0/24 net

Finally, if the above is correct border1 should redistribute from ospf to bgp - check the bgp table to make sure:

     border1# show ip bgp -> check for 189.1.1.0/24 net

If that is all good, the problem may be with the ebgp exchange process - but lets test the above first!

Regards, Ash.

Hello Tiago,

each OSPF domain needs a default route generated by border router or OSPF only routers cannot ping each other !

try

Border-1

router ospf 100

default-information originate always

Border-2

router ospf 100

default-information originate always

OR

router ospf 100

redistribute bgp XXX subnets

!

you need to redistribute BGP into OSPF ( note: not recommended in real world !!!!)

this is the reason why I recommend to use network command in BGP: it provides an easy way to avoid mutual bidirectional redistribution and then if  generating a default route is not enough I would spend redistribution ticket only in the BGP into OSPF direction

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