Monday 26 October 2015

RIPv2 Offset list example

RIPv2 - Manipulation of the Metric with Offset Lists

 An offset-list is a filtering tool when used as an extrema ratio. By default an offset-list is a tool used to INCREASE the metric of a route. Of course, if we increase the metric so it reaches 16 hops or more the route will become inaccessible and then discarded/filtered. Note

offset-list keyword can invoke Standard-ACL (numbered or named)

 

This tutorial shows how to manipulate the metric in RIPv2 with the help of offset lists. Offset Lists Lets take a lab of 2 routers and do some basic RIPv2 configuration:
Both routers just have the interface serial 1/0 and the interface loopback 0 configured. If you use the basic RIPv2 configuration and start the routers you can ping the other router.
The routing table of R1:
Two more loopback interfaces are added to R2. The routes have an administrative distance of 120 and a metric of "1", which basically is a hop count. This value has a range of 1 to 15.
R2#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#interface loopback 10
R2(config-if)#ip address 172.17.0.10 255.255.255.255
R2(config-if)#exit
R2(config)#interface loopback 20
R2(config-if)#ip address 172.17.0.20 255.255.255.255
R2(config-if)#end

R1#show ip route
Gateway of last resort is not set

     172.17.0.0/32 is subnetted, 4 subnets
R       172.17.0.20 [120/1] via 192.168.100.2, 00:00:05, Serial1/0
R       172.17.0.10 [120/1] via 192.168.100.2, 00:00:05, Serial1/0
C       172.17.0.1 is directly connected, Loopback0
R       172.17.0.2 [120/1] via 192.168.100.2, 00:00:05, Serial1/0
     192.168.100.0/30 is subnetted, 1 subnets
C       192.168.100.0 is directly connected, Serial1/0
The two new routes now appear in the routing table of router R1. The metric of RIP routes can be manipulated with offset lists. For this to work an accesslist has to be configured. The metric of 172.17.0.10 will be increased by 5 on router R1 incoming on the interface S1/0, the metric of 172.17.0.20 will be increased by 7 outgoing on router R2.
R1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#access-list 10 permit 172.17.0.10 0.0.0.0
R1(config)#router rip
R1(config-router)#offset-list 10 in 5 Serial 1/0
R1(config-router)#end

R2#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#access-list 20 permit 172.17.0.20 0.0.0.0
R2(config)#router rip
R2(config-router)#offset-list 20 out 7 Serial 1/0
R2(config-router)#end

R1#show ip route
Gateway of last resort is not set

     172.17.0.0/32 is subnetted, 4 subnets
R       172.17.0.20 [120/8] via 192.168.100.2, 00:00:00, Serial1/0
R       172.17.0.10 [120/6] via 192.168.100.2, 00:00:00, Serial1/0
C       172.17.0.1 is directly connected, Loopback0
R       172.17.0.2 [120/1] via 192.168.100.2, 00:00:00, Serial1/0
     192.168.100.0/30 is subnetted, 1 subnets
C       192.168.100.0 is directly connected, Serial1/0
 
 

offset-list

To add an offset to incoming and outgoing metrics to routes learned via Routing Information Protocol (RIP), use the offset-list command in router configuration mode. To remove an offset list, use the no form of this command.
offset-list {access-list-number | access-list-name} {in | out} offset [interface-type interface-number]
no offset-list {access-list-number | access-list-name} {in | out} offset [interface-type interface-number]

Syntax Description


access-list-number
Standard access list number to be applied. Access list number 0 indicates all access lists. If offset is 0, no action is taken. For IGRP, the offset is added to the delay component only.
access-list-name
Standard access list name to be applied.
in
Applies the access list to incoming metrics.
out
Applies the access list to outgoing metrics.
offset
Positive offset to be applied to metrics for networks matching the access list. If the offset is 0, no action is taken.
interface-type
(Optional) Interface type to which the offset list is applied.
interface-number
(Optional) Interface number to which the offset list is applied.

Defaults

This command is disabled by default.

Command Modes

Router configuration

Command History


Release
Modification
10.0
This command was introduced.
10.3
The interface-type and interface-number arguments were added.
11.2
The access-list-name argument was added.

Usage Guidelines

The offset value is added to the routing metric. An offset list with an interface type and interface number is considered extended and takes precedence over an offset list that is not extended. Therefore, if an entry passes the extended offset list and the normal offset list, the offset of the extended offset list is added to the metric.

Examples

In the following example, the router applies an offset of 10 to the delay component of a router only to access list 21:
offset-list 21 out 10

In the following example, the router applies an offset of 10 to routes learned from Ethernet interface 0:
offset-list 21 in 10 ethernet 0