Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

trouble in redistributing ospf routes into bgp

Hi,

I am trying to aggregate routes while advertising BGP. I have two problems while doing that.

Prob1:

I am trying to redistribute OSPF routes into BGP.

This is my routing table.

     60.0.0.0/8 is variably subnetted, 4 subnets, 2 masks

C       60.1.1.32/27 is directly connected, Loopback51

C       60.1.1.0/27 is directly connected, Loopback50

S       60.1.1.0/24 is directly connected, Null0

C       60.1.1.64/27 is directly connected, Loopback52

I tried to redistribute this into bgp. So used prefix list to advertise only one route.

router bgp 30

no synchronization

bgp log-neighbor-changes

network 192.135.250.0 mask 255.255.255.240

aggregate-address 60.1.1.0 255.255.255.128  --> Prob 2

redistribute ospf 10 route-map chid  --> Prob 1

neighbor 192.168.1.5 remote-as 10

no auto-summary

Regarding to prob 1

Why "sho ip bgp" does not display any output. I tried several variants with that prefix list. Nothing helps.

ip prefix-list chid seq 5 permit 60.1.1.0/24 le 32

router ospf 10

log-adjacency-changes

network 50.1.1.0 0.0.0.255 area 0

network 60.1.1.0 0.0.0.255 area 0

R3(config-router)#do sho ip bgp

BGP table version is 20, local router ID is 192.168.1.6

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

*> 192.135.250.0/28 0.0.0.0                  0         32768 i

Regarding to prob 2:

I tried to summarize OSPF routes into the routing table.

router ospf 10

log-adjacency-changes

summary-address 60.1.1.0 255.255.255.0

This is again is showing as individual routes in the routing table.

Can you please help me figure what is the problem.

Thanks

Chidambaram

Everyone's tags (4)
1 ACCEPTED SOLUTION

Accepted Solutions
Hall of Fame Super Silver

Re: trouble in redistributing ospf routes into bgp

Hello Chidambaram,

we should see the configuration of the route-map used to redistribute OSPF into BGP to say why it didn't work.

Edit:

you have defined a prefix-list chid, I don't see a route-map named chid, you cannot invoke the prefix list directly you need to invoke it from a route-map

route-map chid permit 10

match ip address prefix chid

However, you don't need to redistribute the OSPF routes into BGP to have them advertised, you can use the network command under BGP because it just check if the IP prefix is in the IP routing table it is not limited to connected routes.

To be noted all the 60.1.1.x subnets are actually connected routes from your show ip route

the list of IP subnets become:

router bgp

network 60.1.1.0 mask 255.255.255.224

network 60.1.1.32 mask 255.255.255.224

network 60.1.1.64 mask 255.255.255.224

! at this point you should have the three IP subnets in the BGP table

aggregate-address 60.1.1.0 255.255.255.128 summary-only

! this should produce the desired aggregate and should remove component routes

note: you don't need the static route to null0 with the aggregate command, however you can choice to advertise the network with a network command

router bgp

network 60.1.1.0 mask 255.255.255.0

This is just a question of choice and this is an alternative solution. It was the old way to create aggregate routes before the aggregate command.

problem 2:

OSPF summary-address would work only for OSPF external routes (locally injected on this node) not for OSPF internal routes so this approach does not work. They are internal routes matching network .. area command

Hope to help

Giuseppe

3 REPLIES
Hall of Fame Super Silver

Re: trouble in redistributing ospf routes into bgp

Hello Chidambaram,

we should see the configuration of the route-map used to redistribute OSPF into BGP to say why it didn't work.

Edit:

you have defined a prefix-list chid, I don't see a route-map named chid, you cannot invoke the prefix list directly you need to invoke it from a route-map

route-map chid permit 10

match ip address prefix chid

However, you don't need to redistribute the OSPF routes into BGP to have them advertised, you can use the network command under BGP because it just check if the IP prefix is in the IP routing table it is not limited to connected routes.

To be noted all the 60.1.1.x subnets are actually connected routes from your show ip route

the list of IP subnets become:

router bgp

network 60.1.1.0 mask 255.255.255.224

network 60.1.1.32 mask 255.255.255.224

network 60.1.1.64 mask 255.255.255.224

! at this point you should have the three IP subnets in the BGP table

aggregate-address 60.1.1.0 255.255.255.128 summary-only

! this should produce the desired aggregate and should remove component routes

note: you don't need the static route to null0 with the aggregate command, however you can choice to advertise the network with a network command

router bgp

network 60.1.1.0 mask 255.255.255.0

This is just a question of choice and this is an alternative solution. It was the old way to create aggregate routes before the aggregate command.

problem 2:

OSPF summary-address would work only for OSPF external routes (locally injected on this node) not for OSPF internal routes so this approach does not work. They are internal routes matching network .. area command

Hope to help

Giuseppe

New Member

trouble in redistributing ospf routes into bgp

Thanks much Giuseppe yeah there was a problem in my route map configuration. Just realised it when you pointed out. Also the alternate solution you provided makes much sense than what i did. Its easier too. Will follow that way. I was under the assumption that only connected interfaces can be advertised. So this makes my redistribution easier

Can you explain the second reason please. Loopback address are also external address right.

Thanks

Chidambaram

Hall of Fame Super Silver

trouble in redistributing ospf routes into bgp

Hello Chidambaram,

with external addresses I mean IP subnets that are injected in OSPF with the use of redisribute command in router ospf process.something like

router ospf 1

redistribute eigrp 100 subnets

In your case you have a line

network 60.1.1.0 0.0.0.0.255 area 0

this line means that all interfaces with an IP address within 60.1.1.0/24 participate in OSPF:

they run OSPF to build OSPF adjacencies and their associated IP subnets are advertised in OSPF ( listed in Router LSA or in network LSA)

As a result of this the summary-address 60.1.1.0 command is not effective at all.

Hope to help

Giuseppe

1463
Views
0
Helpful
3
Replies
CreatePlease to create content