본문 바로가기
네트워크

OSPF #4(Virtual-link,Demand circuit)

by CBROJIN 2025. 4. 5.

[학습 목표]

1) OSPF 가상링크(Virtual-link)

2) OSPF Demand circuit

 

 

OSPF 실습 설정
기본 설정
R1(config)#int e0/0
R1(config-if)#ip add 1.1.1.12 255.255.255.0
R1(config-if)#no shut
R1(config)#int lo0      
R1(config-if)#ip add 1.1.11.1 255.255.255.0
R1(config)#router ospf 1
R1(config-router)#router-id 1.1.11.1
R1(config-router)#network 1.1.11.1 0.0.0.0 area 1
R1(config-router)#network 1.1.1.12 0.0.0.0 area 1
R1(config)#int e0/0
R1(config-if)#ip ospf netwrok point-to-point

가상링크 설정
R1(config)#int e0/3
R1(config-if)#ip add 10.10.10.2 255.255.255.0
R1(config-if)#ip ospf network point-to-point
R1(config-if)#no shut
R1(config)#router ospf 1
R1(config-router)#network 10.10.10.2 0.0.0.255 area 10
R1(config-router)#area 1 virtual-link 2.2.22.2

기본 설정
R2(config)#int e0/0
R2(config-if)#ip add 1.1.1.21 255.255.255.0
R2(config-if)#no shut
R2(config-if)#int e0/1
R2(config-if)#ip add 1.1.2.23 255.255.255.0
R2(config-if)#no shut
R2(config)#int lo0
R2(config-if)#ip add 2.2.22.2 255.255.255.0
R2(config)#router ospf 1
R2(config-router)#router-id 2.2.22.2
R2(config-router)#network 2.2.22.2 0.0.0.0 area 0
R2(config-router)#network 1.1.1.21 0.0.0.0 area 1
R2(config-router)#network 1.1.2.23 0.0.0.0 area 0
R2(config)#int range e0/0-1
R2(config-if)#ip ospf netwrok point-to-point

가상링크 설정
R2(config)#router ospf 1
R2(config-router)#area 1 virtual-link 1.1.11.1


기본 설정
R3(config)#int e0/1
R3(config-if)#ip add 1.1.2.32 255.255.255.0
R3(config-if)#no shut
R3(config-if)#int e0/2
R3(config-if)#ip add 1.1.3.34 255.255.255.0
R3(config-if)#no shut
R3(config)#int lo0
R3(config-if)#ip add 3.3.33.3 255.255.255.0
R3(config)#router ospf 1
R3(config-router)#router-id 3.3.33.3
R3(config-router)#network 3.3.33.3 0.0.0.0 area 0
R3(config-router)#network 1.1.2.32 0.0.0.0 area 0
R3(config-router)#network 1.1.3.34 0.0.0.0 area 2
R3(config)#int range e0/1-2
R3(config-if)#ip ospf netwrok point-to-point

가상링크 설정
R10(config)#int e0/3
R10(config-if)#ip add 10.10.10.1 255.255.255.0
R10(config-if)#ip ospf network point-to-point
R10(config-if)#no shut
R10(config)#router ospf 1
R10(config-router)#router-id 10.10.11.10
R10(config-router)#network 10.10.11.10 0.0.0.255 area 10
R10(config-router)#network 10.10.10.1 0.0.0.255 area 10

 

 

1) OSPF 가상링크

왜 OSPF 가상링크가 필요할까? 

 

모든 OSPF Area는 반드시 Area 0(Backbone)에 직접 연결되어 있어야 한다.

  • OSPF 라우팅 정보는 모든 Area 간의 교환이 반드시 Area 0을 통해서만 가능하기 때문이다.
  • Area 0이 없거나 끊어져 있으면, 라우팅 정보가 전달되지 않음 → 통신 불가 상황이 생김.

핵심 개념

 

❗ Virtual Link = 논리적 터널

OSPF는 실제 물리 연결이 없더라도, 두 ABR 라우터 사이에 가상의 OSPF 인터페이스를 만들어서

마치 Backbone에 연결된 것처럼 동작하게 만드는 기능이다.

 

🔎 실습

Virtual-link 설정 전(좌) 후(우)

 

 

# Virtual-link 설정 전 R10의 OSPF 라우팅 테이블엔 어떤 경로도 없다.

새로 추가한 Area 10 과 Area 0(Backbone) 사이에 Area 1이 끼어있어 물리적으로 연결되 있지 않기 때문이다.

R1(config-router)#area 1 virtual-link 2.2.22.2

R2(config-router)#area 1 virtual-link 1.1.11.1

설정 후 R10 OSPF 라우팅 테이블이 생겼다. 가상링크 연결 후 R1이 Area 0에도 소속되기 때문이다.

 

❗Virtual-link 설정 하는 Area를 Transit area(Area 1)라고 부르는데,

Area0에 소속된 ABR(R2)와 Virtual-link를 생성할 Area의 ABR(R1) 두군데서만 설정하면 된다.


2) OSPF 디멘드 서킷

왜 OSPF Demand Circuit이 필요할까?

 

OSPF는 기본적으로 30분마다 LSA(Link State Advertisement)를 자동으로 갱신하고,
Hello 패킷도 주기적으로 전송해서 Neighbor 관계를 유지한다.

이건 LAN이나 고속 네트워크에서는 아무 문제 없지만, 이런 환경에서는 문제 발생한다.


 저속 회선 ISDN, Frame Relay, 위성망 등 대역폭이 적고 트래픽 최소화가 중요한 경우
과금형 회선 사용량이나 시간에 따라 요금이 부과되는 WAN 회선
백업 링크 메인 링크가 끊겼을 때만 활성화되는 백업용 링크
고지연 링크 OSPF의 잦은 Hello/LSA 갱신이 성능을 저해함
 
이런 환경에서는 주기적인 OSPF 트래픽조차도 비용과 성능에 부담이 된다.

그래서 필요한 기능이 바로 Demand Circuit 이다.

 

Demand Circuit의 역할

  • Hello 패킷 전송 중단
  • LSA 재전송/갱신 중단
  • 라우팅 정보 변경이 생기면 그때만 트래픽 발생

즉, OSPF가 “조용한 상태”로 들어가고,
필요할 때만 깨어나는 구조다
.(라우팅 변화가 있을 때만 다시 통신 발생)

 

🔎 실습

 

# Virtual-link를 설정하면 디멘드 서킷이 설정되는데,

DoNotAge LSA allowed 는 30분 주기로 광고하던 LSA refresh를 중단하겠다는 말이다.

Hello suppressed 는 OSPF Hello 메시지를 중단하겠다는 의미다.

 

또는, 디맨드 서킷이 필요한 구간 인터페이스에

R1(config)#int e0/0

R1(config-if)#ip ospf demand-circuit

을 설정 하면 된다. OSPF 네이버일 경우 나머지 한쪽도 디맨드 서킷으로 동작한다.

'네트워크' 카테고리의 다른 글

BGP #2(Next Hop,Split Horizon)  (0) 2025.04.10
BGP #1(iBGP,eBGP)  (0) 2025.04.07
OSPF #3(Summarization,Authentication)  (0) 2025.04.02
OPSF #2(LSA,Stub Area)  (0) 2025.03.30
OSPF #1  (5) 2024.12.07