Wednesday, December 14, 2011

RIPMETRIC + LAB ON OFFSET LISTS

RIP METRIC AND OFFSET-LISTS

  • Rip metric calulation is done based on hop count where 1 hop is device/interface in the network the max number of hops is 16 so rip network can notgo more than 16 hops end to end from 1 device to another 16 is known as the infinite route if it is recieved by a router it is not put in the routing table
  • offset list is typically used for traffic engineering or sometimes route filtering.
  • It is basically a way of modifying the rip metric you can add hops to make a route seem less desirable or add enough hops to bring to 16 to make it an inaccessible nfinite route routes with this metric will not be installed in the rip database and in turn will not be installed in the routing table
  • Only  Access-list can be used to match the route which is one of it disavantages
  •  In/out command is used to manipulate the routes as they come in or go out of the router.
  • Offset-list can be configured for a specific interface by tagging the interface at the end of the statement, if it is not given it will modify for all interfaces.

Under router process type: offset-list <access-list#>” out/in <metric>

-   This will add the metric mentioned above to those routes.
  • With an offset list the metric can only be increased but not be decreased.
  •  Offset list ‘0’ means any any.
router rip
offset-list 0 out 10 serial0/0/0.1

the above says the offset list is standard access-list 0 it is doing out bound
direction the 10 is the number of hops to add and the interface is what interface you
want the routes going out metric to be modified to add the 10 hops extra
access-list 0 is everything
you can manually specify and acl if you just want certain routes to be modified

  • WHen you configure this it can often trigger a transient loop this is basically when one router has the old info and is aging it out and another has the new info so they are not in agreement on the routing path + traffic can start looping between the devices as of this
  • You can use offset list to filter by setting the value close to 16 maybe 15 so when the next device recieves it it will not install the route depending on what device you want to filter the route from and how many hops away it is will decide what to set if a router is 3 hops away you migt set the update hop count to 13 so when it arrives at that router is 16 and not installed
  • offset list has a issue with filtering which makes it less preference than using say prefix lists with distribute list as it uses a standard access list it only looks at
LAB

Ok so r1 is trying to reach r2 loopback 3.3.3.3 and it has 2 paths s1,sw2,r2
which is hop count of 3
or
sw1-sw3-sw4-sw2-r2
which is hop count of 4
by default it will pick the first path will modify it so that sw1 will advertise the
first route with a worse metric making the traffic take the other path




OK so i have set it up now it is in the standard config pre offset list
on r1
r1#sh ip route
Codes: 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
Gateway of last resort is not set
     1.0.0.0/24 is subnetted, 1 subnets
C       1.1.1.0 is directly connected, Loopback0
     3.0.0.0/32 is subnetted, 1 subnets
R       3.3.3.3 [120/3] via 172.25.8.2, 00:00:11, FastEthernet0/0
     172.16.0.0/24 is subnetted, 1 subnets
R       172.16.15.0 [120/2] via 172.25.8.2, 00:00:11, FastEthernet0/0
     172.25.0.0/24 is subnetted, 4 subnets
R       172.25.6.0 [120/2] via 172.25.8.2, 00:00:11, FastEthernet0/0
R       172.25.12.0 [120/1] via 172.25.8.2, 00:00:11, FastEthernet0/0
C       172.25.8.0 is directly connected, FastEthernet0/0
R       172.25.10.0 [120/2] via 172.25.8.2, 00:00:12, FastEthernet0/0
     12.0.0.0/32 is subnetted, 1 subnets
R       12.12.12.12 [120/1] via 172.25.8.2, 00:00:12, FastEthernet0/0
R    192.168.1.0/24 [120/1] via 172.25.8.2, 00:00:14, FastEthernet0/0
r1#ping 3.3.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
r1#
notice the route to 3.3.3.3 is 3 hops away and pinging success

r1#traceroute 3.3.3.3
Type escape sequence to abort.
Tracing the route to 3.3.3.3
  1 172.25.8.2 0 msec 0 msec 4 msec
  2 192.168.1.1 0 msec 4 msec 0 msec
  3 172.16.15.2 4 m
it is also taking the expected path through sw1 and sw2
ok so i am going modify what sw2 is going to advertise to s1 which in turn will
advertise to r1
sw2
---
i created an access-list
switch2#sh run | begin access-list
access-list 1 permit 3.3.3.0 0.0.0.255
and offset list under the rip process
switch2#sh run | begin router rip
router rip
 version 2
 offset-list 1 out 10 Port-channel2
 network 172.16.0.0
 network 172.25.0.0
 network 192.168.1.0
 no auto-summary
!
now to see results on r1

r1#sh ip route
Codes: 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
Gateway of last resort is not set
     1.0.0.0/24 is subnetted, 1 subnets
C       1.1.1.0 is directly connected, Loopback0
     3.0.0.0/32 is subnetted, 1 subnets
R       3.3.3.3 [120/5] via 172.25.8.2, 00:00:04, FastEthernet0/0
     172.16.0.0/24 is subnetted, 1 subnets
R       172.16.15.0 [120/2] via 172.25.8.2, 00:00:04, FastEthernet0/0
     172.25.0.0/24 is subnetted, 4 subnets
R       172.25.6.0 [120/2] via 172.25.8.2, 00:00:04, FastEthernet0/0
R       172.25.12.0 [120/1] via 172.25.8.2, 00:00:04, FastEthernet0/0
C       172.25.8.0 is directly connected, FastEthernet0/0
R       172.25.10.0 [120/2] via 172.25.8.2, 00:00:05, FastEthernet0/0
     12.0.0.0/32 is subnetted, 1 subnets
R       12.12.12.12 [120/1] via 172.25.8.2, 00:00:05, FastEthernet0/0
R    192.168.1.0/24 [120/1] via 172.25.8.2, 00:00:06, FastEthernet0/0
r1#traceroute 3.3.3.3
Type escape sequence to abort.
Tracing the route to 3.3.3.3
  1 172.25.8.2 0 msec 0 msec 4 msec
  2 172.25.12.2 0 msec 0 msec 4 msec
  3 172.25.6.2 0 msec 4 msec 0 msec
  4 172.25.10.1 4 msec 0 msec 4 msec
  5 172.16.15.2 0 msec 0 msec *
r1#
in the ip route to 3.3.3.3 is now 5 hops and the tracert concludes it is taking the
original less prefernce path via sw1-sw3-sw4-sw2=r2

a debug on sw1 shows that the network 3.3.3.3 is coming in from sw2 with a hop count
of 13 making less preference than the hop count of 4 from sw3
switch1#debug ip rip
RIP protocol debugging is on
switch1#
01:02:40: RIP: received v2 update from 192.168.1.1 on Port-channel2
01:02:40:      3.3.3.3/32 via 0.0.0.0 in 12 hops
01:02:40:      172.16.15.0/24 via 0.0.0.0 in 1 hops
01:02:40:      172.25.6.0/24 via 0.0.0.0 in 2 hops
01:02:40:      172.25.10.0/24 via 0.0.0.0 in 1 hopsu all
All possible debugging has been turned off
switch1#

No comments:

Post a Comment