cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
968
Views
0
Helpful
3
Replies

OSPF Two Default Route from EIGRP and Static

mhiyoshi
Level 3
Level 3

R2 received Default Route through EIGRP (R1) and redistribute it by configuring "default-information originate", the defaullt metric value is 1.

R4 makes its Default Route by configuring "ip route 0 0 next-hop" and redistribute it by configuring "default-information originate metric 20"

 

The result is below, basically R3 prioritizes the lower metric route, so I think R3 selects R2 as next-hop of the default route. however R3 selects R4.

 

R3#sh ip route ospf
O*E2 0.0.0.0/0 [110/20] via 10.0.30.4, 00:02:57, FastEthernet0/0

 

if R2 changes its default route by configuring below

 

R2(config)#router ospf 1
R2(config-router)#default-information originate always

 

Then R3 changes to select R2 as the next-hop of the default route.

 

R3#sh ip route ospf
O*E2 0.0.0.0/0 [110/1] via 10.0.20.2, 00:00:04, FastEthernet0/1

 

[Question]

Why R3 OSPF router can not select the lower metric of default-route? 

What is the better solution?

In my opinion R2 receives the default route through EIGRP, but normally there is STATIC default route and
configures the default-information originate or always option to generate the default-route from OSPF router itself, especially for considering backup default route. Currently if there is two default route like STATIC and EIGRP, STATIC is prioritized regardless of OSPF metric value.

R3(config)#int f0/0
R3(config-if)#shutdown
*Mar  1 21:16:47.914: %OSPF-5-ADJCHG: Process 1, Nbr 4.4.4.4 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached
*Mar  1 21:16:49.902: %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to administratively down
*Mar  1 21:16:50.902: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to down

R2#sh ip route eigrp
D*EX 0.0.0.0/0 [170/2560025856] via 10.0.10.1, 00:03:20, FastEthernet0/0

[Topology]
Attached.

[configuration]

R4
router ospf 1
 router-id 4.4.4.4
 network 10.0.30.4 0.0.0.0 area 0
 default-information originate metric 20
!
ip route 0.0.0.0 0.0.0.0 4.4.4.254

 

R3
router ospf 1
 router-id 3.3.3.3
 network 10.0.20.3 0.0.0.0 area 0
 network 10.0.30.3 0.0.0.0 area 0

 

R2
router eigrp 1
 redistribute ospf 1 metric 1 1 1 1 1
 network 10.0.10.2 0.0.0.0
 no auto-summary
!
router ospf 1
 router-id 2.2.2.2
 redistribute connected subnets
 redistribute eigrp 1 subnets
 network 10.0.20.2 0.0.0.0 area 0
 default-information originate

 

R1
router eigrp 1
 redistribute static metric 1 1 1 1 1
 network 10.0.10.0 0.0.0.255
 no auto-summary
!
ip route 0.0.0.0 0.0.0.0 1.1.1.254

 

1 Accepted Solution

Accepted Solutions

Rolf Fischer
Level 9
Level 9

Hi,

without the always-keyword, R2 needs a non-OSPF default-route in order to originate an external LSA for the 0.0.0.0/0 prefix.

Before  R4 comes into play, this route is learned via EIGRP:

 

R2#sh ip route eigrp
D*EX 0.0.0.0/0 [170/2560025856] via 10.0.10.1, 00:03:20, FastEthernet0/0

 

As soon as R4 originates an OSPF default-route too, the default route in R2's local routing-table will be overwritten because the OSPF-route has a lower AD (110). With the disappearance of the EIGRP route, the respective LSA will also be deleted. So R3 doesn't have a choice as R4's Default-route is the only one in the LSDB.

There are several ways to change this, you could, for instance, increase the AD for OSPF external routes on R2:

R2(config)#router ospf 1
R2(config-router)#distance ospf external 180

 

HTH

Rolf

 

View solution in original post

3 Replies 3

Rolf Fischer
Level 9
Level 9

Hi,

without the always-keyword, R2 needs a non-OSPF default-route in order to originate an external LSA for the 0.0.0.0/0 prefix.

Before  R4 comes into play, this route is learned via EIGRP:

 

R2#sh ip route eigrp
D*EX 0.0.0.0/0 [170/2560025856] via 10.0.10.1, 00:03:20, FastEthernet0/0

 

As soon as R4 originates an OSPF default-route too, the default route in R2's local routing-table will be overwritten because the OSPF-route has a lower AD (110). With the disappearance of the EIGRP route, the respective LSA will also be deleted. So R3 doesn't have a choice as R4's Default-route is the only one in the LSDB.

There are several ways to change this, you could, for instance, increase the AD for OSPF external routes on R2:

R2(config)#router ospf 1
R2(config-router)#distance ospf external 180

 

HTH

Rolf

 

Hello Rolf

Thank you for your precious information.

Well I have tested below, then it has been resolved this issue.


[Case-1]

R2(config)#router ospf 1
R2(config-router)#distance ospf external 169
R2#sh ip route eigrp

R2#sh ip route ospf
O*E2 0.0.0.0/0 [169/20] via 10.0.20.3, 00:00:06, FastEthernet0/1

R3#sh ip route ospf
O*E2 0.0.0.0/0 [110/20] via 10.0.30.4, 00:00:17, FastEthernet0/0

[Case-2]

R2(config)#router ospf 1
R2(config-router)#distance ospf external 170
R2#sh ip route eigrp
D*EX 0.0.0.0/0 [170/2560025856] via 10.0.10.1, 00:00:06, FastEthernet0/0

R3#sh ip route ospf
O*E2 0.0.0.0/0 [110/1] via 10.0.20.2, 00:00:22, FastEthernet0/1

 

Best Regards,

Masanobu Hiyoshi

 

Thanks for using the rating system!

One more note: Although it seems to work with an AD of 170 for OSPF external routes in this case, you should generally avoid using another routing-protocol's default AD.

Here you can find an interesting discussion on this subject: https://supportforums.cisco.com/discussion/11968131/dilemma-understanding-routing-table-building

Don Slice (EIGRP Developer) put it in a nutshell:

We try to make the routing protocols behave themselves when rational things are done. Making two protocols compete with the same AD is not rational and I'm not surprised the results are not what you expect.

 

Best regards,

Rolf

Review Cisco Networking for a $25 gift card