Cisco Offset-List Command

When you run a routing protocol like EIGRP or OSPF you can influence the metric of the routing protocol by changing the bandwidth (OSPF or EIGRP) or by changing the delay (EIGRP). RIP uses hop count so you need to add some extra routers in between to increase the hop count.

Instead of changing these parameters to influence your routing, you can also use an offset-list.

When you run a routing protocol like EIGRP or OSPF you can influence the metric of the routing protocol by changing the bandwidth (OSPF or EIGRP) or by changing the delay (EIGRP). RIP uses hop count so you need to add some extra routers in between to increase the hop count. Instead of changing these

The offset-list lets you increase the metric when you send a routing update to your neighbor or when you receive it.

You can use this for RIP or EIGRP, it is not supported for OSPF.

Let me show you an example to see what I mean:

R1 R2 Cisco RIP

We have two routers running RIP version 2. The router on the left (R1) has two loopback interfaces that have been advertised in RIP. Here’s what the routing table of R2 looks like:

R2#show ip route rip 
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      1.0.0.0/24 is subnetted, 1 subnets
R        1.1.1.0 [120/1] via 192.168.12.1, 00:00:17, FastEthernet0/0
      11.0.0.0/24 is subnetted, 1 subnets
R        11.11.11.0 [120/1] via 192.168.12.1, 00:00:17, FastEthernet0/0

Nothing special here, we see the two prefixes with a hop count of 1. Let’s increase the hop count of the first prefix by using an outbound offset-list on R1:

R1(config)#router rip
R1(config-router)#offset-list ? 
  <0-99>       Access list of networks to apply offset (0 selects all networks)
  <1300-1999>  Access list of networks to apply offset (expanded range)
  WORD         Access-list name

You need to enter the routing protocol configuration and use the offset-list command. I can choose between all networks or use a standard access-list to make a selection. Let’s use an ACL:

R1(config-router)#offset-list 1 ?
  in   Perform offset on incoming updates
  out  Perform offset on outgoing updates

Once you pick the access-list you have to decide whether the offset-list is in- or outbound. I’ll use outbound so that R2 receives a higher hop count from R1. The last option lets you set the metric:

R1(config-router)#offset-list 1 out ?
  <0-16>  Offset

When you use RIP we don’t have a lot of choice. Let’s try a hop count of 5:

R1(config-router)#offset-list 1 out 5

Last but not least, don’t forget to create the access-list or the offset-list will apply to all prefixes:

R1(config)#access-list 1 permit 1.1.1.0 0.0.0.255

Here’s the result:

R2#show ip route rip 
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      1.0.0.0/24 is subnetted, 1 subnets
R        1.1.1.0 [120/6] via 192.168.12.1, 00:00:17, FastEthernet0/0
      11.0.0.0/24 is subnetted, 1 subnets
R        11.11.11.0 [120/1] via 192.168.12.1, 00:00:17, FastEthernet0/0

Above you can see that prefix 1.1.1.0 /24 has its hop count increase by 5, it’s now 6 in total.

You have now seen the outbound offset-list, let’s try the inbound one. I’ll create an access-list on R2 that increases the hop count of the 11.11.11.0 /24 prefix:

R2(config)#access-list 2 permit 11.11.11.0 0.0.0.255

That’s the access-list, and here’s the offset-list:

R2(config-router)#offset-list 2 in 10

It should increase the hop count of this prefix by 10 whenever R2 learns about this prefix, here’s the routing table of R2:

We're Sorry, Full Content Access is for Members Only...

If you like to keep on reading, Become a Member Now! Here is why:

  • Learn any CCNA, CCNP and CCIE R&S Topic. Explained As Simple As Possible.
  • Try for Just $1. The Best Dollar You’ve Ever Spent on Your Cisco Career!
  • Full Access to our 707 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)

521 Sign Ups in the last 30 days

satisfaction-guaranteed
100% Satisfaction Guaranteed!
You may cancel your monthly membership at any time.
No Questions Asked!

Forum Replies

  1. Hi Don,

    The main reason to use it is for path control of distance vector routing protocols (RIP or EIGRP). If you have two links between routers then you could use an offset-list to increase the metric of 1 prefix, making it prefer the other link.

    For outbound traffic I wouldn’t use the offset-list, you can use policy based routing for this (it has more options). An offset-list might be useful for inbound traffic perhaps…for example, let’s say that you have a router with two links connected to another router that is out of your control. You could use an offset-

    ... Continue reading in our forum

  2. How would the offset work for eigrp since it doesnt use hopcount.

  3. Abdool,
    Good question! If you lab up offset lists with EIGRP you will discover that whatever value you enter as the offset will be added to the composite metric of EIGRP. As you may know, the composite metric of EIGRP is the result of a complex formula, but by default, it is a result of Bandwidth and Delay values. Fortunately, Cisco is smart enough to know that it is best not to mess with bandwidth values for the purpose of EIGRP traffic engineering (because this can mess up things like QoS).

    So what you will see is that the Delay used to calculate the Com

    ... Continue reading in our forum

  4. Hi Laz ,

    Would u please explain with diagram how inbound offset is used for path control if a router has two link connected to another router ?

    How inbound offset picture comes into play and prefer the other link by increase the metric .
    please share with topology for better understand .

    And last one please explain this command , i don’t understand it

    R2(config)#access-list 2 permit 11.11.11.0 0.0.0.255

    Kindly confirm :-
    Is they choose high metric route only to in routing table if metric >1 ( Multiple Link )
    Regards
    chahal

  5. Hello Shivam

    Take a look at the following diagram:

    https://cdn-forum.networklessons.com/uploads/default/original/2X/0/0526f18f66e699dac0e6ea261fd7040de383b860.png

    Imagine you have control over R1 but R2 belongs to another organization. You want to configure RIP so that incoming traffic to the 1.1.10/24 network wi

    ... Continue reading in our forum

15 more replies! Ask a question or join the discussion by visiting our Community Forum