Learn route via ospf rather than ebgp

Unanswered Question
Jul 23rd, 2008

Hi all,

It is strange that I don't know why the 26 router will learn below network via ospf

method, I think it should be learned via 17A ebgp Router (192.168.1.2). Anyone know

what happen on it ? Thank you

2600#sh ip route

O E2 172.20.1.0 [110/1] via 10.1.1.3, 00:11:10, Ethernet0/1

O E2 172.20.1.4 [110/1] via 10.1.1.3, 00:11:10, Ethernet0/1

O E2 192.168.170.192 [110/1] via 10.1.1.3, 00:11:10, Ethernet0/1

O E2 192.168.170.128 [110/1] via 10.1.1.3, 00:11:10, Ethernet0/1

O E2 192.168.170.64 [110/1] via 10.1.1.3, 00:11:10, Ethernet0/1

O E2 192.168.170.0 [110/1] via 10.1.1.3, 00:11:10, Ethernet0/1

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
mohammedrafiq Wed, 07/23/2008 - 06:02

Hi,

Is BGP peering working on 2600 router ?

can you send output of "sh ip bgp " on 2600 router.

Regards,

acbenny Wed, 07/23/2008 - 06:04

sorry, the attached file already has "show ip bgp" output.

thanks

mohammedrafiq Wed, 07/23/2008 - 06:17

Hi,

AS I can understand.

AS 20 is advertising 192.168.169.0, which is learnt by 17A on 2600,

AS 30 is advertising 192.168.170.0 which is learnt by 17B on 3600.

NOW

2600 and 3600 router running ospf between them.so 3600 is sending 192.168.170.0 over ospf to 2600.

Regards,

acbenny Wed, 07/23/2008 - 06:25

But In the view of 2600, it will first to learn 192.168.170/24 from 192.168.1.2

Why only 202.122.65.0/24 and 192.168.169.0/24 can be learnt via 192.168.1.2. But 192.168.170.0/24 can't

mohammedrafiq Wed, 07/23/2008 - 06:35

subnet 192.168.170.0 is advertise by as 30 on 3600 where you redistributing into ospf , so 2600 is learning this by ospf over e0/1.if AS 20 advertise this subnet towards 2600, then it will be learnt by ebgp and will be in routing table as BGP route instead of ospf.

acbenny Wed, 07/23/2008 - 06:49

thanks, I still have question

At the same time, 192.168.170.0/26, 192.168.170.64/26 is advertised by 17B to downward direction (36->26 via ospf) and

upward direction (16C->14->16B->17A->26). Then downward direction will be chosen? The upward direction

whole path is ebgp

lukacovsky Wed, 07/23/2008 - 07:03

Apparently, you are not getting those networks via EBGP session with 192.168.1.2, but only via IBGP session.

Because IBGP has admin distance of 200, OSPF routes gets into the routing table with admin distance of 110.

Now we should start thinking why 17A does not send you the 192.168.170/26 networks. That's because you are advertising that route via redistribution from OSPF to BGP!

From 26 and 36 routers, you should advertise only networks which were originated in your AS.

lukacovsky Wed, 07/23/2008 - 07:08

Start filtering the redistribution from OSPF to BGP - create a route-map and match the OSFP tag 30.

acbenny Wed, 07/23/2008 - 07:51

Hi all,

It solve the problem after apply ip as-path access-list 10 permit ^$.

Thank you very much !

Sorry that two more questions.

(1)

You said Router 26 received 192.168.170/26

via ospf 10.1.1.3 and advertise back to Router 17A. So 17A stop advertise

192.168.170/26 to Router 26. So why 192.168.169/26 or 202.122.65.0/24 not follow above

process to produce this issue ?

(2)

Why this issue only occur in Router 26 and 36, why it not affect to other routers ?

Is it other router are fully configured ebgp, so that it can recieve the same route

from different direction and advertise to other direction.

lukacovsky Wed, 07/23/2008 - 08:25

Hi,

Good questions, indeed. You must realize that OPSF and BGP propagates their routes differently and speed of these propagations differ as well.

Also, you might configured OSPF before you established some EBGP peerings...

Main thing is that you overrided the split-horizon rule by sending routes back to BGP via OSPF redistribution. And this had to be corrected.

__

Please rate the post if you find it helpful.

acbenny Wed, 07/23/2008 - 08:38

Sorry lukacovsky,

The fault still occur, I don't know why the 26 router will learn below network via ospf

method, I think it should be learned via 17A ebgp Router (192.168.1.2).

I have check that this time 17A is able to advertise below route to Router 26. But from show ip bgp,

these route is in "r" status. Why ospf (10.1.1.3) win ebgp (192.168.1.2) ?

Attach config For your reference. Thank you

2600#sh ip route

O E2 172.20.1.0 [110/1] via 10.1.1.3, 00:11:10, Ethernet0/1

O E2 172.20.1.4 [110/1] via 10.1.1.3, 00:11:10, Ethernet0/1

O E2 192.168.170.192 [110/1] via 10.1.1.3, 00:11:10, Ethernet0/1

O E2 192.168.170.128 [110/1] via 10.1.1.3, 00:11:10, Ethernet0/1

