OSPF 네트워크 축약

넥떡-쟁이·2025년 10월 27일

OSPF

목록 보기
12/20

스텁 에어리들은 특정 에어리어 내부 라우터들의 라우팅 테이블 크기를 감소
백본 에어리어에 소속된 라우터의 라우팅테이블 감소시키지 않는다.

  • 자신의 에어리어의 소속된 네트워크를 축약하여 다른 에어리어로 전송할려면 ABR에서
  • 외부 도메인에서 재분배된 네트워크를 축약하여 다른 에어리어로 전송시키려면 ASBR에서
    <
    안정된 네트워크 운영가능
    축약에 한정된 네트워크로 전체에 미치는 영향이 최소화된다
    <
    네트워크 성능 향상
    축약에 의해 LSA수량 및 라우팅 테이블 수량 감소 장비 리소스 최소화
    이로인하여 통신속도 빨라진다
축약 전

ABR라우팅

R3#show ip route
Gateway of last resort is not set

      1.0.0.0/8 is variably subnetted, 10 subnets, 2 masks
O IA     1.1.1.1/32 [110/3] via 1.1.23.1, 00:50:47, GigabitEthernet0/1
O        1.1.2.2/32 [110/2] via 1.1.23.1, 22:01:17, GigabitEthernet0/1
C        1.1.3.0/24 is directly connected, Loopback0
L        1.1.3.3/32 is directly connected, Loopback0
O        1.1.4.4/32 [110/2] via 1.1.34.2, 22:01:17, GigabitEthernet0/2
O IA     1.1.12.0/24 [110/2] via 1.1.23.1, 22:01:17, GigabitEthernet0/1
C        1.1.23.0/24 is directly connected, GigabitEthernet0/1
L        1.1.23.2/32 is directly connected, GigabitEthernet0/1
C        1.1.34.0/24 is directly connected, GigabitEthernet0/2
L        1.1.34.1/32 is directly connected, GigabitEthernet0/2
      3.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        3.3.3.0/24 is directly connected, Loopback1
L        3.3.3.3/32 is directly connected, Loopback1
      4.0.0.0/24 is subnetted, 1 subnets
O N1     4.4.4.0 [110/22] via 1.1.34.2, 00:16:52, GigabitEthernet0/2
      5.0.0.0/24 is subnetted, 4 subnets
O        5.5.16.0 [110/2] via 1.1.34.2, 00:17:04, GigabitEthernet0/2
O        5.5.17.0 [110/2] via 1.1.34.2, 00:17:04, GigabitEthernet0/2
O        5.5.18.0 [110/2] via 1.1.34.2, 00:17:04, GigabitEthernet0/2
O        5.5.19.0 [110/2] via 1.1.34.2, 00:17:04, GigabitEthernet0/2
      6.0.0.0/24 is subnetted, 8 subnets
O N1     6.6.32.0 [110/22] via 1.1.34.2, 00:16:52, GigabitEthernet0/2
O N1     6.6.33.0 [110/22] via 1.1.34.2, 00:16:52, GigabitEthernet0/2
O N1     6.6.34.0 [110/22] via 1.1.34.2, 00:16:52, GigabitEthernet0/2
O N1     6.6.35.0 [110/22] via 1.1.34.2, 00:16:52, GigabitEthernet0/2
O N1     6.6.36.0 [110/22] via 1.1.34.2, 00:16:52, GigabitEthernet0/2
O N1     6.6.37.0 [110/22] via 1.1.34.2, 00:16:52, GigabitEthernet0/2
O N1     6.6.38.0 [110/22] via 1.1.34.2, 00:16:52, GigabitEthernet0/2
O N1     6.6.39.0 [110/22] via 1.1.34.2, 00:16:52, GigabitEthernet0/2

위에 라우팅을 보면 O같은 경우 OSPF의 같은 에어리어의 같은 영역의 타입이고, N1같은 경우는 내부에서 ASBR이 외부 네트워크를 OSPF 도메인으로 재분배를 해주는 경로이다.

ABR에서의 축약

ABR에서의 축약
R3(config)#router ospf 1
R3(config-router)#area 4 range 5.5.16.0 255.255.252.0
축약 후

ABR라우팅
R3#show ip route
Gateway of last resort is not set

      1.0.0.0/8 is variably subnetted, 10 subnets, 2 masks
