Wednesday, December 14, 2011

RIP SPLIT HORIZON +TIMERS OVERVIEW + LAB


RIP SPLIT HORIZON


  • Rip is distant vector protocol and uses split horizons as a loop prevention mechanism. It means that any update recieved on an interface the same update will not be sent back out that same interface.
  • This is preference is most design the logic is that if you send back the same route and both are installed on each neighbor you have the potential of looping traffic.
  • Situations where you may not want this behaviour is in a NBMA hub & spoke network. Where the hub is multipoint and the center point for updating spokes about each other.
  • By default this on all rip enabled interfaces apart from frame relay multipoint main interfaces. It is on multipoint sub interfaces though so that is something to watch.

RIP Updates will act differently whether split horzion is on or off and secondary ip is configured  From Cisco site. By default RIP will not advertise it source interface unless it is known through non source interface.



Split horizon Update source Update contents
Enabled Primary Subnets of primary (if known through non-source interfaces). Other major networks (including secondary network), known through non-source interface, summarized to major net boundary.
Enabled Secondary Subnets of secondary (if known through non-source interface). Other major networks (including primary network), known through non-source interface, summarized to major net boundary.
Disabled Primary All known subnets of primary. Other major networks (including secondary network), summarized to major net boundary.
Disabled Secondary All known subnets of secondary. Other major networks (including primary network), summarized to major net boundary.

<><>Table 2: RIP updates with secondary address on same major network as primary <><>
Split horizon Update source Update contents
Enabled Primary Subnets of primary/secondary (if known through non-source interfaces). Other major networks, known through non-source interface, summarized to major net boundary.
Enabled Secondary None - no updates sourced from secondary.
Disabled Primary All known subnets of primary/secondary. Other major networks summarized to major net boundary.
Disabled Secondary All known subnets of primary/secondary. Other major networks summarized to major net boundary.




RIP TIMERS

  • Rip timers can either be configured in router config mode
timer basic (update) (invalid) (holddown) (flush)
or interface
ip rip advertise interval

  • so when you recieve an update on a network the timer (invalid,holddown,flush) for that network kicks off. By default if you reach 180 seconds without recieving an update the route will go into invalid and holddown + it marked as invalid- route is marked as possible dead still forwards
  • holddown- rip process will not accept a route with a worse metric than the route is has it will only accept a better hop count or the same this loop prevention during aging of the route
  • FLush by default is 240 seconds this is basically removing from the table
  • Configuring global the timers affect all interfaces
  • while configuring on interface only affects that interface
  • Technically the timers do not have to match between neighbors as there is no adjacency formed but there would be no reason not to
  • Rip timers are not exact there is rip jitter which is bascially off setting the timers to ensure that an update is not sent + recieved at the exact same time on the ame interface. THis is one of the reason rip does not support very low timers also you may run into issue with low timers set when you have a large routing table mainly  because of the packet format of rip there is a limit to the number of routes that can be in a single update when this limit is reached update is sent and new update is constructed for remaining routes this can take time and if low timers you may have routes invalid as of this.


LAB

I will do a quick lab r4 is the hub connected to both r5 and r1. It is partial mesh
network router 5 and 1 do not have connectivity.
We will firstly run rip with r4 being a multipoint sub interface r5 will be
multipoint main interface and r1 will be a p2p  sub interface

r1 config
==========
1#sh ip int brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            unassigned      YES NVRAM  administratively down down
Serial0/0                  unassigned      YES NVRAM  up                    up 
Serial0/0.1                10.229.254.3    YES manual up                    up 
Serial0/1                  unassigned      YES NVRAM  administratively down down
Loopback0                  1.1.1.1         YES manual up                    up 
r1#

SO i configured point-to-point sub interface on r1
r1#sh run int s0/0.1
*Mar  1 00:05:16.267: %SYS-5-CONFIG_I: Configured from console by console
Building configuration...
Current configuration : 118 bytes
!
interface Serial0/0.1 point-to-point
 ip address 10.229.254.3 255.255.255.0
 frame-relay interface-dlci 104
end
r1#
and the rip config advertising the loopback and s0/0/0.1
r1#sh run
*Mar  1 00:06:38.967: %SYS-5-CONFIG_I: Configured from console by console | begin
router rip
router rip
 version 2
 network 1.0.0.0
 network 10.0.0.0
 no auto-summary

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/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback0
     4.0.0.0/32 is subnetted, 1 subnets
