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

How OSPF picks the path with "maximum-paths 1" command?

msantiveri
Level 1
Level 1

Hello,

I would like to know how OSPF picks a path from two available with the same cost when maximum-paths 1 comand is applied.

An example using GNS3:

Before maximum-paths 1 command

R1#sh ip route 77.77.77.77
Routing entry for 77.77.77.77/32
  Known via "ospf 10", distance 110, metric 4, type intra area
  Last update from 4.4.4.2 on FastEthernet0/1, 00:32:08 ago
  Routing Descriptor Blocks:
    4.4.4.2, from 77.77.77.77, 00:32:08 ago, via FastEthernet0/1
      Route metric is 4, traffic share count is 1
  * 1.1.1.2, from 77.77.77.77, 00:32:08 ago, via FastEthernet0/0
      Route metric is 4, traffic share count is 1

After  maximum-paths 1 command

R1#sh ip route 77.77.77.77
Routing entry for 77.77.77.77/32
  Known via "ospf 10", distance 110, metric 4, type intra area
  Last update from 1.1.1.2 on FastEthernet0/0, 00:00:08 ago
  Routing Descriptor Blocks:
  * 1.1.1.2, from 77.77.77.77, 00:00:08 ago, via FastEthernet0/0
      Route metric is 4, traffic share count is 1

Why 1.1.1.2 and not 4.4.4.2?

Thanks,

Miquel

8 Replies 8

Mark Malone
VIP Alumni
VIP Alumni

Hi

it depends on the CEF/ FIB tables and ECMP and how its processing traffic and also if the traffic is originating from the router itself or passing through it can alter it , it can depend as well on the type of CEF load sharing per destination / per packet etc that's in place

http://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/5212-46.html

This command as an example may help you see what the path it wil take through CEF will be even when the maximum path is in use at ospf

xxxxxxxx#sh ip cef exact-route 10.1.67.69 1.1.1.1
10.1.67.69 -> 1.1.1.1 =>IP adj out of GigabitEthernet0/0/1.100, addr 10.1.67.69
xxxxxxxxx

Joseph W. Doherty
Hall of Fame
Hall of Fame

Although any one platform/IOS combination may be deterministic, it may vary between platforms and IOS versions, I would suggest you treat it as non-deterministic.

The thing is that in my real topology (attached) sometimes I'm having asymetric routing issues on R1 after one of the inter-site links (SW 1 or SW 2) fails and comes back.and I suspect that maximum-paths 1 is the responsible.

R2, R3, R4 and R5 are ASA firewalls on the real network so they block asymetric routing.

What fo you guys think?

 

If asymmetrical routing can be an issue, then you shouldn't be using ECMP.  Cost your paths to insure traffic is symmetrical.

Yeah, I though about it but then all VLANs go through the same link and my costumer wants one specific VLAN running over one inter-site link and all the rest over the other one.

I also though about costs + tracked static route for that specific VLAN but unfortunately my R1 (a 2960CX switch) doesn´t suport IP SLA..

The ideal situation would be to influence OSPF to pick a preferred path when maximum-path 1 is applied but if not possible, what about two OSPF processes?

PBR(?)

maybe you can change the costs on interface

 

playerplease2
Level 1
Level 1
Seems like the router will choose the neighbor that send the oldest LS. I jsut made a quick test , and if I do clear ip ospf process on one neighbor, it will then pick the other router as next hop ( with max-path 1 of course)
Review Cisco Networking for a $25 gift card