RIP Routing Protocol
Routing Information Protocol (RIP) is a dynamic protocol used to find the best route or path from end-to-end (source to destination) over a network by using a routing metric/hop count algorithm. This algorithm is used to determine the shortest path from the source to destination, which allows the data to be delivered at high speed in the shortest time.
In Router R1,
R1(config)#interface fastethernet 2/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 1/0
R1(config-if)#ip address 20.0.0.1 255.0.0.0
R1(config-if)#clock rate 64000
R1(config-if)#encapsulation ppp
R1(config-if)#no shutdown
R1(config-if)#exit
In Router R2,
R2(config)#interface serial 1/0
R2(config-if)#ip address 20.0.0.2 255.0.0.0
R2(config-if)#encapsulation ppp
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface fastethernet2/0
R2(config-if)#ip address 30.0.0.1 255.0.0.0
R2(config-if)#no shutdown
R2(config-if)#exit
By default routers know directly connected network.
In Router R1,
R1#show ip route
Gateway of last resort is not set
C 10.0.0.0/8 is directly connected, FastEthernet2/0
C 20.0.0.0/8 is directly connected, Serial1/0
In Router R2,
R1#show ip route
Gateway of last resort is not set
C 30.0.0.0/8 is directly connected, FastEthernet2/0
C 20.0.0.0/8 is directly connected, Serial1/0
Steps to implement RIP protocol :
Step 1:Create a topology like this and do basic configurations ip address to the router interfaces ,ip address and default gateway to the host same as in topology.
In Router R1,
R1(config)#interface fastethernet 2/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 1/0
R1(config-if)#ip address 20.0.0.1 255.0.0.0
R1(config-if)#clock rate 64000
R1(config-if)#encapsulation ppp
R1(config-if)#no shutdown
R1(config-if)#exit
In Router R2,
R2(config)#interface serial 1/0
R2(config-if)#ip address 20.0.0.2 255.0.0.0
R2(config-if)#encapsulation ppp
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface fastethernet2/0
R2(config-if)#ip address 30.0.0.1 255.0.0.0
R2(config-if)#no shutdown
R2(config-if)#exit
By default routers know directly connected network.
Step 2:Check the routing table of the router R1 and R2 by giving the command show ip route in privileged mode,
In Router R1,
R1#show ip route
Gateway of last resort is not set
C 10.0.0.0/8 is directly connected, FastEthernet2/0
C 20.0.0.0/8 is directly connected, Serial1/0
In Router R2,
R1#show ip route
Gateway of last resort is not set
C 30.0.0.0/8 is directly connected, FastEthernet2/0
C 20.0.0.0/8 is directly connected, Serial1/0
Step 3:Now,Run Rip protocols on R1 and R2 .What rip will do is, it will create a routing update by adding directly connected networks information and it will send to neighbor routers
Just add directly connected networks
In Router R1,
R1(config)#router rip
R1(config-router)#network 10.0.0.0
R1(config-router)#network 20.0.0.0
R1(config-router)#exit
In Router R2,
R2(config)#router rip
R2(config-router)#network 20.0.0.0
R2(config-router)#network 30.0.0.0
R2(config-router)#exit
Now routers learns network information automatically through routing updates
Step 4:Now give show ip route command in R1 and R2 and check the routing table
In Router R1,
R1#show ip route
Gateway of last resort is not set
C 10.0.0.0/8 is directly connected, FastEthernet0/0
C 20.0.0.0/8 is directly connected, Serial2/0
R 30.0.0.0/8 [120/1] via 20.0.0.2, 00:00:28, Serial2/0
R1#
Here,network 30.0.0.0 learned by the router R1 via Serial 2/0 by routing update from R2,that will be reachable via 20.0.0.2(next hop).
[120/1]-120 Administrative distance of Rip,1-Reachable on one hop.
In Router R2,
R2#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
R 10.0.0.0/8 [120/1] via 20.0.0.1, 00:00:16, Serial2/0
C 20.0.0.0/8 is directly connected, Serial2/0
C 30.0.0.0/8 is directly connected, FastEthernet0/0
Here,network 30.0.0.0 learned by the router R2 via Serial 2/0 by routing update from R1,that will be reachable via 20.0.0.1(next hop).
Step 5:Now ping from the Host 10.0.0.10 to Host 30.0.0.10 by giving command
ping 30.0.0.10 you will get,
No comments:
Post a Comment