O IA     1.1.1.1/32 [110/3] via 1.1.23.1, 00:04:18, GigabitEthernet0/1
O        1.1.2.2/32 [110/2] via 1.1.23.1, 00:04:18, GigabitEthernet0/1
C        1.1.3.0/24 is directly connected, Loopback0
L        1.1.3.3/32 is directly connected, Loopback0
O        1.1.4.4/32 [110/2] via 1.1.34.2, 00:04:18, GigabitEthernet0/2
O IA     1.1.12.0/24 [110/2] via 1.1.23.1, 00:04:18, GigabitEthernet0/1
C        1.1.23.0/24 is directly connected, GigabitEthernet0/1
L        1.1.23.2/32 is directly connected, GigabitEthernet0/1
C        1.1.34.0/24 is directly connected, GigabitEthernet0/2
L        1.1.34.1/32 is directly connected, GigabitEthernet0/2
      3.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        3.3.3.0/24 is directly connected, Loopback1
L        3.3.3.3/32 is directly connected, Loopback1
      4.0.0.0/24 is subnetted, 1 subnets
O N1     4.4.4.0 [110/22] via 1.1.34.2, 00:04:18, GigabitEthernet0/2
      5.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
O        5.5.16.0/22 is a summary, 00:04:18, Null0 //22축약
O        5.5.16.0/24 [110/2] via 1.1.34.2, 00:04:18, GigabitEthernet0/2
O        5.5.17.0/24 [110/2] via 1.1.34.2, 00:04:18, GigabitEthernet0/2
O        5.5.18.0/24 [110/2] via 1.1.34.2, 00:04:18, GigabitEthernet0/2
O        5.5.19.0/24 [110/2] via 1.1.34.2, 00:04:18, GigabitEthernet0/2
      6.0.0.0/24 is subnetted, 8 subnets
O N1     6.6.32.0 [110/22] via 1.1.34.2, 00:04:18, GigabitEthernet0/2
O N1     6.6.33.0 [110/22] via 1.1.34.2, 00:04:18, GigabitEthernet0/2
O N1     6.6.34.0 [110/22] via 1.1.34.2, 00:04:18, GigabitEthernet0/2
O N1     6.6.35.0 [110/22] via 1.1.34.2, 00:04:18, GigabitEthernet0/2
O N1     6.6.36.0 [110/22] via 1.1.34.2, 00:04:18, GigabitEthernet0/2
O N1     6.6.37.0 [110/22] via 1.1.34.2, 00:04:18, GigabitEthernet0/2
O N1     6.6.38.0 [110/22] via 1.1.34.2, 00:04:18, GigabitEthernet0/2
O N1     6.6.39.0 [110/22] via 1.1.34.2, 00:04:18, GigabitEthernet0/2

축약 후 라우팅테이블을 보면 축약 된 O타입의 동일 에어리어의 OSPF의 라우팅 테이블이 올라와 있을것이다.
O 5.5.16.0/22 is a summary, 00:04:18, Null0

다른 에어리어에서 축약 된 네트워크를 전달 받을 시 
R2#show ip route
(생략)

5.0.0.0/22 is subnetted, 1 subnets
O IA  5.5.16.0 [110/129] via 1.1.23.3, 00:03:45,  

6.0.0.0/24 is subnetted, 8 subnets
O E1  6.6.32.0 [110/149] via 1.1.23.3, 00:34:41,  
O E1  6.6.33.0 [110/149] via 1.1.23.3, 00:34:41,  
O E1  6.6.34.0 [110/149] via 1.1.23.3, 00:34:41,  
O E1  6.6.35.0 [110/149] via 1.1.23.3, 00:34:41,  
O E1  6.6.36.0 [110/149] via 1.1.23.3, 00:34:41,  
O E1  6.6.37.0 [110/149] via 1.1.23.3, 00:34:41,  
O E1  6.6.38.0 [110/149] via 1.1.23.3, 00:34:41,  
O E1  6.6.39.0 [110/149] via 1.1.23.3, 00:34:41,  

위 라우팅을 보면 축약 된 네트워크이며, 다른 에어리어 타입이라고 IA로 표시도 해준다 좋은 친구 인 것 같다

ASBR에서의 축약

OSPF로 재분배한 6.6.0.0 외부 네트워크를 축약하려면 반드시 ASBR인 R4에서만 가능하다

ASBR라우터 축약 전 
Gateway of last resort is 1.1.34.1 to network 0.0.0.0

O*IA  0.0.0.0/0 [110/2] via 1.1.34.1, 22:04:58, GigabitEthernet0/2
      1.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C        1.1.4.0/24 is directly connected, Loopback0
L        1.1.4.4/32 is directly connected, Loopback0
C        1.1.34.0/24 is directly connected, GigabitEthernet0/2
L        1.1.34.2/32 is directly connected, GigabitEthernet0/2
      4.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        4.4.4.0/24 is directly connected, Loopback4
L        4.4.4.4/32 is directly connected, Loopback4
      5.0.0.0/8 is variably subnetted, 8 subnets, 2 masks
