RIP(Routing Information Protocol)은 거리 벡터 라우팅 프로토콜이다.
최대 홉 카운트는 15이다. 매 30초 주기로 라우팅 테이블을 브로드캐스트 한다.



<그림1> RIP 설정을 위한 기본 토폴로지


기본 토폴로지를 그림1과 같이 구성한다.

DCE 시리얼 인터페이스에는 클록을 설정해야 한다.
Router0의 se0/1/1
Router1의 se0/1/0, se0/1/1
이 두 인터페이스에 클록을 설정하면 된다.

RIPv1의 기본 설정 방법

Router>enalbe
Router#conf t
Router(config)#router rip
Router(config-router)#network 네트워크 주소(라우터에 직접 연결되어 있는 네트워크 주소를 입력)


do show ip int brief 명령어를 이용하여 인터페이스의 활성화 유무를 점검하고 할당된 ip주소를 확인한다.

아래는 Router0에서의 명령어를 실제로 적용 시킨 것이다.

Router(config)#do show ip int brief
Interface              IP-Address      OK? Method Status                Protocol
 
FastEthernet0/0        192.130.1.1     YES manual up                    up
 
FastEthernet0/1        unassigned      YES unset  administratively down down
 
Serial0/1/0            192.130.4.2     YES manual up                    up
 
Serial0/1/1            192.130.5.2     YES manual up                    up
 
Vlan1                  unassigned      YES unset  administratively down down
Router(config)#route rip
Router(config-router)#network 192.130.1.1
Router(config-router)#network 192.130.4.2
Router(config-router)#network 192.130.5.2
Router(config-router)#exit


나머지 라우터에서도 동일한 방법으로 하면 된다.
여기까지의 설정을 마친 후에 show run 명령어를 통해 RIP 설정이 잘 적용되었는지 확인하고 show ip route와 show ip protocols 명령어를 통해 라우팅 테이블을 확인하고 정상 동작하는지 확인한다.

Router#show run
Building configuration...

Current configuration : 687 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
interface FastEthernet0/0
 ip address 192.130.1.1 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface Serial0/1/0
 ip address 192.130.4.2 255.255.255.0
!
interface Serial0/1/1
 ip address 192.130.5.2 255.255.255.0
!
interface Vlan1
 no ip address
 shutdown
!
router rip
 network 192.130.1.0
 network 192.130.4.0
 network 192.130.5.0

!
ip classless
!
!
!
!
!
!
!
line con 0
line vty 0 4
 login
!
!
!
end


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

C    192.130.1.0/24 is directly connected, FastEthernet0/0
R    192.130.2.0/24 [120/1] via 192.130.5.1, 00:00:17, Serial0/1/1
R    192.130.3.0/24 [120/1] via 192.130.4.1, 00:00:18, Serial0/1/0

C    192.130.4.0/24 is directly connected, Serial0/1/0
C    192.130.5.0/24 is directly connected, Serial0/1/1
R    192.130.6.0/24 [120/1] via 192.130.5.1, 00:00:17, Serial0/1/1
                         [120/1] via 192.130.4.1, 00:00:18, Serial0/1/0

Router#


위의 라우팅 테이블에서 RIP에 관한 라우팅 엔트리의 의미

R    192.130.2.0/24 [120/1] via 192.130.5.1, 00:00:17, Serial0/1/1

R    192.130.2.0/24 : RIP을 통해 192.130.2.0/24 네트워크를 학습
[120/1] : RIP의 AD 값 120과 192.130.2.0/24로의 메트릭 값 1
via 192.130.5.1 : 목적지 네트워크로 가기 위한 이웃 라우터 인터페이스의 ip주소
00:00:17 : 경로 업데이트를 한 이후 경과 시간
Serial0/1/1 : 목적지 네트워크로 가기 위해 사용할 출구 인터페이스


show ip protocols 명령어로 현재 라우터에서 동작중인 ip 라우팅 프로토콜에 대한 자세한 정보 확인이 가능하다.

