Routing Information Protocol (RIP)

노션으로 옮김·2023년 12월 29일
0
post-thumbnail

RIP

Routing Information Protocol (RIP) is a dynamic routing protocol that uses hop count as a routing metric to find the best path between the source and the destination network.
RIP works on the Transport layer of the OSI model and its messages are sent via UDP protocols using port number 520.

Network diagram

It's just a simple topology designed to help understand the basic RIP configuration.

Step-by-Step Configuration

IP Address Assignment

First, we need to assign an IP address to each devices:


Router2(config)#int serial 2/0
Router2(config-if)#ip address 172.16.10.129 255.255.255.252
Router2(config-if)#no shut
Router2(config-if)#exit
Router2(config)#int serial 3/0
Router2(config-if)#ip address 172.16.10.193 255.255.255.252
Router2(config-if)#no shut

The other devices should be applied in the same manner.

RIP Setup

For dynamic routing using RIP protocol, the only necessary step is to register network addresses for promotion to other devices:


Router2(config)#router rip
Router2(config-router)#network 172.16.10.128
Router2(config-router)#network 172.16.10.192
Router2(config-router)#exit

However, you should also enter the following commands to use RIP version 2 and disable auto-summary for applying classless routing:


Router2(config-router)#version 2
Router2(config-router)#no auto-summary 

Verification and Review

If you set a router in debug mode, you can monitor RIP traffic sent by other devices for advertisement in real time:


Router2#debug ip rip
RIP protocol debugging is on
RIP: received v2 update from 172.16.10.130 on Serial2/0
      192.168.10.0/24 via 0.0.0.0 in 1 hops
RIP: received v2 update from 172.16.10.194 on Serial3/0
      192.168.20.0/24 via 0.0.0.0 in 1 hops
RIP: sending  v2 update to 224.0.0.9 via Serial2/0 (172.16.10.129)
RIP: build update entries
      172.16.10.192/30 via 0.0.0.0, metric 1, tag 0
      192.168.20.0/24 via 0.0.0.0, metric 2, tag 0
RIP: sending  v2 update to 224.0.0.9 via Serial3/0 (172.16.10.193)
RIP: build update entries
      172.16.10.128/30 via 0.0.0.0, metric 1, tag 0
      192.168.10.0/24 via 0.0.0.0, metric 2, tag 0

You can display registered RIP network addresses using show ip rip database:


Router2#show ip rip database 
172.16.10.128/30    auto-summary
172.16.10.128/30    directly connected, Serial2/0
172.16.10.192/30    auto-summary
172.16.10.192/30    directly connected, Serial3/0
192.168.10.0/24    auto-summary
192.168.10.0/24
    [1] via 172.16.10.130, 00:00:04, Serial2/0
192.168.20.0/24    auto-summary
192.168.20.0/24
    [1] via 172.16.10.194, 00:00:21, Serial3/0

The same results as above are also included in the routing table:


Router#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

     172.16.0.0/30 is subnetted, 2 subnets
C       172.16.10.128 is directly connected, Serial2/0
C       172.16.10.192 is directly connected, Serial3/0
R    192.168.10.0/24 [120/1] via 172.16.10.130, 00:00:18, Serial2/0
R    192.168.20.0/24 [120/1] via 172.16.10.194, 00:00:08, Serial3/0

The routing path is well-registered. Now, let's verify whether communication between endpoints is working.

In the Command Line Interface on PC1, which is assigned 192.168.10.2, type ping 192.168.20.2:

0개의 댓글