본문 바로가기

Network

11. Network : Routing Protocol - OSPF

Routing Protocol RIP에 관해서

 

09. Network : Routing Protocol - RIP

1. Routing 패킷에 대한 목적지 IP 주소와 일치하는 경로를 라우팅 테이블에서 검색하여 패킷을 인터페이스로 출력 경로 정보 검색, 최적 경로 선출, 선출된 경로 관리 경로 수집(Path Discovery) 네트워

mh-itstudy.tistory.com

 

1. OSFP (Open Shortest Path First protocol)

  • IGP (Interior Gateway Protocol)
  • RIP의 단점을 해결하여 새로운 기능을 지원하는 인터넷 프로토콜로, 대규모 네트워크에서 많이 사용됨
  • 인터넷 망에서 이용자가 최단 경로를 선정할 수 있도록 라우팅 정보에 노드 간의 거리 정보, 링크 상태 정보를 실시간으로 반영하여 최단 경로로 라우팅을 지원함
  • 링크 스테이트 라우팅 알고리즘 사용
  • CIDR, VLSM 지원

2. OSFP 구성하기

2.1. 구성 1

area 넘버가 같아야만 라우팅 테이블 교환 (area0;backbone area의 경우 제외)

2.1. 설정

Left_R1

//라우터 기본 설정
en
conf t
hostname Left_R1
ena se mhan
no ip domain-lookup
ser p
username root pass mhan1
ip domain-name mhan.xyz
crypto key gen rsa
2048
ip ssh ver 2
line con 0
pass con1
login
exec-t 0 0
logging syn
exit
line vty 0 4
login local
transport input ssh
exit

//interface IP 설정
int g0/0
ip add 100.100.100.126 255.255.255.128
no sh

int g0/1
ip add 100.100.100.254 255.255.255.128
no sh

int g0/2
ip add 100.100.101.254 255.255.255.0
no sh

int s0/0/0
ip add 10.0.0.1 255.255.255.252
clock rate 4000000
no sh
do wr
exit

//OSPF 설정
router ospf 10
network 100.100.100.0 0.0.0.127 area 1
network 100.100.100.128 0.0.0.127 area 1
network 100.100.101.0 0.0.0.255 area 1
network 10.0.0.0 0.0.0.3 area 0

do wr

 

Right_R1

//라우터 기본 설정
en
conf t
hostname Left_R1
ena se mhan
no ip domain-l
ser p
username root pass mhan1
ip domain-name mhan.xyz
crypto key gen rsa
2048
ip ssh ver 2
line con 0
pass babo2
login
exec-t 0 0
logging syn
exit
line vty 0 4
login local
transport input ssh
exit

//interface IP 설정
int g0/0
ip add 200.200.200.1 255.255.254.0
no sh

int g0/1
ip add 200.200.202.1 255.255.254.0
no sh

int s0/0/0
ip add 10.0.0.2 255.255.255.252
no sh
exit

//OSPF 설정
router ospf 10
network 200.200.200.0 0.0.3.255 area 2
network 10.0.0.0 0.0.0.3 area 0
pa g0/0
pa g0/1

do wr

2.2. 구성 2

2.3. Router 설정

Seoul_R1

//기본 설정
en
conf t
hostn Seoul_R1
ena se mhan
no ip domain-lookup
ser pa
ip domain-name mhan.xyz
cry key generate rsa
2048
ip ssh ver 2
username root pri 15 passw mhan1
username root1 passw mhan2
line con 0
pass con1
login
exec-t 0 0
logg syn
exit
line vty 0 4
login local
transport input ssh
exit

//IP 설정
int g0/0
ip add 1.1.1.254 255.255.255.0
no sh
int s0/0/0
ip add 1.0.0.1 255.255.255.252
clo ra 4000000
no sh
exit

//OSPF 설정
router ospf 100
network 1.0.0.0 0.0.0.3 area 0
network 1.1.1.0 0.0.0.255 area 0
pa g0/0
do wr


Daejeon_R1

//기본 설정
en
conf t
hostn Daejeon_R1
ena se mhan
no ip domain-lookup
ser pa
ip domain-name mhan.xyz
cry key generate rsa
2048
ip ssh ver 2
username root privilege 15 passw mhan1
username root1 passw mhan2
line con 0
pass con1
login
exec-t 0 0
logg syn
exit
line vty 0 4
login local
transport input ssh
exit

//IP 설정
int g0/0
ip add 1.1.10.254 255.255.255.0
no sh
int s0/0/0
ip add 1.0.0.2 255.255.255.252
no sh
int s0/0/1
ip add 1.0.0.5 255.255.255.252
clo ra 4000000
no sh
exit

//OSPF 설정
router ospf 100
network 1.0.0.0 0.0.0.3 area 0
network 1.0.0.4 0.0.0.3 area 1
network 1.1.10.0 0.0.0.255 area 0
pa g0/0
do wr

 

Jeju_R1

//기본 설정
en
conf t
hostn Jeju_R1
ena se mhan
no ip domain-lookup
ser pa
ip domain-name mhan.xyz
cry key generate rsa
2048
ip ssh ver 2
username root privilege 15 pass mhan1
username root1 pass mhan2
line con 0
pass con1
login
exec-t 0 0
logg syn
exit
line vty 0 4
login local
transport in ssh
exit

//IP 설정
int g0/0
ip add 1.1.20.254 255.255.255.0
no sh
int s0/0/0
ip add 1.0.0.6 255.255.255.252
no sh
exit

//OSPF 설정
router ospf 200
network 1.0.0.4 0.0.0.3 area 1
network 1.1.20.0 0.0.0.255 area 1
pa g0/0
do wr

 

2.3. Switch 설정

Seoul_S1

en
conf t
hostn Seoul_S1
ena se mhan
no ip domain-lookup
ser pa
ip domain-name mhan.xyz
cry key generate rsa
2048
ip ssh ver 2
username root privilege 15 pass mhan1
username root1 pass mhan2
line con 0
pass con1
login
exec-t 0 0
logg syn
exit
line vty 0 4
login local
transport input ssh
exit

int vl 1
ip add 1.1.1.253 255.255.255.0
no sh
exit
ip default-gateway 1.1.1.254
do wr

 

Daejeon_S1

en
conf t
hostn Daejeon_S1
ena se mhan
no ip domain-lookup
ser pa
ip domain-name mhan.xyz
cry key generate rsa
2048
ip ssh ver 2
username root privilege 15 pass mhan1
username root1 pass mhan2
line con 0
pass con1
login
exec-t 0 0
logg syn
exit
line vty 0 4
login local
transport input ssh
exit

int vl 1
ip add 1.1.10.253 255.255.255.0
no sh
exit
ip default-gateway 1.1.10.254
do wr

 

Jeju_S1

en
conf t
hostn Jeju_S1
ena se mhan
no ip domain-lookup
ser pa
ip domain-name mhan.xyz
cry key generate rsa
2048
ip ssh ver 2
username root privilege 15 pass mhan1
username root1 pass mhan2
line con 0
pass con1
login
exec-t 0 0
logg syn
exit
line vty 0 4
login local
transport input ssh
exit

int vl 1
ip add 1.1.20.253 255.255.255.0
no sh
exit
ip default-gateway 1.1.20.254
do wr