Router#show ip protocols
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 10 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Redistributing: rip
Default version control: send version 1, receive any version
  Interface             Send  Recv  Triggered RIP  Key-chain
  FastEthernet0/0       1     2 1  
  Serial0/1/0           1     2 1  
  Serial0/1/1           1     2 1  
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
    192.130.1.0
    192.130.4.0
    192.130.5.0
Passive Interface(s):
Routing Information Sources:
    Gateway         Distance      Last Update
    192.130.5.1          120      00:00:18
    192.130.4.1          120      00:00:21
Distance: (default is 120)
Router#


RIP의 모든 동작 상태를 실시간으로 확인하려면 debug ip rip 명령어를 사용한다.

Router#debug ip rip
RIP protocol debugging is on
Router#RIP: received v1 update from 192.130.4.1 on Serial0/1/0
      192.130.2.0 in 2 hops
      192.130.3.0 in 1 hops
      192.130.6.0 in 1 hops
RIP: sending  v1 update to 255.255.255.255 via FastEthernet0/0 (192.130.1.1)
RIP: build update entries
      network 192.130.2.0 metric 2
      network 192.130.3.0 metric 2
      network 192.130.4.0 metric 1
      network 192.130.5.0 metric 1
      network 192.130.6.0 metric 2
RIP: sending  v1 update to 255.255.255.255 via Serial0/1/0 (192.130.4.2)
RIP: build update entries
      network 192.130.1.0 metric 1
      network 192.130.2.0 metric 2
      network 192.130.5.0 metric 1
RIP: sending  v1 update to 255.255.255.255 via Serial0/1/1 (192.130.5.2)
RIP: build update entries
      network 192.130.1.0 metric 1
      network 192.130.3.0 metric 2
      network 192.130.4.0 metric 1
RIP: received v1 update from 192.130.5.1 on Serial0/1/1
      192.130.2.0 in 1 hops
      192.130.3.0 in 2 hops
      192.130.6.0 in 1 hops


라우터가 상호간의 라우팅 정보를 교환하기 위해 시리얼 인터페이스를 사용하는 것을 볼 수 있다. 그런데 디버그 화면을 자세히 보면  호스트 컴퓨터와 연결된 FastEthernet0/0에도 RIP 정보를 보내고 있는 것을 확인할 수 있다. 이는 불필요한 동작이므로 passive-interface 명령어로 특정 인터페이스에 라우팅 업데이트 정보를 보내지 않도록 설정한다.

Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#router rip
Router(config-router)#passive-interface FastEthernet0/0
Router(config-router)#do show ip protocols
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 22 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Redistributing: rip
Default version control: send version 1, receive any version
  Interface             Send  Recv  Triggered RIP  Key-chain
  Serial0/1/0           1     2 1  
  Serial0/1/1           1     2 1  
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
    192.130.1.0
    192.130.4.0
    192.130.5.0
Passive Interface(s):
    FastEthernet0/0

Routing Information Sources:
    Gateway         Distance      Last Update
    192.130.5.1          120      00:00:24
    192.130.4.1          120      00:00:06
Distance: (default is 120)
Router(config-router)# 


RIP은 클래스풀 라우팅 프로토콜이다. 즉, 라우팅 정보 업데이트시 서브넷 마스크 정보를 보내지 않는다. 네트워크에 대한 자동 요약을 수행한다.

따라서 1.1.1.0/24와 1.1.2.0/24가 명백히 다른 네트워크 주소라도 1.0.0.0/8으로 처리한다.

PC1 : 1.1.1.2/24 ----- fa0/0 : 1.1.1.1/24 (Router1) se0/1/0 : 192.130.1.1/24 ----- se0/1/0 : 192.130.1.2/24 (Router2) fa0/0 : 1.1.2.1/24 ----- PC2 : 1.1.2.2/24

만약 위와 같은 구성이라면 라우터는 directly connected 인터페이스의 1.0.0.0의 AD 값은 0이고 수신한 네트워크 정보 1.0.0.0의 AD 값은 120이므로 상대방에게 받은 정보를 라우팅 테이블에 반영하지 않는다.

+ Recent posts