본문 바로가기

IT STUDY/CCNA

[Router] 6. RIPv2 이론, 실습

반응형

 

이번시간에는 많은 문제가 많은 RIPv1의 호환 버전인 RIPv2에 대해 알아 보도록 하겠습니다.

 

 

 

RIPv2 란?

RIPv1의 예약된 필드를 사용하여 RIP기능을 대폭 확장 하였다.(RIP헤더 참고) 기본적인 동작은 RIPv1과 동일하며 서브넷마크스 식별, 경로 정보 인증, AS 구별, 브로드캐스트, 멀티캐스트 전송 기능이 추가 되었다.

하지만 최대 홉수는 여전히 16으로 제한되 확장성 문제는 해결 하지 못했다.

 

 

 

RIPv2 가장 큰 특징

-RIPv1과 RIPv2를 비교하여 특징을 알아보자.
    ① RIPv2는 CIDR, VLSM을 지원한다.(가장 큰 특징)
    ② 메세지 전달: RIPv1은 브로드캐스트만 지원, RIPv2는 브로드캐스트, 멀티캐스트 지원
    ③ 인증: RIPv2에서는 메세지마다 인증이 가능
   
    ④ 호환성: RIPv2는 RIPv1의 모든 필드 인식 가능


 

 

 

RIPv2 Header Format

-RIPv2의 Header Format은 RIPv1의 예약된 비트에 다음과 같은 기능이 추가되었다.

 

 

 

 

 

Chapter 1 - RIPv2 실습 [ 구성도]

서브넷팅을 하여 효율성 있는 네트워크를 구성해 보자

# R1,R2,R3 Router를 이용한 실습 #

1. 요구사항

 

@ R-1
# 최대 host 4094 (N=20,H=12)

@ R-2
# 최대 host 1022 (N=22,H=10)

@R-3
# 최대 host 510   (N=23,H=9)

 

 

 

 

쉽게 네트워크를 구성하기 위해 구성도를 그려보자

 

2. 서브네팅 구성도 그리기

[Host수에 맞게 서브넷팅을 한 모습]

 

 

3. packet Tracer로 연결하기

 

 

 

 

 

Chapter 2 - RIPv2 실습 [ 명령어 ]

RIPv2는 RIPv1이랑 설정이 비슷하다. 다음과 같은 작업만 하면 된다. 각각의 라우터의 show run의 모습을 확인 해보자.

 

1. Router-1의 구성 하기

interface FastEthernet0/0 ← 4094개의 host를 가지는 네트워크
 ip address 172.16.15.254 255.255.240.0
 duplex auto
 speed auto

!
interface FastEthernet1/0
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface Serial2/0
 ip address 192.168.1.1 255.255.255.252

!
interface Serial3/0
 ip address 192.168.1.10 255.255.255.252
 clock rate 56000

!
interface FastEthernet4/0
 no ip address
 shutdown
!
interface FastEthernet5/0
 no ip address
 shutdown
!
router rip ← RIPv2 설정 하기 (RIPv1처럼 router rip를 친 후 version 2라고만 치면된다. 그리고 no auto-summary를 잊지말것!!
 version 2
 network 172.16.0.0
 network 192.168.1.0
 no auto-summary

!
ip classless
!
!
!
!
!
!
!
line con 0
 exec-timeout 0 0
line vty 0 4
 login
!
!
!
end

 

2. Router-2의 구성 하기

interface FastEthernet0/0
 ip address 172.16.19.254 255.255.252.0
 duplex auto
 speed auto

!
interface FastEthernet1/0
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface Serial2/0
 ip address 192.168.1.5 255.255.255.252
!
interface Serial3/0
 ip address 192.168.1.2 255.255.255.252
 clock rate 56000

!
interface FastEthernet4/0
 no ip address
 shutdown
!
interface FastEthernet5/0
 no ip address
 shutdown
!
router rip
 version 2
 network 172.16.0.0
 network 172.168.0.0
 network 192.168.1.0
 no auto-summary

!
ip classless
!
!
!
!
!
!
!
line con 0
 exec-timeout 0 0

line vty 0 4
 login
!

 

 

3. Router-3의 구성 하기


interface FastEthernet0/0
 ip address 172.16.21.254 255.255.254.0
 duplex auto
 speed auto

!
interface FastEthernet1/0
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface Serial2/0
 ip address 192.168.1.9 255.255.255.252
!
interface Serial3/0
 ip address 192.168.1.6 255.255.255.252
 clock rate 56000

!
interface FastEthernet4/0
 no ip address
 shutdown
!
interface FastEthernet5/0
 no ip address
 shutdown
!
router rip
 version 2
 network 172.16.0.0
 network 192.168.1.0
 no auto-summary

!
ip classless
!
!
!
!
!
!
!
line con 0
 exec-timeout 0 0
line vty 0 4
 login
!
!
!
end

 

 

 

Chapter 2 - RIPv2 Router 연결 확인

연결을 하였으면 확인도 중요하다. show ip route를 사용하여 RIP연결 사항을 확인해 보자.

R로 된 것이 RIPv2로 설정한 Routing설정이다.

 

 

1. Router-1의 연결 확인

R-1#sh 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/16 is variably subnetted, 3 subnets, 3 masks
C       172.16.0.0/20 is directly connected, FastEthernet0/0
R       172.16.16.0/22 [120/1] via 192.168.1.2, 00:00:01, Serial2/0
R       172.16.20.0/23 [120/1] via 192.168.1.9, 00:00:11, Serial3/0
     192.168.1.0/30 is subnetted, 3 subnets
C       192.168.1.0 is directly connected, Serial2/0
R       192.168.1.4 [120/1] via 192.168.1.2, 00:00:01, Serial2/0
                    [120/1] via 192.168.1.9, 00:00:11, Serial3/0
C       192.168.1.8 is directly connected, Serial3/0

 

2. Router-2의 연결 확인

R-2#sh 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/16 is variably subnetted, 3 subnets, 3 masks
R       172.16.0.0/20 [120/1] via 192.168.1.1, 00:00:13, Serial3/0
C       172.16.16.0/22 is directly connected, FastEthernet0/0
R       172.16.20.0/23 [120/1] via 192.168.1.6, 00:00:15, Serial2/0
     192.168.1.0/30 is subnetted, 3 subnets
C       192.168.1.0 is directly connected, Serial3/0
C       192.168.1.4 is directly connected, Serial2/0
R       192.168.1.8 [120/1] via 192.168.1.1, 00:00:13, Serial3/0
                    [120/1] via 192.168.1.6, 00:00:15, Serial2/0

 

3. Router-3의 연결 확인

R-3#sh 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/16 is variably subnetted, 3 subnets, 3 masks
R       172.16.0.0/20 [120/1] via 192.168.1.10, 00:00:24, Serial2/0
R       172.16.16.0/22 [120/1] via 192.168.1.5, 00:00:12, Serial3/0
C       172.16.20.0/23 is directly connected, FastEthernet0/0
     192.168.1.0/30 is subnetted, 3 subnets
R       192.168.1.0 [120/1] via 192.168.1.10, 00:00:24, Serial2/0
                    [120/1] via 192.168.1.5, 00:00:12, Serial3/0
C       192.168.1.4 is directly connected, Serial3/0
C       192.168.1.8 is directly connected, Serial2/0

 

 

 

 

 

 

 

 

 

 

 

 

 

반응형