Limetime's TimeLine
article thumbnail
반응형

RIP (Routing Information Protocol)

- 단순(메모리 사용량↓)하고 옛날부터 사용되는 표준(Standard) 라우팅 프로토콜이다.

 

RIP 특징

① 내부용(Interior Gateway Protocol) 라우팅 프로토콜이다.

     - 소규모 네트워크 효율성↑

② 디스턴스벡터(Distance Vector) 알고리즘이다.

     - 거리와 방향

③ 라우팅 경로의 최적 선택은 홉(Hop) 카운트로 결정하는데 최대 15홉을 넘지 못한다. (단점)

     - Hop Count는 라우터(네트워크)를 몇 번 거쳐야 목적지로 갈 수 있는지를 뜻한다.

     - 낮으면 낮을 수록 빠른 경로.

     +) 15개 이상의 라우터를 거치는 목적지의 경우 Unreachable(갈 수 없음)을 정의

④ Default 업데이트 주기 : 30초

     - 이웃 라우터들과 라우팅 정보 교환 : 경로 이상, 추가된 경로 확인

⑤ 로드 밸런싱 : Cisco 라우터 Default 4개의 경로 (최대 6개까지 가능)

     - ex) 목적지로 가는 경로가 4개 있을 때, 모두 같은 Hop Count를 가지고 있는 경우 네 곳으로 패킷을 분산해서 보내는 것.

 

Problem) Hop Count vs 속도

반응형
  1. PC1은 PC2에 데이터를 전송하려고 한다.
  2. Router들은 RIP으로 연결되어 있고, 라우터 A에서 경로 탐색 중 Hop Count가 가장 적은 A→B 경로가 최적인 것을 확인.

     - A→B는 1Hop Count지만 28.8kbps의 느린속도에 비해 A →C →D →B는 3Hop Count이지만 T1(1,544Mbps) 속도로 빠르게 보낼 수 있다.
     - 즉, 라우터를 많이 거치지만 더 빠른 경로가 있을 수 있다는 뜻!

But) RIP은 오직 Hop Count만 따진다.

     - 속도나 회선의 신뢰도, 회선의 부하(Load) 등은 확인하지 않는다.

     - 즉, RIP은 Hop Count가 작으면 좋은 줄 안다. (RIP 입장에선 A→B가 최고다)

 

RIP의 버전

RIPv1 : Subnet 개념 X, 무조건 Classful → auto-summary가 Default

     - ex) 150.150.100.0/24 (255.255.255.0)을 RIPv1(auto-summary)는 B Class로 인식하여 네트워크 주소를 150.150.0.0로 인식한다.

RIPv2 : Subnet 개념 O (no auto-summary 명령어로 자동축약기능 off 가능)

     - 150.150.100.0으로 인식하게 하려면 RIPv2를 사용하고 'no auto-summary' 명령어로 자동축약기능을 꺼야한다.

 

실습 1

* B라우터는 이미 셋팅이 끝나 있다는 가정

더보기

B라우터 셋팅

RouterB(config)# int ethernet0
RouterB(config-if)# ip address 203.240.200.1 255.255.255.0
RouterB(config-if)# no shutdown
RouterB(config-if)# exit
RouterB(config)# int serial0
RouterB(config-if)# ip address 203.240.150.2 255.255.255.0
RouterB(config-if)# no shutdown
RouterB(config-if)# exit
RouterB(config)# router rip
RouterB(config-router)# network 203.240.200.0
RouterB(config-router)# network 203.240.150.0
RouterB(config-router)# exit

 

 

RouterA(config)# int ethernet 0
RouterA(config-if)# ip address 203.240.100.1 255.255.255.0
RouterA(config-if)# no shutdown
RouterA(config-if)# exit
RouterA(config)# int serial 0
RouterA(config-if)# ip address 203.240.150.1 255.255.255.0
RouterA(config-if)# no shutdown
RouterA(config-if)# exit
RouterA(config)# router rip
RouterA(config-router)# network 203.240.100.0
RouterA(config-router)# network 203.240.150.0
RouterA(config-router)# exit
RouterA(config)# do show ip protocol
	Routing Protocol is "rip"
    	Sending updates every 30 seconds, next due in 15 seconds
        Invaild after 180 seconds, hold down 180, flused after 240
        Outgoing update filter list for all interfaces is
        Incoming update filter list for all interfaces is
        Redistributing: rip
        Default version control: send version 1, receive any version
        	Interface	Send	Recv	Key-chain
            Ethernet0	1		1		2
            Serial0		1		1		2
        Routing for Networks:
        	203.240.100.0
            203.240.150.0
        Routing Information Sources:
        	Gateway			Distance		Last Update
            203.240.150.2	120				00:00:08
        Distance: (default is 120)

 

30초 동안 업데이트 정보 미수신

180초 동안 기다림(6회) : Invaild after 180s (Invaild Time)

180초 경과 후 미수신 : Router는 Hold Down, 라우팅테이블의 Possibly Down

1분(60s) 후 미수신 : 총 240s
     - Flush Time (Flushed after 240s) : 라우팅 테이블에서 해당 경로 삭제