R       4.4.4.4 [120/1] via 10.229.254.1, 00:00:27, Serial0/0.1
     10.0.0.0/24 is subnetted, 1 subnets
C       10.229.254.0 is directly connected, Serial0/0.1
r1#
The only network i am learning via rip is the hub 4.4.4.4

Can not ping 5.5.5.5
r1#ping 5.5.5.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
.....
Success rate is 0

r5
---
ok so r5 setup
r5#sh ip int brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            unassigned      YES TFTP   up                    down
FastEthernet0/1            unassigned      YES TFTP   up                    down
Serial0/0/0                10.229.254.2    YES manual up                    up 
Serial0/0/0.1              unassigned      YES unset  up                    up 
Serial0/1/0                unassigned      YES NVRAM  administratively down down
Loopback0                  5.5.5.5         YES NVRAM  up                    up 
r5#sh run int s0/0/0
Building configuration...
Current configuration : 157 bytes
!
interface Serial0/0/0
 ip address 10.229.254.2 255.255.255.0
 encapsulation frame-relay
 no fair-queue
 frame-relay map ip 10.229.254.1 504 broadcast
end
r5#sh run | begin router rip
router rip
 version 2
 network 5.0.0.0
 network 10.0.0.0
 no auto-summary

ok so for routes
r5#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
     4.0.0.0/32 is subnetted, 1 subnets
R       4.4.4.4 [120/1] via 10.229.254.1, 00:00:15, Serial0/0/0
     5.0.0.0/24 is subnetted, 1 subnets
C       5.5.5.0 is directly connected, Loopback0
     10.0.0.0/24 is subnetted, 1 subnets
C       10.229.254.0 is directly connected, Serial0/0/0
r5#
r5#
i am only learning the hub 4.4.4.4 via rip not any of the other spoke I can not ping
the other spoke 1.1.1.1
R4
---
r4#sh run int s0/0/0.1
Building configuration...
Current configuration : 175 bytes
!
interface Serial0/0/0.1 multipoint
 ip address 10.229.254.1 255.255.255.0
 frame-relay map ip 10.229.254.3 401 broadcast
 frame-relay map ip 10.229.254.2 405 broadcast
end
r4#sh ip int brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            unassigned      YES NVRAM  administratively down down
FastEthernet0/1            unassigned      YES NVRAM  administratively down down
Serial0/0/0                unassigned      YES NVRAM  up                    up 
Serial0/0/0.1              10.229.254.1    YES manual up                    up 
Serial0/1/0                unassigned      YES NVRAM  administratively down down
Loopback0                  4.4.4.4         YES manual up                    up 
r4#sh run | begin router rip
router rip
 version 2
 network 4.0.0.0
 network 10.0.0.0
 no auto-summary

On r4 i am learning both spokes loopback via rip

r4#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/32 is subnetted, 1 subnets
R       1.1.1.1 [120/1] via 10.229.254.3, 00:00:28, Serial0/0/0.1
     4.0.0.0/32 is subnetted, 1 subnets
C       4.4.4.4 is directly connected, Loopback0
     5.0.0.0/24 is subnetted, 1 subnets
R       5.5.5.0 [120/1] via 10.229.254.2, 00:00:11, Serial0/0/0.1
     10.0.0.0/24 is subnetted, 1 subnets
C       10.229.254.0 is directly connected, Serial0/0/0.1
r4#
I can ping both.
WHy am i not learning the spoke loopbacks on each spoke. It is because split horizon
is on by default for multipoint sub interfaces we can resolve this in 2 ways turn off
split-horizon on the r4 s0/0/0.1

r4(config)#int s0/0/0.1
r4(config-subif)#no ip split-horizon
r4(config-subif)#

r5 route table
-------------

r5#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/32 is subnetted, 1 subnets
R       1.1.1.1 [120/2] via 10.229.254.3, 00:00:23, Serial0/0/0
     4.0.0.0/32 is subnetted, 1 subnets
R       4.4.4.4 [120/1] via 10.229.254.1, 00:00:23, Serial0/0/0
     5.0.0.0/24 is subnetted, 1 subnets
C       5.5.5.0 is directly connected, Loopback0
     10.0.0.0/24 is subnetted, 1 subnets
