Net Eng

Routing Protocol - OSPF - 2 본문

Network/실습

Routing Protocol - OSPF - 2

欲心 2024. 6. 14. 03:32

OSPF-2 토폴로지

 

■ 라우터 IP 설정

 

R1 라우터

conf t
int s1/0
ip addr 10.0.12.1 255.255.255.0
no sh
int L0
ip addr 192.168.1.1 255.255.255.0

 

R2 라우터

conf t
int s1/0
ip addr 10.0.12.2 255.255.255.0
no sh
int s1/1
ip addr 10.0.23.1 255.255.255.0
no sh

 

R3 라우터

conf t
int s1/1
ip addr 10.0.23.2 255.255.255.0
no sh
int s1/2
ip addr 10.0.34.1 255.255.255.0
no sh
int s1/0
ip addr 172.16.35.1 255.255.255.0
no sh

 

R4 라우터

conf t
int s1/2
ip addr 10.0.34.2 255.255.255.0
no sh
int L0
ip addr 192.168.4.1 255.255.255.0

 

R5 라우터

conf t
int s1/0
ip addr 172.16.35.2 255.255.255.0
no sh
int L0
ip addr 172.16.5.1 255.255.255.0

 

■ OSPF 설정

 

R1 라우터

router ospf 1
net 10.0.12.0 0.0.0.255 area 1
net 192.168.1.0 0.0.0.255 area 1

 

R2 라우터

router ospf 1
net 10.0.12.0 0.0.0.255 area 1
net 10.0.23.0 0.0.0.255 area 0

 

R3 라우터

router ospf 1
net 10.0.23.0 0.0.0.255 area 0
net 10.0.34.0 0.0.0.255 area 2

 

R4 라우터

router ospf 1
net 10.0.34.0 0.0.0.255 area 2
net 192.168.4.0 0.0.0.255 area 2

 

■ RIPv2 설정

 

R3 라우터

router rip
ver 2
net 172.16.35.0
no auto-summary

 

R5 라우터

router rip
ver 2
net 172.16.35.0
net 172.16.5.0
no auto-summary

 

■ 재분배 설정

 

R3 라우터

router ospf 1
redistribute rip subnets
router rip
redistribute ospf 1 metric 1

 

→ OSPF에는 RIP를 RIP에는 OSPF를 재분배 해주어야 한다.

 

R1 라우팅 테이블
Ping test

 

→ R1 라우터에서 RIP 지역의 R5 라우터로 핑이 가는것을 확인할 수 있다.

 

■ OSPF의 Area유형

1. Normal Area

2. Stub Area : AS 외부 경로를 허용하지 않으며 기본 경로를 사용하여 트래픽을 전달

3. Totally Stubby Area : AS 외부 경로뿐만 아니라 다른 OSPF 영역으로부터의 경로도 허용하지 않으며, 기본 경로를 사용하여 모든 외부 트래픽을 전달 (cisco전용)

- 두 가지 모두 라우팅 테이블을 단순화하여 성능을 향상시키고 리소스를 절약하는 데 도움을 줍니다.

4. NSSA : N1, N2코드 생성

 

■ Stub Area & Totally Stub Area

 

stub 선언 (R1, R2에서 진행)

conf t router ospf 1 area 1 stub

 

C       10.0.12.0 is directly connected, Serial1/0
C    192.168.1.0/24 is directly connected, Loopback0
O*IA 0.0.0.0/0 [110/65] via 10.0.12.2, 00:00:12, Serial1/0

 

다시 초기화 할때는 2개의 명령어 모두 취소 해야함

no area 1 stub no-summary
no area 1 stub

 

■ Area2 Stub 선언

 

R4 라우터

router ospf 1
area 2 stub                         #현재 R4는 ASBR이므로 
=> Warning: Router is currently an ASBR while having only one area which is a stub area
no area 2 stub
area 2 nssa

 

R3 라우터

conf t
router ospf 1
area 2 nssa

 

O N2    172.16.35.0 [110/20] via 10.0.34.1, 00:00:01, Serial1/2
O N2    172.16.5.0 [110/20] via 10.0.34.1, 00:00:01, Serial1/2

 

현재 경로 비용을 고정값 20으로 사용하고 있음 이를 누적 경로 비용인 N1으로 변경하려면 재분배 설정에서 Metric-type 1로 수정하면 됨

 

R3 라우터

conf t
router ospf 1
redistribute rip metric-type 1 subnets

 

O N1    172.16.35.0 [110/84] via 10.0.34.1, 00:00:03, Serial1/2
O N1    172.16.5.0 [110/84] via 10.0.34.1, 00:00:03, Serial1/2

 

■ 실습파일

OSFP_lab3-1.7z
0.00MB

'Network > 실습' 카테고리의 다른 글

Routing Protocol - EIGRP - (1)  (0) 2024.06.14
Routing Protocol - OSPF - 3  (0) 2024.06.14
Routing Protocol - OSPF - 1  (0) 2024.06.14
Routing Protocol - RIP  (0) 2024.06.14
Static Routing  (0) 2024.06.14