Posts

Showing posts from September, 2025

[OSPF 설정] Stub Area에서 디폴트 설정

  📌 시나리오 Hub Router : ABR 역할, Area 0(백본)과 Area 1(Stub) 연결 Remote Router (지사) : Area 1(Stub)에 속함 지사에서는 인터넷 트래픽을 세세한 외부 Prefix(Type 5)로 배우는 대신, 허브가 내려주는 Default Route 만 사용 📌 실제 IP 예제 Hub Router (ABR) Loopback0: 1.1.1.1/32 (Router-ID) Gi0/0: 10.0.0.1/30 (Area 0, 본사 코어 쪽) Gi0/1: 192.168.1.1/30 (Area 1, 지사 쪽) Remote Router (지사) Loopback0: 2.2.2.2/32 (Router-ID) Gi0/0: 192.168.1.2/30 (Area 1, 허브와 연결) LAN: 172.16.1.1/24 📌 OSPF 설정 예제 Hub Router router ospf 100  router-id 1.1.1.1  network 10.0.0.0 0.0.0.3 area 0  network 192.168.1.0 0.0.0.3 area 1  area 1 stub no-summary //  area 1 stub no-summary → 이 Area(1)는 Stub이고, ABR에서 Default Route(0.0.0.0/0)만 내려줌. // no-summary 를 넣지 않으면 → Stub Area: Type 5(External)는 막고, Summary(Type 3) LSAs는 통과. // no-summary 를 넣으면 → Totally Stub: Type 3/5를 모두 막고, 오직 Default Route만 Area 1에 내려줌. Remote Router router ospf 100  router-id 2.2.2.2  network 192.168.1.0 0.0.0.3 area 1 ...

[OSPF 설정] 라우터 컨피그 예제 : Hub Router + Spoke Router (STUB) + Local Internet Spoke Router (NSSA + ASBR)

 ! ===== Hub Router (ABR) ===== hostname HUB-RTR1 ! interface Tunnel101  ip address 10.101.0.1 255.255.255.252  ip ospf network point-to-point  tunnel source <HUB_WAN_IP>  tunnel destination <SITE101_WAN_IP> ! (GRE over IPsec/VTI 환경이면 이에 맞게 구성) ! interface Tunnel120  ip address 10.120.0.1 255.255.255.252  ip ospf network point-to-point  tunnel source <HUB_WAN_IP>  tunnel destination <SITE120_WAN_IP> ! interface Loopback0  ip address 1.1.1.1 255.255.255.255 ! router ospf 100  router-id 1.1.1.1  ! --- 백본(사내 코어 측) ---  network 172.16.0.0 0.0.255.255 area 0  ! --- 일반 스포크(Stub 또는 Totally-Stub) ---  ! ABR 쪽에만 'no-summary'를 넣으면 "Totally-Stub"가 되어  ! Type-3 요약도 막고 0/0만 내려보냅니다. (스포크에서는 'area 101 stub'만)  area 101 stub no-summary  network 10.101.0.0 0.0.0.3 area 101  ! --- 로컬 인터넷 스포크(NSSA) ---  ! NSSA에서 외부(7번) LSA가 백본으로 번지는 걸 막고 싶으면 'no-redistribution'  ! (정책에 따라 선택) ...

[OSPF 설정] Cisco GRE over IPsec (Hub/Spoke)구성 예제

 Cisco GRE over IPsec 구성 예제 예: Hub(200.1.1.1) ↔ Remote(210.1.1.1) GRE 터널 인터페이스 = 내부 가상 링크 (10.10.10.0/30) 그 GRE 트래픽을 IPsec으로 암호화 🔑 동작 요약 두 라우터 간 “200.1.1.1 ↔ 210.1.1.1” 경로 위에서 GRE 터널(10.10.10.0/30)을 만듦. IPsec crypto map으로 GRE 프로토콜 트래픽(GRE=IP Protocol 47)을 캡처해서 암호화. OSPF는 GRE 터널(10.10.10.1–10.10.10.2) 위에서 돌기 때문에 **멀티캐스트(224.0.0.5)**도 자연스럽게 전달됨. 🔹 Hub Router 설정 ! GRE 터널 인터페이스 interface Tunnel0  ip address 10.10.10.1 255.255.255.252  tunnel source 200.1.1.1  tunnel destination 210.1.1.1  ip ospf network point-to-point ! ! OSPF 활성화 router ospf 100  router-id 1.1.1.1  network 10.10.10.0 0.0.0.3 area 0 ! ! ISAKMP Phase 1 crypto isakmp policy 10  encr aes  hash sha  authentication pre-share  group 2  lifetime 3600 ! crypto isakmp key cisco123 address 210.1.1.1 ! IPsec Transform set (Phase 2) crypto ipsec transform-set TS esp-aes esp-sha-hmac  mode transport ! ! GRE 트래픽만 보호 crypto map GRE-MAP 10 ipsec-isakmp  set peer 210.1...