* Distance = AD (Administrative Distance) : 라우팅 정보에 대한 신뢰도 (작을수록 좋다.)

RouterA(config)# do show ip route
	Codes: C-Connected, S-Static, I-IGRP ...
    	   U-Per-user static route, O-ODR
    Gateway of last resort is not set
    R	203.240.200.0/24 [120/1] via 203.240.150.2, 00:00:21, serial0
    C	203.240.100.0/24 is directly connected, Ethernet0
    C	203.240.150.0/24 is directly connected, serial0

 

RouterA(config)# exit
RouterA# debug ip rip
	RIP protocol debugging is on
RouterA#
	05:25:34: RIP: Sending V1 update to 255.255.255.255 via Ethernet0 (203.240.100.1)
    05:25:34:	   network 203.240.200.0, metric 2
    05:25:34:	   network 203.240.150.0, metric 1
    ...
	05:26:04: RIP: Sending V1 update to 255.255.255.255 via Ethernet0 (203.240.100.1)
    ...
RouterA# u al // = no debug all 같은 뜻.

* 디버그(Debug) 명령어 : 라우터끼리 어떤 정보를 주고 받는지 서로 통신하는 로그들을 계속 보여준다.

※ 주의!

     - 콘솔에서만 사용하기 : Telnet에서는 terminal monitor라는 명령을 주어야 디버그 결과를 볼 수 있다.

     - 디버그 결과를 본 후 반드시 꺼줘야 한다. : 계속 출력하기 때문 (라우터가 힘들어함, 심한 경우 Shutdown)

     - 디버그 중지 명령어 : u al 또는 undebug all 또는 no debug all 

 

실습2

라우터C 셋팅

RouterC(config)# int ethernet0
RouterC(config-if)# ip address 150.150.1.1 255.255.0.0
RouterC(config-if)# no shutdown
RouterC(config-if)# exit
RouterC(config)# int serial0
RouterC(config-if)# ip address 203.210.200.2 255.255.255.0
RouterC(config-if)# no shutdown
RouterC(config-if)# exit
RouterC(config)# router rip
RouterC(config-router)# network 150.150.0.0
RouterC(config-router)# network 203.210.200.0
RouterC(config-router)# exit

 

라우터A 셋팅

RouterA(config)# int serial2/1
RouterA(config-if)# ip address 203.210.200.1 255.255.255.0
RouterA(config-if)# clockrate 1007616
RouterA(config-if)# no shutdown
RouterA(config-if)# exit
RouterA(config)# int serial2/0
RouterA(config-if)# ip address 203.210.100.1 255.255.255.0
RouterA(config-if)# clockrate 128000
RouterA(config-if)# no shutdown
RouterA(config-if)# exit
RouterA(config)# int fastethernet0/0
RouterA(config-if)# ip address 210.240.10.1 255.255.255.0
RouterA(config-if)# no shutdown
RouterA(config-if)# exit
RouterA(config)# router rip
RouterA(config-router)# network 203.210.200.0
RouterA(config-router)# network 203.210.100.0
RouterA(config-router)# network 210.240.10.0
RouterA(config-router)# exit

* Clockrate 명령어로 백투백(Back-to-Back) 구성 (DCE 구성시 Clockrate 지정) 

 

라우터B 셋팅

RouterB(config)# int serial0
RouterB(config-if)# ip address 203.210.100.2 255.255.255.0
RouterB(config-if)# no shutdown
RouterB(config-if)# exit
RouterB(config)# int ethernet0
RouterB(config-if)# ip address 172.70.100.1 255.255.255.0
RouterB(config-if)# no shutdown
RouterB(config-if)# exit
RouterB(config)# router rip
RouterB(config-router)# network 203.210.100.0
RouterB(config-router)# network 172.70.100.0
RouterB(config-router)# exit

 

RouterC# show ip route
	C 203.210.200.0/24 is directly connected, serial0
    R 203.210.100.0/24 [120/1] via 203.210.200.1, 00:00:03, serial0
    R 210.240.10.0/24 [120/1] via 203.210.200.1, 00:00:03, serial0
    R 172.70.0./16 [120/2] via 203.210.200.1, 00:00:03, serial0
    C 150.150.0.0/16 is directly connected, Ethernet0
RouterB# show ip route
	R 203.210.200.0/24 [120/1] via 203.210.100.1, 00:00:03, serial0
    C 203.210.100.0/24 is directly connected, serial0
    R 210.240.10.0/24 [120/1] via 203.210.100.1, 00:00:07, serial0
      172.70.0.0/24 is subnetted, 1 subnets
    C 172.70.100.0 is directly connected, Ethernet0
    R 150.150.0.0/16 [120/1] via 203.210.100.1, 00:00:07, serial0

* RouterB에서 172.70.100.0/24 네트워크를 RIP에 올렸지만, 실제로 받은 RouterC의 결과는 Classful한 172.70.0.0/16 네트워크로 적용되었다. (자동축약기능이 동작했기 때문이다., auto-summary)

반응형
profile

Limetime's TimeLine

@Limetime

포스팅이 좋았다면 "공감❤️" 또는 "구독👍🏻" 해주세요!