Vous êtes sur la page 1sur 4

You are here: Home Cisco CCNP ROUTE RIP Cisco Offset-List Command

Cisco Offset-List Command

Posted on July 10, 2014


by Rene Molenaar
in CCNP ROUTE, Cisco, RIP
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:

We have two routers running RIP version 2. The router on the left (R1) has two loopback interfaces that have been advertised in
RIP. Heres 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
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
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. Lets 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. Lets 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. Ill 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 dont have a lot of choice. Lets try a hop count of 5:

R1(config-router)#offset-list 1 out 5
Last but not least, dont 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


Heres 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
R
R

1.0.0.0/24 is subnetted, 1 subnets


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
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, its now 6 in total.

You have now seen the outbound offset-list, lets try the inbound one. Ill 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


Thats the access-list, and heres 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, heres the routing table of R2:
R2#show ip route rip
*Aug 21 12:48:19.211: %SYS-5-CONFIG_I: Configured from console by console
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
R
R

1.0.0.0/24 is subnetted, 1 subnets


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

Great! You can see that the total hop count is now 11.
Theres one more little thing Id like to share about the offset-list. By default the offset-list will be applied to all interfaces, if you
only want to influence the metric of routing updates that you receive from a particular interface then you need to specify this.
Heres how:

R2(config-router)#offset-list 2 in 10 ?
Async
Async interface
Auto-Template
Auto-Template interface
BVI
Bridge-Group Virtual Interface
CDMA-Ix
CDMA Ix interface
CTunnel
CTunnel interface
Dialer
Dialer interface
FastEthernet
FastEthernet IEEE 802.3
[output omitted]
When you configure the offset-list you can specify the interface after the metric, heres an example:

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


This tells the router only to increase the metric for routing updates that we receive on the FastEthernet 0/0 interface.
Thats it, thats all I have to share about the offset-list. I hope this has been helpful, if you have any questionsfeel free to leave a
comment

Vous aimerez peut-être aussi