Network/CCNA

Dynamic Routing Protocol

Perd 2020. 1. 13. 10:17

Dynamic Routing Protocol.zip
0.09MB

Static은 모르는 곳에서 패킷이 왔을 때 어디로 가라 지정하는 것

Dynamic은 내 정보는 뭐고 너는 어떤거니 하면서 서로 정보를 주고 받는 것

 

rip을 사용한 토폴로지 구성

R1(config)#route rip

R1(config-router)#network 192.168.1.0

R1(config-router)#network 192.168.2.0

R1(config-router)#network 10.0.0.0

R1(config-router)#version 2

R1(config-router)#no auto-summary => 클래스리스를 클래스풀하게 묶어 버린다?

 

R2(config)#route rip

R2(config-router)#network 192.168.3.0

R2(config-router)#network 192.168.4.0

R2(config-router)#network 10.0.0.0

R2(config-router)#version 2

R2(config-router)#no auto-summary

show ip route / 라우팅 테이블을 보면 이런식으로 정보가 생겼다.

C : 직접적으로 연결된 것

R : rip을 사용해서 테이블에 학습된 것

------------------------------------------------------------------------------------------------------------------

EIGRP를 이용한 토폴로지

R3(config)#router eigrp 10 -> 연결할 라우터끼리 숫자 같게 해야한다.

R3(config-router)#network 172.16.1.0 0.0.0.255

R3(config-router)#network 172.16.2.0 0.0.0.255

R3(config-router)#network 10.1.11.0 0.0.0.3

 

R4(config)#router eigrp 10 -> 연결할 라우터끼리 숫자 같게 해야한다.

R4(config-router)#network 172.16.3.0 0.0.0.255

R4(config-router)#network 172.16.4.0 0.0.0.255

R4(config-router)#network 10.1.11.0 0.0.0.3

D 가 EIGRP로 학습된 라우팅 테이블이다.

------------------------------------------------------------------------------------------------------------------

 

OSPF를 사용한 토폴로지 (Area0 : R5,6 / Area1 : R7,8/ Area2 : R9,10)

OSPF는 EIGRP와는 다르게 뒤에 Area를 적어준다. (기본은 Area0 이다.)

 

Area 0 (Backbone)

R5(config)# router ospf 10

R5(config-router)#network 10.1.101.0 0.0.0.3 area 0

R5(config-router)#network 172.16.16.0 0.0.0.255 area 0

R5(config-router)#network 172.16.17.0 0.0.0.255 area 0

 

R6(config)#router ospf 10

R6(config-router)#network 10.1.101.0 0.0.0.3 area 0

R6(config-router)#network 172.16.18.0 0.0.0.255 area 0

R6(config-router)#network 172.16.19.0 0.0.0.255 area 0

 

Area 1

R7(config)#router ospf 10

R7(config-router)#network 10.1.102.0 0.0.0.3 area 1

R7(config-router)#network 172.16.20.0 0.0.0.255 area 1

R7(config-router)#network 172.16.21.0 0.0.0.255 area 1

 

 

R8(config)#router ospf 10

R8(config-router)#network 10.1.102.0 0.0.0.3 area 1

R8(config-router)#network 172.16.22.0 0.0.0.255 area 1

R8(config-router)#network 172.16.23.0 0.0.0.255 area 1

 

Area 2

R9(config)#router ospf 10

R9(config-router)#network 10.1.103.0 0.0.0.3 area 2

R9(config-router)#network 172.16.24.0 0.0.0.255 area 2

R9(config-router)#network 172.16.25.0 0.0.0.255 area 2

 

R10(config)#router ospf 10

R10(config-router)#network 10.1.103.0 0.0.0.3 area 2

R10(config-router)#network 172.16.26.0 0.0.0.255 area 2

R10(config-router)#network 172.16.27.0 0.0.0.255 area 2

 

이렇게 치고 난 후에 같은 area 안에서 서로 통신이 되는지 tracert를 사용해 확인 후 라우팅 테이블을 확인한다.

show ip route

-> 각 라우터의 테이블을 확인해 보면 O(ospf) 방식으로 18.0과 19.0의 라우팅이 학습되어있다.

------------------------------------------------------------------------------------------------------------------

확인하였으니 각 area끼리 연결 후 그에 따른 설정을 해준다. 

R5(config)# router ospf 10

R5(config-router)# network 10.1.202.0 0.0.0.3 area 0

R9(config)# router ospf 10

R9(config-router)# network 10.1.202.0 0.0.0.3 area 0

 

R6(config)# router ospf 10

R6(config-router)# network 10.1.201.0 0.0.0.3 area 0

R7(config)# router ospf 10

R7(config-router)# network 10.1.201.0 0.0.0.3 area 0

 

이렇게 설정을 한 후 테이블을 확인한다.

네트워크 수 만큼 OSFP를 사용해 학습된 것을 확인할 수 있다.

여기서 IA가 적혀있는 정보는 다른 Area에서 정보가 왔다는 뜻이다.

------------------------------------------------------------------------------------------------------------------

이제 여태까지 만들었던 토폴로지를 모두 합칠 것이다.

짜잔~ RIP, EIGRP, OSPF 를 모두 합쳤다!

R2(config)#ip route 0.0.0.0 0.0.0.0 10.0.1.2

R2(config)#router rip

R2(config-router)#default-information originate

 

R3(config)#ip route 172.16.16.0 255.255.240.0 10.0.2.2

R3(config)#iip route 192.168.0.0 255.255.0.0 10.0.1.1

R3(config)#router eigrp 10

R3(config-router)#redistribute static

 

R6(config)#ip route 0.0.0.0 0.0.0.0 10.0.2.1

R6(config)#router ospf 10

R6(config-router)#default-information originate

 

이렇게 설정을 하고 나서 라우팅 테이블을 확인

R2 / 제일 밑에 디폴트 라우트가 생성되어있다.

 

R3 / 밑에 2줄에 디폴트 라우트가 생성되어 있다.
R6 / 제일 밑에 디폴트 라우트가 생성되어있다.