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.




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 ten 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!

  • 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 804 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)
466 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. Hey rene.
    Could you explain, why would you use offset-list in a working network?

  2. 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

  3. You applied off-set list to 1.1.1.1 and 11.11.11.11. The result – R2 show ip route rip – 1.1.1.1 has a new hop count of 6 and 11.11.11.11 has new hop count of 11. What if we had a R3 connected to R2… would it show 1.1.1.1 [120/7] and 11.11.11.11 [120/12]. Does R3 take into account the off-set list between R1 and R-2? Does that off-set promulgate throughout the network?

  4. Hi Jason,

    That’s correct. R1 is advertising these networks with a certain hop count to R2 so that’s what R2 is installing in its routing table.

    When it’s advertising these prefixes to R3, it will advertise the metric that it has stored for these networks.

    Rene

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

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