Dynamic Routing - RIPv2 (교육 13일차)

SW·2022년 12월 8일
0















👀 참고 👀
한국에서 미국 구글 서버까지 라우터 수가 궁금하다면 아래와 같이
커멘드 창에서 tracert -d 8.8.8.8을 실행해 본다.
생각보다 많지 않은 총 12개의 라우터를 통해서 ping이 request됨을 확인할 수 있다.

👀 참고 👀

실습> 네트워크 설정하기

패킷트레이서에서 라우터, PC 설정하고 슬롯 추가 장착하여 시리얼 포트, 이더넷 포트를 수작업으로 셋팅한다.



Serial 케이블을 선택 후 라우터 간 연결한다.

Straight 케이블을 선택 후 라우터와 스위치 간, 스위치와 PC 간 연결한다.

  • Straight 케이블
    라우터 -> 스위치는 제일 끝 포트에 끼운다.

스위치 -> PC는 제일 처음 포트부터 끼운다

📌 Tip 📌
패킷 트레이서 : 노트는 Ctrl+Shirt 키 누르면서 마우스를 드래그하면 복사되어 다른 곳에 붙이기가 가능하다.

실습> 네트워크 설정하기
동적 라우팅 RIP 설정
router rip : 동적 라우팅 프로토콜 RIP 설정
version 2 : RIP version 2 설정
network: 광고할 네트워크 정보
no auto-summary : Classless 방식으로 광고하는 설정
passive-interface: (Option) 불필요한 interface로 광고하지 않도록 설정

!R1
en
conf t
hostname R1
line con 0
exec-timeout 0 0
logging synchronous
int f0/0
ip add 10.10.10.1 255.255.255.0
no sh
int s0/0/0
ip add 10.10.20.1 255.255.255.0
no sh
router rip
version 2
network 10.10.10.0
network 10.10.20.0
no auto-summary
passive-interface f0/0
end
sh ip route
!

R1#sh ip route
Codes: L - local, C - connected, S - static, 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 10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
C 10.10.10.0/24 is directly connected, FastEthernet0/0 <-- #1
L 10.10.10.1/32 is directly connected, FastEthernet0/0
C 10.10.20.0/24 is directly connected, Serial0/0/0 <-- #2
L 10.10.20.1/32 is directly connected, Serial0/0/0
R 10.10.30.0/24 [120/1] via 10.10.20.2, 00:00:02, Serial0/0/0 <-- #3
R 10.10.40.0/24 [120/2] via 10.10.20.2, 00:00:02, Serial0/0/0 <-- #4

!R2
en
conf t
hostname R2
line con 0
exec-timeout 0 0
logging synchronous
int s0/0/0
ip add 10.10.20.2 255.255.255.0
no sh
int s0/0/1
ip add 10.10.30.1 255.255.255.0
no sh
router rip
version 2
no auto-summary
network 10.10.20.0
network 10.10.30.0
end
sh ip route
!

R2#sh ip route
Codes: L - local, C - connected, S - static, 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 10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
R 10.10.10.0/24 [120/1] via 10.10.20.1, 00:00:11, Serial0/0/0
C 10.10.20.0/24 is directly connected, Serial0/0/0
L 10.10.20.2/32 is directly connected, Serial0/0/0
C 10.10.30.0/24 is directly connected, Serial0/0/1
L 10.10.30.1/32 is directly connected, Serial0/0/1
R 10.10.40.0/24 [120/1] via 10.10.30.2, 00:00:21, Serial0/0/1

!R3
en
conf t
hostname R3
line con 0
exec-timeout 0 0
logging synchronous
int s0/0/0
ip add 10.10.30.2 255.255.255.0
no sh
int f0/0
ip add 10.10.40.1 255.255.255.0
no sh
router rip
version 2
no auto-summary
network 10.10.30.0
network 10.10.40.0
passive-interface fa0/0
end
sh ip route
!

R3#sh ip route
Codes: L - local, C - connected, S - static, 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 10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
R 10.10.10.0/24 [120/2] via 10.10.30.1, 00:00:19, Serial0/0/0
R 10.10.20.0/24 [120/1] via 10.10.30.1, 00:00:19, Serial0/0/0
C 10.10.30.0/24 is directly connected, Serial0/0/0
L 10.10.30.2/32 is directly connected, Serial0/0/0
C 10.10.40.0/24 is directly connected, FastEthernet0/0
L 10.10.40.1/32 is directly connected, FastEthernet0/0

라우팅 설정이 완료되면 10.10.40.2로 ping 통신을 한다.
C:>ping 10.10.40.2

Pinging 10.10.40.2 with 32 bytes of data:

Reply from 10.10.40.2: bytes=32 time=20ms TTL=125
Reply from 10.10.40.2: bytes=32 time=2ms TTL=125
Reply from 10.10.40.2: bytes=32 time=30ms TTL=125
Reply from 10.10.40.2: bytes=32 time=2ms TTL=125

Ping statistics for 10.10.40.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 2ms, Maximum = 30ms, Average = 13ms

