cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1176
Views
0
Helpful
15
Replies

ospf redistribute E2 route is preferred over intra-area route

sachin30720041
Level 1
Level 1

Hello,

 

R15 is advertising its loopback0 15.15.15.15. R16 is redistributing routes received from R15. Similarly R17 and R18 are also redistributed routes received from neighbor.I have posted the configuration of all the routers. On R16, I expect 15.15.15.15 as an intra area route. but I see 15.15.15.15 as an External route. And if I ping 15.15.15.15 from R16 ping goes to R17 ->R18 -> R15.  I am not sure why external route is preferred on intra-area route on R1.

 

RP/0/0/CPU0:ios#show route ospf
Thu Apr 28 19:07:37.789 UTC

O E2 15.15.15.15/32 [110/1] via 100.160.170.17, 00:15:36, GigabitEthernet0/0/0/1

 

R17---------------R16-------R15

  |                                                     |

  |                                                     |

  |_______________R18______ __|

   

 

xrv15
------
int gi0/0/0/0
ip address 100.150.160.15 255.255.255.0
no sh


int gi0/0/0/1
ip address 100.150.180.15 255.255.255.0
no sh

int lo0
ip address 15.15.15.15 255.255.255.255

 

router ospf 1
redistribute ospf 2
area 0
int gi0/0/0/0
int lo0

 

router ospf 2
redistribute ospf 1
area 0
int gi0/0/0/1


xrv16
-------------
int gi0/0/0/0
ip address 100.150.160.16 255.255.255.0
no sh


int gi0/0/0/1
ip address 100.160.170.16 255.255.255.0
no sh

int lo0
ip address 16.16.16.16 255.255.255.255

 

router ospf 1
redistribute ospf 2

area 0
int gi0/0/0/0


router ospf 2
redistribute ospf 1
area 0
int gi0/0/0/1

xrv17
-------------
int gi0/0/0/0
ip address 100.170.180.17 255.255.255.0
no sh


int gi0/0/0/1
ip address 100.160.170.17 255.255.255.0
no sh

int lo0
ip address 17.17.17.17 255.255.255.255

 

router ospf 1
redistribute ospf 2
area 0
int gi0/0/0/1

router ospf 2
redistribute ospf 1
area 0
int gi0/0/0/0

xrv18
-------------
int gi0/0/0/1
ip address 100.150.180.18 255.255.255.0
no sh


int gi0/0/0/0
ip address 100.170.180.18 255.255.255.0
no sh

int lo0
ip address 18.18.18.18 255.255.255.255

 

router ospf 1
redistribute ospf 2
area 0
int gi0/0/0/0

 

router ospf 2
redistribute ospf 1
area 0
int gi0/0/0/1

          

Thanks,

Sachin

1 Accepted Solution

Accepted Solutions

Harold Ritter
Level 12
Level 12

Hi @sachin30720041 ,

 

This is expected behavior. The cost to 15.15.15.15 through ospf 1 is 2 and the cost through ospf 2 is 1. The intra area vs external type 2 doesn't come into play when routes are learnt via 2 ospf routing processes. Only the cost will be taken in consideration in this context. This is why the route via ospf 2 is preferred.

 

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

View solution in original post

15 Replies 15

..

 

first check the Loopback is advertise as LAS5 or LSA1 ?
second refer to link and change distance. 

It seems to me that you configure all Router as ABR. This probably is causing this behavior.

sachin30720041
Level 1
Level 1

15.15.15.15 are present in LSA-1 and LSA-5.

Harold Ritter
Level 12
Level 12

Hi @sachin30720041 ,

 

This is expected behavior. The cost to 15.15.15.15 through ospf 1 is 2 and the cost through ospf 2 is 1. The intra area vs external type 2 doesn't come into play when routes are learnt via 2 ospf routing processes. Only the cost will be taken in consideration in this context. This is why the route via ospf 2 is preferred.

 

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

xrv16
-------------
int gi0/0/0/0
ip address 100.150.160.16 255.255.255.0 <- not same subnet !!!
no sh

 

router ospf 1
redistribute ospf 2

area 0
int gi0/0/0/0

xrv17
-------------

int gi0/0/0/1
ip address 100.160.170.17 255.255.255.0 <- not same subnet !!!
no sh

 

router ospf 1
redistribute ospf 2
area 0
int gi0/0/0/1

 

Misconfig the interface and router OSPF process 

can I see show ospf interface for all router ?

Harold Ritter
Level 12
Level 12

HI @MHM Cisco World ,

 

xrv16 and xrv17 do share a common subnet.

 

xrv16
-------------
int gi0/0/0/1
ip address 100.160.170.16 255.255.255.0

xrv17
-------------
int gi0/0/0/1
ip address 100.160.170.17 255.255.255.0

 

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

@Harold Ritter but the OSPF process 1 have different interface !!!! i.e. the subnet between router is same but each side use different OSPF process.!!!!

Harold Ritter
Level 12
Level 12

Hi @MHM Cisco World

 

That is not really what is at stake here. The original poster is asking why R16 prefers the E2 over the intra area route. Fixing what you pointed out will not change the outcome of why R16 prefers the E2.

 

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Lo is LSA5 not LSA1 so Lo is redistribute to this router not learn direct as intra-area.
after we fix this issue router will prefer intra-area because it cost "one link between R16 and R15" than "R17-R18-R15".

Harold Ritter
Level 12
Level 12

Hi @MHM Cisco World ,

 

Intra area cost for 15.15.15.15 on R16 is 2 (1 for link between R16 and R15 and 1 for lo0). The E2 routes has a cost of 1 (external cost) as it is E2 it will not consider the internal cost. If these two routes where learnt via one ospf process the intra area would be preferred, but as they are learnt via two ospf processes, the intra area vs E2 does not come into play.

 

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

also router with two interface and run two different process one for each interface , how this work?
He design lab and we must guide him to right design.

Harold Ritter
Level 12
Level 12

> also router with two interface and run two different process one for each interface , how this work?

It works because of the redistribution between ospf 1 and ospf 2 on each and every router.

 

He design lab and we must guide him to right design.

 

I believe the goal of the original poster is simply to experiment with different things. Feel free to provide guidance and recommendations.

 

Regards,

 
Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

@Harold Ritter @sachin30720041 
R1-OSPF2-R2-OSPF1-R3-OSPF2 ....etc. are this work ???
He must config two process OSPF 1 and OSPF 2 and there is ASBR in boundary between the two process
other routers inside Area of OSPF 1 must run one process not all router is boundary and behave like ASBR.