Friday, November 4, 2016

OSPF - Auto Cost Reference Bandwidth feature in Cisco IOS


In the case of OSPF, the OSPF metric – Cost is inversely proportional to interface bandwidth.

Meaning, the higher bandwidth link on your device will have lower cost.

But OSPF by default is unable to differentiate the cost properly for a device that has both TenG and Gig interfaces.

The reason why OSPF is unable to do so is because default reference bandwidth is 100 Mbps

And the formula used is
Interface Cost = Reference Bandwidth in Mbps / Interface Bandwidth

So for a TenG interface, since the default reference bandwidth is 100 Mbps and cost values range from 1 – 4294967, cost of a TenG will be 1.
Cost cannot go lower than 1

Cost of a Gig interface will be 1 as well.

The result of this can be illustrated in example below.

The Problem:

In figure above, PC is connected on LAN interface of router A.
Traffic from PC is destined towards the server shown in figure above.
Consider that the link between A and B is congested during production hours.
There is a high capacity TenG link between A and C.
OSPF is being used as IGP here.
From the perspective of router A, the default OSPF auto cost reference bandwidth is being used.
Router A is doing Equal Cost Multi Path because cost of both the possible paths towards the server upstream is the same.
This traffic flow is undesired because we do not want any more traffic load on the already congested link between A and B.

Workaround:


OSPF Auto-Cost reference bandwidth on router A needs to be modified so TenG interface of router A has a lower cost than its Gig interface.
As depicted in figure below, the reference bandwidth is raised to 10000

Once the reference bandwidth on router A is raised, router A knows that is has better interface connected towards router C.
Cost of the link between router A and C is 1 and the cost of link between router A and B is 10.
Traffic sourced from the PC destined to the server is now shifted towards the link between router A and C.

This feature of Cisco IOS comes handy when you have got a Layer 3 device in your data center that is aggregating Gig, TenG, 40G links.


 Another alternative solution would be to explicitly configure OSPF cost values under the interface.



Wednesday, December 16, 2015

OSPF Area Border Connection Behavior


OSPF Area Border Connection Behavior


Reference:

Designing Cisco Network Service Architectures ARCH Foundation Learning Guide - Cisco Press




Traffic crossing the backbone must get into an area by the shortest path and then stay in that area.

In this example, the link from D to E is in area 0. If the D-to-F link fails, traffic from D to F goes from D to G to E to F. Because D is an ABR for area 1, the traffic to F is all internal to area 1 and must remain in area 1. OSPF does not support traffic going from D to E and then to F because the D-to-E link is in area 0, not in area 1. A similar scenario applies for traffic from A to F: It must get into area 1 by the shortest path through D and then stay in area 1.


In OSPF, traffic from area 1 to area 1 must stay in area 1 unless area 1 is partitioned, in which case the backbone area 0 can be used. Traffic from area 1 to area 2 must go from
area 1 to area 0, and then into area 2. It cannot go into and out of any of the areas in other sequences.


You can connect the ABRs within each area by either of two means:

  1. Adding a real link between the ABRs inside area 1

  1. Adding a virtual link between the ABRs inside area 0



With multiple logical links, whether physical, subinterfaces, or VLANs between a pair of ABRs, the following options are recommended:

  1. Consider making sure that a link exists between the ABRs within each area on those ABRs.


  1. Implement one physical or logical link per area.


Summary:
In this case, you will ideally deploy two layer 3 interfaces between routers D and E.
On both routers, the first layer 3 interface will be ideally in backbone area 0.
The second layer 3 interface on both routers should then be in area 1