실습> 위 라우터 설정을 반복하면서 연습하기

제한 시간: 20분 (30분)

실습 > 네트워크 추가

!R3
기존 설정
int s0/0/1
ip add 10.10.50.1 255.255.255.0
no sh
router rip
network 10.10.50.0

!R4
en
conf t
hostname R4
no ip domain-lookup
line con 0
exec-time 0 0
logg sync
int s0/0/0
ip add 10.10.50.2 255.255.255.0
no sh
int fa0/0
ip add 10.10.60.1 255.255.255.0
no sh
router rip
version 2
no auto-summary
network 10.10.50.0
network 10.10.60.0
passive-interface fa0/0
end
sh ip route
!

📌 Tip 📌
no ip domain-lookup 명령어 적용 전에 커멘드 오타로 명령어 인식 오류가 발생되어 Cisco 라우터에 랙이 걸리면 Ctrl + Shit + 6 키를 눌러주면 인터럽트가 걸려 빠져 나올 수 있다.

R1#sh ip route
Codes: L - local, C - connected, S - static, 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 10.0.0.0/8 is variably subnetted, 8 subnets, 2 masks
C 10.10.10.0/24 is directly connected, FastEthernet0/0
L 10.10.10.1/32 is directly connected, FastEthernet0/0
C 10.10.20.0/24 is directly connected, Serial0/0/0
L 10.10.20.1/32 is directly connected, Serial0/0/0
R 10.10.30.0/24 [120/1] via 10.10.20.2, 00:00:07, Serial0/0/0
R 10.10.40.0/24 [120/2] via 10.10.20.2, 00:00:07, Serial0/0/0
R 10.10.50.0/24 [120/2] via 10.10.20.2, 00:00:07, Serial0/0/0
R 10.10.60.0/24 [120/3] via 10.10.20.2, 00:00:07, Serial0/0/0

R2#sh ip route
Codes: L - local, C - connected, S - static, 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 10.0.0.0/8 is variably subnetted, 8 subnets, 2 masks
R 10.10.10.0/24 [120/1] via 10.10.20.1, 00:00:23, Serial0/0/0
C 10.10.20.0/24 is directly connected, Serial0/0/0
L 10.10.20.2/32 is directly connected, Serial0/0/0
C 10.10.30.0/24 is directly connected, Serial0/0/1
L 10.10.30.1/32 is directly connected, Serial0/0/1
R 10.10.40.0/24 [120/1] via 10.10.30.2, 00:00:26, Serial0/0/1
R 10.10.50.0/24 [120/1] via 10.10.30.2, 00:00:26, Serial0/0/1
R 10.10.60.0/24 [120/2] via 10.10.30.2, 00:00:26, Serial0/0/1

R3#sh ip route
Codes: L - local, C - connected, S - static, 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 10.0.0.0/8 is variably subnetted, 9 subnets, 2 masks
R 10.10.10.0/24 [120/2] via 10.10.30.1, 00:00:12, Serial0/0/0
R 10.10.20.0/24 [120/1] via 10.10.30.1, 00:00:12, Serial0/0/0
C 10.10.30.0/24 is directly connected, Serial0/0/0
L 10.10.30.2/32 is directly connected, Serial0/0/0
C 10.10.40.0/24 is directly connected, FastEthernet0/0
L 10.10.40.1/32 is directly connected, FastEthernet0/0
C 10.10.50.0/24 is directly connected, Serial0/0/1
L 10.10.50.1/32 is directly connected, Serial0/0/1
R 10.10.60.0/24 [120/1] via 10.10.50.2, 00:00:13, Serial0/0/1

R4#sh ip route
Codes: L - local, C - connected, S - static, 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 10.0.0.0/8 is variably subnetted, 8 subnets, 2 masks
R 10.10.10.0/24 [120/3] via 10.10.50.1, 00:00:09, Serial0/0/0
R 10.10.20.0/24 [120/2] via 10.10.50.1, 00:00:09, Serial0/0/0
R 10.10.30.0/24 [120/1] via 10.10.50.1, 00:00:09, Serial0/0/0
R 10.10.40.0/24 [120/1] via 10.10.50.1, 00:00:09, Serial0/0/0
C 10.10.50.0/24 is directly connected, Serial0/0/0
L 10.10.50.2/32 is directly connected, Serial0/0/0
C 10.10.60.0/24 is directly connected, FastEthernet0/0
L 10.10.60.1/32 is directly connected, FastEthernet0/0

PC0에서 PC2로 통신을 확인한다.
C:>ping 10.10.60.2

Pinging 10.10.60.2 with 32 bytes of data:

Request timed out.
Reply from 10.10.60.2: bytes=32 time=22ms TTL=124
Reply from 10.10.60.2: bytes=32 time=3ms TTL=124
Reply from 10.10.60.2: bytes=32 time=3ms TTL=124

Ping statistics for 10.10.60.2:
Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
Minimum = 3ms, Maximum = 22ms, Average = 9ms



profile
정보보안 전문가

0개의 댓글