Configuring RIP
Routing There are two parts to routing IP packets: 1. How to pass a packet from an input interface to the output interface of a router (packet forwarding) ? 2. How to find and setup a route ? There are two approaches for calculating the routing tables: Static Routing Dynamic Routing: Routes are calculated by a routing protocol 2
Components of a Routing Algorithm A procedure for sending and receiving reachability information about network to other routers A procedure for calculating optimal routes Routes are calculated using a shortest path algorithm: Goal: Given a network were each link is assigned a cost. Find the path with the least cost between two networks with minimum cost. A procedures for reacting to and advertising topology changes 3
Approaches to Shortest Path Routing There are two basic routing algorithms found on the Internet. 1. Distance Vector Routing Each node knows the distance (=cost) to its directly connected neighbors A node sends periodically a list of routing updates to its neighbors. If all nodes update their distances, the routing tables eventually converge New nodes advertise themselves to their neighbors 2. Link State Routing Each node knows the distance to its neighbors The distance information (=link state) is broadcast to all nodes in the network Each node calculates the routing tables independently 4
Routing Algorithms in the Internet Distance Vector Routing Information Protocol (RIP) Gateway-to-Gateway Protocol (GGP) Exterior Gateway Protocol (EGP) Interior Gateway Routing Protocol (IGRP) Link State Intermediate System - Intermediate System (IS-IS) Open Shortest Path First (OSPF) 5
A network as a graph In the following, networks are represented as a network graph: nodes are connected by networks network can be a link or a LAN network interface has cost networks are destinations Net(v,w) is an IP address of a network For ease of notation, we often replace the clouds between nodes by simple links. 6
Distance Vector Algorithm: Routing Table c(v,w): cost to transmit on the interface to network Net(v,w) Net(v,w): Network address of the network between v and w The network can be a link, but could also be a LAN 7
Distance Vector Algorithm: Messages Nodes send messages to their neighbors which contain routing table entries A message has the format: [Net , D(v,Net)] means“My cost to go to Net is D (v,Net)” [Net , D(v,Net)] v n 8
RIP -- What is it? RIP is a routing protocol for exchanging routing table information between routers. Routing updates must be passed between routers so that they can make the proper choice on how to route a packet.
RIP Characteristics Distance vector routing protocol. Uses hop count as a path selection metric. Three types of timers. Multiple stability features.
RIP message example
RIP timers Periodic timer: control advertising of regular update messages (25-35 sec) Expiration timer: governs the validity of a route (180 sec) Every time an update (on a 30 sec average) is received the timer is reset If no update received within this timer the metric is set to 16 The maximum number of hops allowed for RIP is 15, which limits the size of networks that RIP can support. A hop count of 16 is considered an infinite distance and the route is considered unreachable. Garbage timer: 120 sec A route can be advertised with a 16 metric for 120 sec before it get purged Allow neighbors to have knowledge of the invalidity of a route
Slow Convergence Problem Solved by limiting number of hops to 15, 16 means That the destination is unreachable
Create a topology as shown in figure.
Cont… IP RIP comes in two different versions: 1 and 2. Version 1 is a distance vector protocol. Version 2 is a hybrid protocol. The CCNA exam now primarily focuses on version 2. There are no major differences between RIPv1 or RIPv2 so far configurations concern.
(1841Router0) Hostname R1 Router>enable Router#configure terminal Router(config)#hostname R1 R1(config)#interface fastethernet 0/0 R1(config‐if)#ip address 10.0.0.1 255.0.0.0 R1(config‐if)#no shutdown R1(config‐if)#exit R1(config)#interface serial 0/0/0 R1(config‐if)#ip address 20.0.0.1 255.0.0.0 R1(config‐if)#clock rate 64000 R1(config‐if)#bandwidth 64 R1(config)#router rip R1(config‐router)#network 10.0.0.0 R1(config‐router)#network 20.0.0.0 R1(config‐router)#exit
(2620XMRouter1) Hostname R2 Router>enable Router#configure terminal Router(config)#hostname R2 R2(config)#interface serial 0/0 R2(config‐if)#ip address 20.0.0.2 255.0.0.0 R2(config‐if)#no shutdown R2(config‐if)#exit R2(config)#interface fastethernet 0/0 R2(config‐if)#ip address 30.0.0.1 255.0.0.0 R2(config)#router rip R2(config‐router)#network 20.0.0.0 R2(config‐router)#network 30.0.0.0 R2(config‐router)#exit R2(config)#
(2620XMRouter2) Hostname R3 Router>enable Router#configure terminal Router(config)#hostname R3 R3(config)#interface fastethernet 0/0 R3(config‐if)#ip address 30.0.0.2 255.0.0.0 R3(config‐if)#no shutdown R3(config‐if)#interface serial 0/0 R3(config‐if)#ip address 40.0.0.1 255.0.0.0 R3(config‐if)#clock rate 64000 R3(config‐if)#bandwidth 64 R3(config‐if)#exit R3(config)#router rip R3(config‐router)#network 30.0.0.0 R3(config‐router)#network 40.0.0.0 R3(config‐router)#exit R3(config)#
(2811Router3) Hostname R4 Router>enable Router#configure terminal Router(config)#interface serial 0/0/0 Router(config‐if)#ip address 40.0.0.2 255.0.0.0 Router(config‐if)#no shutdown Router(config‐if)#exit Router(config)#interface fastethernet 0/0 Router(config‐if)#ip address 50.0.0.1 255.0.0.0 R4(config)#router rip R4(config‐router)#network 40.0.0.0 R4(config‐router)#network 50.0.0.0 R4(config‐router)#exit R4(config)#
PC1 PC>ipconfig IP Address......................: 10.0.0.2 Subnet Mask.....................: 255.0.0.0 Default Gateway.................: 10.0.0.1 PC>ping 50.0.0.2
You can verify that RIP is running successfully via show ip protocols command in privilege mode R1#show ip protocols R1#show ip route