네트워크

[CISCO] Multi area OSPF 설정하기

화이트해커 Luna 🌙 2022. 12. 6. 16:24
728x90
반응형

Multi area OSPF 설정하기

OSPF(Open Shortest Path First)는 계층화 된 라우팅 프로토콜이다. Area에 의해 효율적인 라우팅 정보 관리가 가능하고, neighbor 간에 라우팅 정보를 공유하는 특징이 있다.

정적 라우팅 환경에서는 라우터에 직접 default route 정보를 설정했으나 RIP에서는 OSPF을 통해 default route 정보를 전달한다. 

 

-목차-
1. R1
2. R2
3. R0_1
4. R0_2
5. R0_3
6. R0_4
7.확인

 

예제)


1. R1

 

no ip domain-lookup
int g0/1
ip add 10.1.1.1 255.255.255.0
no sh
int s0/0/0
ip add 1.1.1.2 255.255.255.0
no sh

R1(config)# router ospf 1
R1(config‐router)# router‐id 10.1.1.1
R1(config‐router)# network 1.1.1.2 0.0.0.0 area 1
R1(config‐router)# network 10.1.1.1 0.0.0.0 area 1
R1(config‐router)# passive‐interface g0/1

 


2. R2

 

no ip domain-lookup
int g0/1
ip add 20.1.1.1 255.255.255.0
no sh
int s0/0/0
ip add 1.1.2.2 255.255.255.0
no sh

R2(config)# router ospf 1
R2(config‐router)# router‐id 20.1.1.1
R2(config‐router)# network 1.1.2.2 0.0.0.0 area 2
R2(config‐router)# network 20.1.1.1 0.0.0.0 area 2
R2(config‐router)# passive‐interface g0/1

 


3. R0_1

 

no ip domain-lookup
int g0/0
ip add 1.1.0.1 255.255.255.0
no sh
int s0/0/0
ip add 1.1.1.1 255.255.255.0
no sh

R0_1(config)# router ospf 1
R0_1(config‐router)# router‐id 1.1.0.1
R0_1(config‐router)# network 1.1.1.1 0.0.0.0 area 1
R0_1(config‐router)# network 1.1.0.1 0.0.0.0 area 0

 

 


4. R0_2

no ip domain-lookup
int g0/0
ip add 1.1.0.2 255.255.255.0
no sh
int s0/0/0
ip add 1.1.2.1 255.255.255.0
no sh

R0_2(config)# router ospf 1
R0_2(config‐router)# router‐id 1.1.0.2
R0_2(config‐router)# network 1.1.2.1 0.0.0.0 area 2
R0_2(config‐router)# network 1.1.0.2 0.0.0.0 area 0

5. R0_3

no ip domain-lookup
int g0/0
ip add 1.1.0.3 255.255.255.0
no sh
int g0/1
ip add 30.1.1.1 255.255.255.0
no sh

R0_3(config)# router ospf 1
R0_3(config‐router)# router‐id 1.1.0.3
R0_3(config‐router)# network 30.1.1.1 0.0.0.0 area 0
R0_3(config‐router)# network 1.1.0.3 0.0.0.0 area 0
R0_3(config‐router)# passive‐interface g0/1

 


6. R0_4

no ip domain-lookup
int g0/0
ip add 1.1.0.4 255.255.255.0
no sh
int g0/1
ip add 40.1.1.1 255.255.255.0
no sh

R0_4(config)# router ospf 1
R0_4(config‐router)# router‐id 1.1.0.4
R0_4(config‐router)# network 40.1.1.1 0.0.0.0 area 0
R0_4(config‐router)# network 1.1.0.4 0.0.0.0 area 0
R0_4(config‐router)# passive‐interface g0/1

 


7. 확인

R1# show ip route ospf // ospf로 교환된 라우팅 정보만 확인
R1# show ip ospf int [interface] // ospf 작동중 interface 정보확인
R1# show ip ospf neighbor // 네이버상태표시

 

 


궁금한점 있으시면 댓글 남겨주세요.

728x90
반응형