cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
929
Views
0
Helpful
8
Replies

Redistributing Host ip address from OSPF to BGP

oscarc
Level 1
Level 1

Redistributing OSPF to BGP

This my scenario:

RT(7)--------OSPF Area 0 ---------- RT(5) -------------BGP--------- (RT10)

X.X.X.0/24 Area 2

I want to redistribute a host ip address (X.X.X.X/32) from OSPF to Private BGP session ( RT(5) ).

The host address belongs to X.X.X.0/24 Area 2.

This is a my configuration, and the problem is that when I want to know my advertised ips to the remote BGP peer (show ip bgp neighbors Z.Z.Z.2 advertised-routes), I just can see the loopback ip address (J.J.J.J), the X.X.X.X doesn't appear and indeed is not announced to the BGP peer. Seems a subnetting problem and I don't know whether I would need to split the X.X.X.0/24 in different subnets and add it in ospf area 2 or I'm doing something wrong.

I can not get access to RT10, but I know that there is an access list that just permit this host ip address, that why I have to advertise the host ip address instead all /24.

RT(7)

interface gigabitEthernet 0

ip address Y.Y.Y.1 255.255.255.0

interface gigabitEthernet 1

ip address X.X.X.1 255.255.255.0

router ospf 100

area 2 stub no-summary

network X.X.X.0 0.0.0.255 area 2

network Y.Y.Y.0 0.0.0.255 area 0

ip route X.X.X.0 255.255.255.0 Null 180

RT(5)

interface looback0

ip address J.J.J.J 0.0.0.0

interface gigabitEthernet 0

ip address Y.Y.Y.2 255.255.255.0

interface gigabitEthernet 1

ip address Z.Z.Z.1 255.255.255.0

router ospf 100

network Y.Y.Y.0 0.0.0.255 area 0

network J.J.J.J 0.0.0.0 area 0

router bgp 100

redistribute ospf 100

neighbor Z.Z.Z.2 prefix list hostX-J

ip route J.J.J.J 255.255.255.255 Null 180

ip prefix-list hostX-J description hostX-J

ip prefix-list hostX-J seq 5 permit X.X.X.X/32

ip prefix-list hostX-J seq 10 permit J.J.J.J/32

Thanks in advance for your help.

1 Accepted Solution

Accepted Solutions

Hi,

oh, where did you lost the connectivity to the host from?

RT(5) or RT(10)?

It might be necessary to add

router bgp 100

redistribute ospf 100 match external

on your RT(5) to make the OSPF redistribution to BGP work.

BR,

Milan

View solution in original post

8 Replies 8

milan.kulik
Level 10
Level 10

Hi,

are you sure there's a ACL requsting a host prefix (/32) to  be advertised by BGP?

If yes, you can't redistribute it from OSFP, as /32 prefix is not available in your OSFP database.

IMHO, the easiest way would be configuring

RT(5):

ip route X.X.X.X 255.255.255.255 Y.Y.Y.1

router bgp 100

network X.X.X.X mask 255.255.255.255

neighbor Z.Z.Z.2  next-hop-self

neighbor Z.Z.Z.2 prefix list hostX-J out

(the keyword out was missing in your current config)

HTH,

Milan

Hi Milan,

Thanks for your answer. I'm completly sure that our BGP peer only accepts the host ip address, they use to work this way. I double check with them :-/

Regarding your answer, the problem is that if I add a static route and R7 falls, the host could not be reached by another path. The R7 is redunded, there is another router belonging to Area0 that can reach this host. I didn't add before in my scenario in order to make it easier.

Milan,

By the way, you were right the keyword "out" wos missed.

Thanks

Hi,

OK, in that case you need to push X.X.X.X/32 to your OSPF.

You could try

RT(7)

ip route X.X.X.X 255.255.255.255 gigabitEthernet 1

router ospf 100

redistribute static subnets

If necessary, you can specify metric in the redistribute command or use a route-map to filter prefixes redistributed to OSPF.

HTH,

Milan

Milan,

I did what you suggested but we loss conectivity to the host just in the moment of adding the static route. I also tried just redistributing connected with an access-list, but I also lose connectivity. since is a Prod server, I can not make more tests today :-/. I'll try tonight and I get back to you tomorrow with the results.

Thanks

Oscar

Hi,

oh, where did you lost the connectivity to the host from?

RT(5) or RT(10)?

It might be necessary to add

router bgp 100

redistribute ospf 100 match external

on your RT(5) to make the OSPF redistribution to BGP work.

BR,

Milan

Hi,

We lose connectivity from other OSPF areas. As soon as I got lost packets (I was doing a ping from my PC belonging a different area)  i delete the route. Maybe tonight I'll can spend more time couse will not be so critical.

I'll back tomorrow with the results.

thanks

Hi,

In the end your proposed solution worked properly.

Thanks for your help!

Oscar

Review Cisco Networking for a $25 gift card