C       10.229.254.0 is directly connected, Serial0/0/0
r5#
now i see both networks
r1 routing table
----------------
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/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback0
     4.0.0.0/32 is subnetted, 1 subnets
R       4.4.4.4 [120/1] via 10.229.254.1, 00:00:00, Serial0/0.1
     5.0.0.0/24 is subnetted, 1 subnets
R       5.5.5.0 [120/2] via 10.229.254.2, 00:00:00, Serial0/0.1
     10.0.0.0/24 is subnetted, 1 subnets
C       10.229.254.0 is directly connected
I see r5 loopback now

THe otherway i can resolve is to move the config of s0/0/0.1 and use the main
interface which has splithorizon disabled by default
r4(config)#int s0/0/0.1
r4(config-subif)# no ip address 10.229.254.1 255.255.255.0
r4(config-subif)# ip split-horizon
r4(config-subif)# no frame-relay map ip 10.229.254.3 401 broadcast
r4(config-subif)# no frame-relay map ip 10.229.254.2 405 broadcast
r4(config-subif)#exit
r4(config)#no int s0/0/0.1
Not all config may be removed and may reappear after reactivating the sub-interface
r4(config)#int s0/0/0
r4(config-if)#ip address 10.229.254.1 255.255.255.0
r4(config-if)#frame-relay map ip 10.229.254.3 401 broadcast
r4(config-if)#frame-relay map ip 10.229.254.2 405 broadcast
r4(config-if)#exit

r4 route table
--------------
r4#
*Dec 14 09:39:44.075: %SYS-5-CONFIG_I: Configured from console by console
r4#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/32 is subnetted, 1 subnets
R       1.1.1.1 [120/1] via 10.229.254.3, 00:00:05, Serial0/0/0
     4.0.0.0/32 is subnetted, 1 subnets
C       4.4.4.4 is directly connected, Loopback0
     5.0.0.0/24 is subnetted, 1 subnets
R       5.5.5.0 [120/1] via 10.229.254.2, 00:00:09, Serial0/0/0
     10.0.0.0/24 is subnetted, 1 subnets
C       10.229.254.0 is directly connected, Serial0/0/0
r4#

R5 routing table
-----------------

r5#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/32 is subnetted, 1 subnets
R       1.1.1.1 [120/2] via 10.229.254.3, 00:00:21, Serial0/0/0
     4.0.0.0/32 is subnetted, 1 subnets
R       4.4.4.4 [120/1] via 10.229.254.1, 00:00:21, Serial0/0/0
     5.0.0.0/24 is subnetted, 1 subnets
C       5.5.5.0 is directly connected, Loopback0
     10.0.0.0/24 is subnetted, 1 subnets
C       10.229.254.0 is directly connected, Serial0/0/0
r5#
r1 routing table
----------------

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/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback0
     4.0.0.0/32 is subnetted, 1 subnets
R       4.4.4.4 [120/1] via 10.229.254.1, 00:00:24, Serial0/0.1
     5.0.0.0/24 is subnetted, 1 subnets
R       5.5.5.0 [120/2] via 10.229.254.2, 00:00:24, Serial0/0.1
     10.0.0.0/24 is subnetted, 1 subnets
C       10.229.254.0 is directly connected, Serial0/0.1
r1#


Timers
--------
Global Mode
r1(config)#router rip
r1(config-router)#timer?
timers
r1(config-router)#timers basic ?
  <0-4294967295>  Interval between updates
r1(config-router)#timers basic 5 ?
  <1-4294967295>  Invalid
r1(config-router)#timers basic 5 10 ?
  <0-4294967295>  Holddown
r1(config-router)#timers basic 5 10 15?
<0-4294967295>
r1(config-router)#timers basic 5 10 10 ?
  <1-4294967295>  Flush
r1(config-router)#timers basic 5 10 10 15?
<1-4294967295>
r1(config-router)#timers basic 5 10 10 15

INterface mode
---------------
r1(config)#int s0/0.1
r1(config-subif)#timer?
% Unrecognized command
r1(config-subif)#ip rip advertise?
advertise
r1(config-subif)#ip rip advertise ?
  <0-4294966>  interval in seconds
r1(config-subif)#ip rip advertise 5 ?
  <cr>
r1(config-subif)#ip rip advertise 5

No comments:

Post a Comment