C        5.5.16.0/24 is directly connected, Loopback5
L        5.5.16.1/32 is directly connected, Loopback5
C        5.5.17.0/24 is directly connected, Loopback5
L        5.5.17.1/32 is directly connected, Loopback5
C        5.5.18.0/24 is directly connected, Loopback5
L        5.5.18.1/32 is directly connected, Loopback5
C        5.5.19.0/24 is directly connected, Loopback5
L        5.5.19.1/32 is directly connected, Loopback5
      6.0.0.0/8 is variably subnetted, 16 subnets, 2 masks
C        6.6.32.0/24 is directly connected, Loopback6
L        6.6.32.1/32 is directly connected, Loopback6
C        6.6.33.0/24 is directly connected, Loopback6
L        6.6.33.1/32 is directly connected, Loopback6
C        6.6.34.0/24 is directly connected, Loopback6
L        6.6.34.1/32 is directly connected, Loopback6
C        6.6.35.0/24 is directly connected, Loopback6
L        6.6.35.1/32 is directly connected, Loopback6
C        6.6.36.0/24 is directly connected, Loopback6
L        6.6.36.1/32 is directly connected, Loopback6
C        6.6.37.0/24 is directly connected, Loopback6
L        6.6.37.1/32 is directly connected, Loopback6
C        6.6.38.0/24 is directly connected, Loopback6
L        6.6.38.1/32 is directly connected, Loopback6

축약 전 OSPF의 아닌 외부 네트워크 경로이다...

ASBR에서의 축약
R4(config)#router ospf 1
R4(config-router)#summary-address 6.6.32.0 255.255.248.0 
ASBR라우터 축약 후

Gateway of last resort is 1.1.34.1 to network 0.0.0.0

O*IA  0.0.0.0/0 [110/2] via 1.1.34.1, 22:26:39, GigabitEthernet0/2
      1.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C        1.1.4.0/24 is directly connected, Loopback0
L        1.1.4.4/32 is directly connected, Loopback0
C        1.1.34.0/24 is directly connected, GigabitEthernet0/2
L        1.1.34.2/32 is directly connected, GigabitEthernet0/2
      4.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        4.4.4.0/24 is directly connected, Loopback4
L        4.4.4.4/32 is directly connected, Loopback4
      5.0.0.0/8 is variably subnetted, 8 subnets, 2 masks
C        5.5.16.0/24 is directly connected, Loopback5
L        5.5.16.1/32 is directly connected, Loopback5
C        5.5.17.0/24 is directly connected, Loopback5
L        5.5.17.1/32 is directly connected, Loopback5
C        5.5.18.0/24 is directly connected, Loopback5
L        5.5.18.1/32 is directly connected, Loopback5
C        5.5.19.0/24 is directly connected, Loopback5
L        5.5.19.1/32 is directly connected, Loopback5
      6.0.0.0/8 is variably subnetted, 17 subnets, 3 masks
O        6.6.32.0/21 is a summary, 00:01:30, Null0 //축약
C        6.6.32.0/24 is directly connected, Loopback6
L        6.6.32.1/32 is directly connected, Loopback6
C        6.6.33.0/24 is directly connected, Loopback6
L        6.6.33.1/32 is directly connected, Loopback6
C        6.6.34.0/24 is directly connected, Loopback6
L        6.6.34.1/32 is directly connected, Loopback6
C        6.6.35.0/24 is directly connected, Loopback6
L        6.6.35.1/32 is directly connected, Loopback6
C        6.6.36.0/24 is directly connected, Loopback6
L        6.6.36.1/32 is directly connected, Loopback6
C        6.6.37.0/24 is directly connected, Loopback6
L        6.6.37.1/32 is directly connected, Loopback6
C        6.6.38.0/24 is directly connected, Loopback6
L        6.6.38.1/32 is directly connected, Loopback6
C        6.6.39.0/24 is directly connected, Loopback6
L        6.6.39.1/32 is directly connected, Loopback6

위 라우팅 테이블 보면 6.6.0.0에 대한 외부 네트워크에 대한 경로가 축약된 것을 확인할 수 있다.
O 6.6.32.0/21 is a summary, 00:01:30, Null0 //축약

R1#show ip route
(생략)

5.0.0.0/22 is subnetted, 1 subnets
O IA  5.5.16.0 [110/193] via 1.1.12.2, 00:11:22,  

6.0.0.0/21 is subnetted, 1 subnets
O E1  6.6.32.0 [110/213] via 1.1.12.2, 00:02:43,  

다른 에어리어의 경로를 보면 축약 된 네트워크로 라우팅 테이블을 업데이트를 진행하였으며 타입도 다른 에어리어의 소속인 IA이다.

참고서적 IP라우팅(피터전)

profile
겸손, 감사, 사랑, 열정, 즐거움 같이 웃어요

0개의 댓글