Cisconinja’s Blog

Offset-lists in EIGRP

Posted by Andy on September 7, 2009

EIGRP Offset Lists

R1:
interface Loopback0
 ip address 10.1.1.1 255.255.255.0
!
interface Serial0/0
 bandwidth 128
 ip address 10.0.12.1 255.255.255.0
!
router eigrp 1
 network 10.0.0.0

R2:
interface Serial0/0
 bandwidth 128
 ip address 10.0.12.2 255.255.255.0
!
router eigrp 1
 network 10.0.0.0

The minimum bandwidth for 10.1.1.0/24 at R2 is 128k and the cumulative delay is 25,000 microseconds (20,000 serial + 5,000 loopback), so R2 calculates the metric as:

Metric = 256 * (10^7 / 128) + 256 * 2500

= 20,000,000 + 640,000

= 20,640,000

1-R2-Show-IP-Route

Now we will add an offset of 10,000 to all routes advertised by R1:

R1:
router eigrp 1
 offset-list 0 out 10000

Let’s see how this effected the update sent by R1.  The first picture shows the update before the offset-list was applied, and the second shows the update after being applied:

1-R1-Update

2-R1-Update

Loopback interfaces have a default delay of 5,000 microseconds and the value carried in the update for delay is after it has been multiplied by 256, so before the offset-list R1 advertises it as 128,000.  After the offset-list was configured, the delay advertised in the update increased to 138,000, so the offset is applied to delay after it has been multiplied by 256.  Since the delay is cumulative along the path and the offset is applied after the delay has been multiplied by 256, the overall metric for routers receiving the update will increase by the same value configured in the offset.  On R2, the composite metric has increased from 20,640,000 to 20,650,000:

2-R2-Show-IP-Route

To determine the actual delay along the path (in tens of microseconds), R2 divides the delay value received in the update by 256, and then adds it’s own delay on the receiving interface:

Delay = (138,000 / 256) + 2,000

= 2539.0625

When converted back to microseconds and rounded down, this matches the total delay of 25,390 shown for the route on R2.  To find the delay that will be added by the configured offset value, you could also multiply by 10/256:

10,000 * (10/256) = 390 microseconds

 

The configured offset will match the offset applied to the composite metric as long as K3 = 1 and K5 = 0.  If either of these are changed it isn’t quite as simple.  Let’s try changing K3 to a value of 20 first.  We will also remove the offset-list and then add it again after we have seen the initial update and metric calculation:

R1:
router eigrp 1
 metric weights 0 1 0 20 0 0
 no offset-list 0 out 10000

R2:
router eigrp 1
 metric weights 0 1 0 20 0 0

3-R1-Update

3-R2-Show-IP-Route

The update still contains a delay of 128,000, so we know that the value carried in the update must be before being multiplied by K3.  R2 multiplies the delay of the receiving interface by 256, adds this to the delay in the received update and multiplies the sum by K3, and also adds the bandwidth component:

Metric = 256 * (10^7 / 128) + 20 * (128,000 + (256 * 2,000))

= 20,000,000 + 12,800,000

= 32,800,000

Let’s put the offset-list back on:

R1:
router eigrp 1
 offset-list 0 out 10000

4-R1-Update

4-R2-Show-IP-Route

The update contains 138,000 for the delay value like before when K3 was 1.  R2 calculates the metric as 

Metric = 256 * (10^7 / 128) + 20 * (138,000 + (256 * 2,000))

= 20,000,000 + 13,000,000

= 33,000,000

Since the offset gets multiplied by K3 just like the rest of the delay, the actual metric increases by K3 * offset, or 200,000 in this case.  The calculation for total delay of the path does not depend on K-values, so R2 calculates the same total delay of 25,390 microseconds.  Let’s try changing K3 to 0:

R1:
router eigrp 1
 metric weights 0 1 0 0 0 0
 no offset-list 0 out 10000

R2:
router eigrp 1
 metric weights 0 1 0 0 0 0

5-R1-Update

5-R2-Show-IP-Route

R1:
router eigrp 1
 offset-list 0 out 10000

 

6-R1-Update

6-R2-Show-IP-Route

If K3=0, the offset has no effect on the overall metric since it only adds to the delay.  R2 is still able to calculate the correct total delay for the route however since the delay value is carried in route TLVs regardless of the K-values.

 

Next, we will look at what happens when K5 ≠ 0.  The K-values will be set to: K1=1, K2=0, K3=20, K4=1, K5=64.  The offset-list is again removed:

R1:
router eigrp 1
 metric weights 0 1 0 20 1 64
 no offset-list 0 out 10000

R2:
router eigrp 1
 metric weights 0 1 0 20 1 64

The received delay is 128,000 like before.  Since K5 is non-zero, R2 performs an additional calculation and calculates the metric as:

Metric = (256 * (10^7 / 128) + 20 * (128,000 + (256 * 2,000))) * (64 / (255 + 1))

= (20,000,000 + 12,800,000) * (64/256)

= 8,200,000

7-R2-Show-IP-Route

Add the offset again:

R1:
router eigrp 1
 offset-list 0 out 10000

Metric = (256 * (10^7 / 128) + 20 * (138,000 + (256 * 2,000))) * (64 / (255 + 1))

= (20,000,000 + 13,000,000) * (64/256)

= 8,250,000

8-R2-Show-IP-Route

The configured offset value is multiplied by K3, and (if K5 ≠ 0) also by (K5 / (reliability + K4)).  Therefore the actual amount that the configured offset will cause the metric to increase can be calculated as:

Metric increase = K3 * offset * (K5 / (reliability + K4))

In the example we just did, the offset of 10,000 caused the metric to increase by 50,000:

Metric increase = 20 * 10,000 * (64 / (255 +1))

= 50,000

 

Most of the time with offset-lists we are trying to add a certain amount to the overall metric of a route, so it would be much more useful to know the amount of offset that we need to add in order to get the desired metric increase.  Solving the equation for offset gives us:

offset = metric increase * (reliability + K4) / (K3 * K5)

Let’s try another example and see if it works.  We will pick some new K-values and remove the offset-list:

R1:
router eigrp 1
 metric weights 0 5 0 10 45 4
 no offset-list 0 out 10000

R2:
router eigrp 1
 metric weights 0 5 0 10 45 4

9-R2-Show-IP-Route

The metric for the route is now 1,418,666.  Let’s see if we can add 81,334 to it to make it an even 1,500,000.  That means we should have to offset the metric by:

offset = 81,334 * (255 + 45) / (10 * 4)

= 610,005

R1:
router eigrp 1
 offset-list 0 out 610005

10-R2-Show-IP-Route

Looks like it worked perfectly.  The delay added was:

610,005 * (10/256) = 23,828 microseconds

which makes the total delay of the route now 48,828 microseconds.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: