RIP

                                      Routing Information Protocol     1.  Routing Information Protocol (RIP) is a true distance-vector routing protocol. 
2.  RIP sends the complete routing table out of all active interfaces every 30 seconds.  
3.  It relies on hop count to determine the best way to a remote network, but it has a maximum  allowable hop count of 15 by default, so a destination of 16 would be considered unreachable.
4. RIP version 1 uses only classful routing, which means that all devices in the network must use the same subnet mask. This is because RIP version 1 doesn’t send updates with subnet mask information in tow.
5. RIP version 2 provides something called prefix routing and does send subnet mask information with its route updates. This is called classless routing.
6.RIP works okay in very small networks, but it’s super inefficient on large networks with slow WAN links or on networks with a large number of routers installed and completely useless on networks that have links with variable bandwidths!

Difference Between RIPv1 and RIPv2
             RIPv1                                                                                    RIPv2
(i) Support Classful network and does                                Support Classless  network and          not advertise subnet mask                                               advertise  mask 

(ii) Does not support VLSM                                                       Support VLSM

(iii) Auto summarization cannot disable                                 Auto summarization can be                                                                                                        disable according to condition
(iv) Does not supprot manual                                             Support Manual summarization
       summarization
(v) It use broadcast 255.255.255.255                It uses multicast address 224.0.0.9
      to update
(vi) It support plain text authentication             It support MD5 authentication
           
(vii) RIP uses the Bellman-Ford Distance Vector algorithm to determine the best “path” to a particular destination
(viii) Its Administrative Distance is 120

(ix) RIP work on 15 Hop count metric. Any network that is 16 hops away or more is considered unreachable to RIP. A metric of 16 hops in RIP is considered a poison route or infinity metric.

(x) RIP use triggred update
(xi) RIP uses Periodic Update.
(xii) RIP uses equal cost load balancing.

RIP Timer
(i) RIP sends out periodic routing updates in every 30 sec, It update the routing table information  in every 30 seconds.
(ii) Invalid Timer 180 sec, Indicates how long a route will remain in a routing table before being marked as invalid, if no new updates are heard about this route. The invalid timer will be reset if an update is received for that particular route before the timer expires.
(iii) Flush Timer 240 sec, This timer is used to clear the routes if updates is not come in 240 sec.

Note:- We can control the RIP timer by using the command
Router(config)# router rip
Router(config-router)# timers basic 20 120 120 160 
The timers basic command allows us to change the update (20), invalid (120), hold-down (120), and flush (240) timers. To return the timers back to their defaults:
Router(config-router)# no timers basic  

RIP Loop Avoidance Mechanisms  
(i) Split-Horizon
(ii) Route-Poisoning
(iii) Hold-Down Timers 

Administrative Distance
The administrative distance (AD) is used to rate the trustworthiness of routing information received on a router from a neighbor router. An administrative distance is an integer from 0 to 255, where 0 is the most trusted and 255 means no traffic will be passed via this route. If a router receives two updates listing the same remote network, the first thing the router checks is the AD. If one of the advertised routes has a lower AD than the other, then the route with the lowest AD will be chosen and placed in the routing table. If both advertised routes to the same network have the same AD, then routing protocol metrics like hop count and/or the bandwidth of the lines will be used to find the best path to the remote network. The advertised route with the lowest metric will be placed in the routing table, but if both advertised routes have the same AD as well as the same metrics, then the routing protocol will load-balance to the remote network, meaning the protocol will send data down each link. 

Default Administrative Distances
Route Source                    Default AD
Connected interface                0 
Static route                              1 
EIGRP                                    90 
OSPF                                     110 
RIP                                         120 
External EIGRP                     170 
Unknown                               255 (This route will never be used.)

Configuring RIP Routing
To configure RIP routing, just turn on the protocol with the router rip command and tell the RIP routing protocol the networks to advertise.
Router#config t 
Router(config)#router rip 
Router(config-router)#version 2 
Router(config-router)#no auto-summary 
Router(config-router)#network 10.0.0.0 
Router(config-router)#network 172.16.0.0 


Holding Down RIP Propagations
There are a few different ways to stop unwanted RIP updates from propagating across your LANs and WANs, and the easiest one is through the passive-interface command. This command prevents RIP update broadcasts from being sent out of a specified interface but still allows that same interface to receive RIP updates. 
Here’s an example of how to configure a passive-interface on the Routers Fa0/1 interface, which we will pretend is connected to a LAN that we don’t want RIP on:
Router#config t 
Router(config)#router rip 
Router(config-router)#passive-interface FastEthernet 0/1 
(This command will stop RIP updates from being propagated out of FastEthernet interface 0/0, but this can still receive RIP updates.)

Advertising a Default Route Using RIP
Router(config)#ip route 0.0.0.0 0.0.0.0 fa0/0 
Router(config)#router rip 
Router(config-router)#default-information originate  

RIP Passive Interfaces 


It is possible to control which router interfaces will participate in the RIP process.  The passive-interface will prevent updates from being sent out of the Serial0 interface, but Router will still receive updates on this interface.

We can configure all interfaces to be passive using the passive-interface default command, and then individually use the no passive-interface command on the interfaces we do want updates to be sent out.
Router(config)# router rip
Router(config-router)# network 10.4.0.0
Router(config-router)# network 10.2.0.0
Router(config-router)# passive-interface default
Router(config-router)# no passive-interface e0  

The passive-interface command will prevent updates from being sent out of the Serial0 interface, but Router C will still receive updates on this interface  

We can configure all interfaces to be passive using the passive-interface default command, and then individually use the no passive-interface command on the interfaces we do want updates to be sent out.
RouterC(config)# router rip
RouterC(config-router)# network 10.4.0.0
RouterC(config-router)# network 10.2.0.0
RouterC(config-router)# passive-interface default
RouterC(config-router)# no passive-interface e0  

RIP Neighbors  
RIPv1 sends out its updates as broadcasts, whereas RIPv2 sends out its updates as multicasts to the 224.0.0.9 address. We can configure specific RIP neighbor commands, which will allow us to unicast routing updates to those neighbors.  

Go to Router B and run the following command:-
RouterB(config)# router rip
RouterB(config-router)# network 10.3.0.0
RouterB(config-router)# network 10.4.0.0
RouterB(config-router)# neighbor 10.3.5.1
RouterB(config-router)# neighbor 10.4.5.1  

Router B will now unicast RIP updates to Router A and Router C.  

Router B will still broadcast (if RIPv1) or multicast (if RIPv2) its updates, in addition to sending unicast updates to its neighbors. In order to prevent broadcast/multicast updates, we must also use passive interfaces:  
RouterB(config)# router rip
RouterB(config-router)# passive-interface s0
RouterB(config-router)# passive-interface s1
RouterB(config-router)# neighbor 10.3.5.1
RouterB(config-router)# neighbor 10.4.5.1  
The passive-interface commands prevent the updates from being broadcasted or multicasted. The neighbor commands still allow unicast updates to those specific neighbors.  

RIPv2 Authentication  
RIPv2 supports authentication to secure routing updates. 

The first step is creating a shared authentication key that must be identical on both routers. This is accomplished in global configuration mode: 
RouterA(config)# key chain MYCHAIN
RouterA(config-keychain)# key 1
RouterA(config-keychain-key)# key-string MYPASSWORD

RouterB(config)# key chain MYCHAIN
RouterB(config-keychain)# key 1
RouterB(config-keychain-key)# key-string MYPASSWORD 
The first command creates a key chain called MYCHAIN. We must then associate a key to our keychain. Then we actually configure the shared key using the key-string command. 

We then apply our key chain to the interface connecting to the other router:
RouterA(config)# interface s0
RouterA(config-if)# ip rip authentication key-chain MYCHAIN
RouterB(config)# interface s0
RouterB(config-if)# ip rip authentication key-chain MYCHAIN  


If there was another router off of Router B’s Ethernet port, we could create a separate key chain with a different key-string. Every router on the RIP domain does not need to use the same key chain, only interfaces directly connecting two (or more) routers.  

The final step in configuring authentication is identifying which encryption to use. By default, the key is sent in clear text:  
RouterA(config)# interface s0
RouterA(config-if)# ip rip authentication mode text 
 
  
Or we can use MD5 encryption for additional security:
RouterA(config)# interface s0
RouterA(config-if)# ip rip authentication mode md5
Whether text or MD5 is used, it must be the same on both routers.


Altering RIP’s Metric 
Router B has two paths to get to the 192.168.100.0 network, via Router A and Router C. Because the metric is equal (1 hop), Router B will load balance between these two paths.  

If we want Router B to only go through Router A, and use Router C only as a backup? To accomplish this, we can adjust RIP’s metric to make one route more preferred than the other.  
RouterB(config)# ip access-list standard MYLIST
RouterB(config-std-nacl)# permit 192.168.100.0 0.0.0.255  

Next, we tell RIP how much to offset this route if received by Router C:  
RouterB(config)# router rip
RouterB(config-router)# offset-list MYLIST in 4 s1  

We specify an offset-list pointing to our access list named MYLIST. We will increase the routing metric by 4 for that route coming inbound to interface Serial 1.  
When Router C sends an update to Router C for the 192.168.100.0 network, Router B will increase its metric of 1 hop to 5 hops, thus making Router A’s route preferred.  

We could have also configured Router C to advertise that route with a higher metric (notice the out in the offset-list command):  
RouterC(config)# ip access-list standard MYLIST
RouterC(config-std-nacl)# permit 192.168.100.0 0.0.0.255
RouterC(config)# router rip
RouterC(config-router)# offset-list MYLIST out 4 s0  

Interoperating between RIPv1 and RIPv2  
With  the some configuration, RIPv1 and RIPv2 can interoperate. By default: 
i) RIPv1 routers will sent only Version 1 packets
ii) RIPv1 routers will receive both Version 1 and 2 updates
iii) RIPv2 routers will both send and receive only Version 2 updates 

If Router A is running RIP v1, and Router B is running RIP v2, some additional configuration is necessary. 
Either we must configure Router A to send Version 2 updates:
RouterA(config)# interface s0
RouterA(config-if)# ip rip send version 2

Or configure Router B to accept Version 1 updates.
RouterB(config)# interface s0
RouterB(config-if)# ip rip receive version 1 

Notice that this is configured on an interface. Essentially, we’re configuring the version of RIP on a per-interface basis. 
We can also have an interface send or receive both versions simultaneously:
RouterB(config)# interface s0
RouterB(config-if)# ip rip receive version 1 2

We can further for RIPv2 to send broadcast updates, instead of multicasts:
RouterB(config)# interface s0
RouterB(config)# ip rip v2-broadcast 

Triggering RIP Updates check may be diagram same as above otherwise change RouterB to Router Only
On point-to-point interfaces, we can actually force RIP to only send routing updates if there is a change:
RouterB(config)# interface s0.150 point-to-point
RouterB(config-if)# ip rip triggered 
Again, this is only applicable to point-to-point links. We cannot configure RIP triggered updates on an Ethernet network. 

Some basic and useful commands of RIP
To view the IP routing table:
Router# show ip route 

To view a specific route within the IP routing table:
Router# show ip route 172.18.0.0 

To debug RIP in real time:
Router# debug ip rip 

To view information specific to the RIP protocol: 
Router# show ip protocols 

To view all routes in the RIP database, and not just the entries added to the routing table: 
Router# show ip rip database

  
  
  
  
  
  
  
  
  
  
 




 
 
 






Comments

Popular posts from this blog

Internetworking Devices and OSI Model

EIGRP

OSPF