O E2 192.168.170.64 [110/1] via 10.1.1.3, 00:11:10, Ethernet0/1

O E2 192.168.170.0 [110/1] via 10.1.1.3, 00:11:10, Ethernet0/1

Attachment: 
lukacovsky Wed, 07/23/2008 - 08:57

do this:

router bgp 10

redistribute ospf 123 route-map noBGP

route-map noBGP deny 10

match tag 10

route-map noBGP permit 20

it will stop redistributing the routes learned from BGP back into BGP

OSPF routes are automatically tagged during the redistribution with the tag of your ASN.

acbenny Wed, 07/23/2008 - 09:20

Still fail, the route seems flapping

router bgp 10

no synchronization

bgp log-neighbor-changes

network 192.168.1.0 mask 255.255.255.252

network 192.168.168.0 mask 255.255.255.192

redistribute ospf 123 metric 100 route-map noBGP

neighbor 10.10.10.2 remote-as 10

neighbor 10.10.10.2 next-hop-self

neighbor 192.168.1.2 remote-as 20

neighbor 192.168.1.2 filter-list 1 out

no auto-summary

!

ip http server

no ip http secure-server

ip classless

!

ip as-path access-list 1 permit ^$

!

!

!

route-map noBGP deny 10

match tag 10

!

route-map noBGP permit 20

202.122.64.0/26 is subnetted, 4 subnets

O 202.122.64.192 [110/20] via 10.1.1.1, 00:12:01, Ethernet0/1

O 202.122.64.128 [110/20] via 10.1.1.1, 00:12:01, Ethernet0/1

O 202.122.64.64 [110/11] via 10.1.1.1, 00:12:01, Ethernet0/1

O 202.122.64.0 [110/11] via 10.1.1.1, 00:12:01, Ethernet0/1

202.122.65.0/26 is subnetted, 4 subnets

O E2 202.122.65.192 [110/1] via 10.1.1.3, 00:00:05, Ethernet0/1

O E2 202.122.65.128 [110/1] via 10.1.1.3, 00:00:05, Ethernet0/1

O E2 202.122.65.64

B 202.122.65.0 [20/0] via 192.168.1.2, 00:00:00

172.20.0.0/30 is subnetted, 2 subnets

O E2 172.20.1.0 [110/1] via 10.1.1.3, 00:09:54, Ethernet0/1

O E2 172.20.1.4 [110/1] via 10.1.1.3, 00:00:04, Ethernet0/1

10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks

B 10.1.2.0/24 [200/100] via 10.10.10.2, 00:00:00

C 10.10.10.0/30 is directly connected, Ethernet0/0

C 10.1.1.0/24 is directly connected, Ethernet0/1

192.168.170.0/26 is subnetted, 4 subnets

O E2 192.168.170.192 [110/1] via 10.1.1.3, 00:00:04, Ethernet0/1

O E2 192.168.170.128 [110/1] via 10.1.1.3, 00:00:04, Ethernet0/1

O E2 192.168.170.64 [110/1] via 10.1.1.3, 00:00:04, Ethernet0/1

O E2 192.168.170.0 [110/1] via 10.1.1.3, 00:00:04, Ethernet0/1

192.168.1.0/30 is subnetted, 2 subnets

C 192.168.1.0 is directly connected, Serial0/1

B 192.168.1.4 [200/100] via 10.10.10.2, 00:00:00

192.168.168.0/26 is subnetted, 2 subnets

O E2 192.168.168.64 [110/1] via 10.1.1.3, 00:12:03, Ethernet0/1

C 192.168.168.0 is directly connected, Loopback0

192.168.169.0/26 is subnetted, 4 subnets

B 192.168.169.192 [200/100] via 10.10.10.2, 00:00:00

B 192.168.169.128 [200/100] via 10.10.10.2, 00:00:01

B 192.168.169.64 [20/0] via 192.168.1.2, 00:00:01

B 192.168.169.0 [20/0] via 192.168.1.2, 00:00:01

lukacovsky Wed, 07/23/2008 - 09:38

Do the same on the 36 router and clear bgp neighborship completly:

clear ip bgp *

lee.reade Wed, 07/23/2008 - 06:41

Hi,

r>i172.20.1.0/30 10.10.10.2 0 100 0 i

r>i172.20.1.4/30 10.10.10.2 0 100 0 30 i

These routes are only learned via 10.10.10.2, which is iBGP neighbour, so admin distance of 200, ospf = 110, so this is why this route takes effect.

r>i192.168.170.0/26 10.10.10.2 0 100 0 30 i

r>i192.168.170.64/26

10.10.10.2 0 100 0 30 i

These two are the same as above.

For the other two,(192.168.170.192/192.168.170.128) I can only think that they are being compared by the BGP process, and since the route via 10.10.10.2 is better than the one via 192.168.1.2 (shorted as path), then this route gets beat on admin distance by ospf.

So all routes chosen are ospf.

When you see the "r" in the show ip bgp output, this is a RIB failure which generally means that the router has a better route than the one learned via BGP.

HTH

LR

lukacovsky Wed, 07/23/2008 - 07:16

The main problem is that 17A router is not sending those networks via EBGP...

Actions

This Discussion