[OSPF] Multi-Area(Loopback , EIGRP, 축약, 재분배, 디폴트)

2024. 10. 14. 18:13·Network/Network[GNS3, Packet]

⭐️ Table of Contents

  • Tech 1. Multi Area OSPF 작업
  • Tech 2. 응용 - Multi Area Loopback 설정(라우터 4, 라우터 5)
    • OSPF Loopback 축약
  • Tech 3. 응용 - Multi Atea Eigrp 설정(area 35 대신)
    • Loopback 축약
  • Tech 4. 디폴트 라우트 설정하지 않고 주소 광고
  • Tech 5. 모든 설정 확인(R1)

 

 

 

Tech 1. Multi Area OSPF 작업

1. 인터페이스 연결(R1 ~ R5) = 이후 포스팅에서는 라우터 인터페이스 연결은 생략을 할 것이다. 

R1(config)#int s0/0
R1(config-if)#ip add 192.168.12.1 255.255.255.252
R1(config-if)#no sh


R1(config)#int s0/1
R1(config-if)#ip add 192.168.13.1 255.255.255.252
R1(config-if)#no sh

R1(config)#int f0/0
R1(config-if)#ip add 10.10.10.1 255.255.255.0
R1(config-if)#no sh

 

 

2. 라우터 OSPF 설정 (현재 R1에서 ospf 설정 // 다른 라우터 ospf 설정은 생략) 

R1(config)#router ospf 1
R1(config-router)#network 192.168.12.0 0.0.0.3 area 0
R1(config-router)#network 192.168.13.0 0.0.0.3 area 0
R1(config-router)#router-id 1.1.1.1
R1(config-router)#end

 

 

3. R1에서 OSPF 프로세스가 유지하고 있는 여러 유형의 링크 상태를 확인

R1#sh ip ospf database

            OSPF Router with ID (1.1.1.1) (Process ID 1)

                Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         20          0x80000004 0x00E536 4
1.1.1.2         1.1.1.2         423         0x80000002 0x00208A 2
1.1.1.3         1.1.1.3         21          0x80000003 0x002D79 2

 

4. R1에서 라우팅 테이블 확인

R1#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     192.168.12.0/30 is subnetted, 1 subnets
C       192.168.12.0 is directly connected, Serial0/0
     192.168.13.0/30 is subnetted, 1 subnets
C       192.168.13.0 is directly connected, Serial0/1
     192.168.24.0/30 is subnetted, 1 subnets
O IA    192.168.24.0 [110/128] via 192.168.12.2, 00:02:23, Serial0/0
     10.0.0.0/24 is subnetted, 1 subnets
C       10.10.10.0 is directly connected, FastEthernet0/0
     192.168.35.0/30 is subnetted, 1 subnets
O IA    192.168.35.0 [110/128] via 192.168.13.2, 00:00:21, Serial0/1

IA : 192.168.24.0 / 192.168.35.0은 다른 OSPF 영역에서 들어왔다. 라우터 연결이 잘 된 것을 확인할 수 있었다. 

다른 라우터들도 다 연결이 잘 되었다.. 

 

 


Tech 2. Multi Area Loopback 설정(라우터 4, 라우터 5)

OSPF를 응용해보기 위해서 R4, R5번에 Loopback을 설정해보겠다. 

 

#R4 Loopback 인터페이스 연결

R4#conf t
R4(config)#interface loopback 0
R4(config-if)#ip add 172.14.0.1 255.255.255.0

R4(config-if)#interface loopback 1
R4(config-if)#ip add 172.14.1.1 255.255.255.0

R4(config-if)#interface loopback 2
R4(config-if)#ip add 172.14.2.1 255.255.255.0

R4(config-if)#interface loopback 3
R4(config-if)#ip add 172.14.3.1 255.255.255.0

 

#R5 Loopback 인터페이스 연결

R5(config-if)#interface loopback 0
R5(config-if)#ip add 172.16.0.1 255.255.255.0

R5(config-if)#interface loopback 1
R5(config-if)#ip add 172.16.1.1 255.255.255.0

R5(config-if)#interface loopback 2
R5(config-if)#ip add 172.16.2.1 255.255.255.0

R5(config-if)#interface loopback 3
R5(config-if)#ip add 172.16.3.1 255.255.255.0
R5(config-if)#no sh

 

이렇게 라우터 4번과 5번에 루프백 인터페이스 연결을 해주었다. 다음으로 라우팅 프로토콜을 설정해볼 것이다. 여기서 왼쪽에서 루프백 설정을 OSPF 라우팅 프로토콜을 이용해볼 것이다. 오른쪽 루프백 설정은 EIGRP 설정을 하고자 한다.

 

 

# OSPF 라우팅 프로토콜 설정

R4(config)#router ospf 4
R4(config-router)# network 172.14.0.0 0.0.0.255 area 0
R4(config-router)# network 172.14.1.0 0.0.0.255 area 0
R4(config-router)# network 172.14.2.0 0.0.0.255 area 0
R4(config-router)# network 172.14.3.0 0.0.0.255 area 0

 

이후 라우팅 테이블에서 서브넷마스크가 24인데 AD 값이 이상했다. 

R4(config)#interface loopback 0
R4(config-if)#ip ospf network point-to-point
R4(config-if)#interface loopback 1
R4(config-if)#ip ospf network point-to-point
R4(config-if)#interface loopback 2
R4(config-if)#ip ospf network point-to-point
R4(config-if)#interface loopback 3
R4(config-if)#ip ospf network point-to-point

검색을 해보니 루프백 인터페이스는 기본적으로 /32(255.255.255.255) 서브넷 마스크를 가진다. 그러나 Point-to-Point로 설정하면 이 인터페이스가 /32 대신 다른 서브넷 마스크(예: /24)로 인식되도록 설정할 수 있다고 한다. 그래서 설정을 해주었다.

 

 

# Loopback  축약 해보기

현재 왼쪽 라우터들은 OSPF에서 라우팅 프로토콜이 진행되어 있다. ospf에서 경로 요약은 다음과 같다. 

 

- 명령어 구조

area [area-id] range [network] [subnet-mask]

2(config)#router ospf 2
R2(config-router)#area 24 range 172.14.0.0 255.255.252.0

 

이렇게 네트워크 범위를 요약하여 다른 영역에서 광고하도록 설정해주었다. 

 

 

# Loopback OSPF 라우팅 프로토콜 설정 및 축약 결과

R2#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is 192.168.12.1 to network 0.0.0.0

     192.168.12.0/30 is subnetted, 1 subnets
C       192.168.12.0 is directly connected, Serial0/0
     192.168.13.0/30 is subnetted, 1 subnets
O       192.168.13.0 [110/128] via 192.168.12.1, 00:21:45, Serial0/0
     192.168.24.0/30 is subnetted, 1 subnets
C       192.168.24.0 is directly connected, Serial0/2
     172.14.0.0/16 is variably subnetted, 5 subnets, 2 masks
O       172.14.2.0/24 [110/65] via 192.168.24.2, 00:21:45, Serial0/2
O       172.14.3.0/24 [110/65] via 192.168.24.2, 00:21:47, Serial0/2
O       172.14.0.0/24 [110/65] via 192.168.24.2, 00:21:47, Serial0/2
O       172.14.0.0/22 is a summary, 00:21:47, Null0
O       172.14.1.0/24 [110/65] via 192.168.24.2, 00:21:47, Serial0/2
     172.16.0.0/22 is subnetted, 1 subnets

 


 

Tech 3. Multi Area   Loopback 설정 & Eigrp 설정(area 35 대신)

 

#Loopback 설정

R5(config)#interface loopback 0
R5(config-if)#ip add 172.16.0.1 255.255.255.0

R5(config-if)#interface loopback 1
R5(config-if)#ip add 172.16.0.1 255.255.255.0

R5(config-if)#interface loopback 2
R5(config-if)#ip add 172.16.2.1 255.255.255.0

R5(config-if)#interface loopback 3
R5(config-if)#ip add 172.16.3.1 255.255.255.0

 

#EIGRP 설정

R5(config)#router eigrp 35
R5(config-router)#network 172.16.0.0 0.0.0.255
R5(config-router)#network 172.16.1.0 0.0.0.255
R5(config-router)#network 172.16.2.0 0.0.0.255
R5(config-router)#network 172.16.3.0 0.0.0.255

 

우측 Loopback을 라우팅 프로토콜을 해준 결과를 R1에서 라우팅 테이블로 확인

R1#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     192.168.12.0/30 is subnetted, 1 subnets
C       192.168.12.0 is directly connected, Serial0/0
     192.168.13.0/30 is subnetted, 1 subnets
C       192.168.13.0 is directly connected, Serial0/1
     192.168.24.0/30 is subnetted, 1 subnets
O IA    192.168.24.0 [110/128] via 192.168.12.2, 00:44:22, Serial0/0
     172.14.0.0/24 is subnetted, 4 subnets
O IA    172.14.2.0 [110/129] via 192.168.12.2, 00:00:17, Serial0/0
O IA    172.14.3.0 [110/129] via 192.168.12.2, 00:00:07, Serial0/0
O IA    172.14.0.0 [110/129] via 192.168.12.2, 00:00:29, Serial0/0
O IA    172.14.1.0 [110/129] via 192.168.12.2, 00:00:19, Serial0/0
     10.0.0.0/24 is subnetted, 1 subnets
C       10.10.10.0 is directly connected, FastEthernet0/0

 

 

#라우터 3번에서 재분배, Loopback 인터페이스 축약 설정

R3(config)#router eigrp 35
R3(config-router)#network 192.168.35.0 0.0.0.3
R3(config-router)#no auto-summary
R3(config-router)#redistribute ospf 3 metric 1544 2000 255 1 1500


R3(config)#router ospf 3
R3(config-router)#summa
R3(config-router)#summary-address 172.16.0.0 255.255.252.0

 


Tech 4.  디폴트 라우트 설정하지 않고 주소 광고

R1(config)#no ip route 0.0.0.0 0.0.0.0 10.10.10.6
R1(config)#router ospf 1
R1(config-router)#default-information originate always

Tech 5.  모든 설정 확인

#R1에서 라우팅 테이블 확인

R1#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is 10.10.10.6 to network 0.0.0.0

     192.168.12.0/30 is subnetted, 1 subnets
C       192.168.12.0 is directly connected, Serial0/0
     192.168.13.0/30 is subnetted, 1 subnets
C       192.168.13.0 is directly connected, Serial0/1
     192.168.24.0/30 is subnetted, 1 subnets
O IA    192.168.24.0 [110/128] via 192.168.12.2, 01:08:15, Serial0/0
     172.14.0.0/22 is subnetted, 1 subnets
O IA    172.14.0.0 [110/129] via 192.168.12.2, 00:19:11, Serial0/0
     172.16.0.0/22 is subnetted, 1 subnets
O E1    172.16.0.0 [110/164] via 192.168.13.2, 00:11:35, Serial0/1
     10.0.0.0/24 is subnetted, 1 subnets
C       10.10.10.0 is directly connected, FastEthernet0/0
     192.168.35.0/30 is subnetted, 1 subnets
O E1    192.168.35.0 [110/164] via 192.168.13.2, 00:11:38, Serial0/1
S*   0.0.0.0/0 [1/0] via 10.10.10.6
저작자표시 비영리 변경금지

'Network > Network[GNS3, Packet]' 카테고리의 다른 글

[GNS3] OSPF - Virtual Link 실습  (0) 2024.10.19
[Packet] VLAN 실습  (0) 2024.10.16
[OSPF] OSPF 실습 -2  (1) 2024.10.10
[OSPF] OSPF 실습 - 1  (0) 2024.10.10
[EIGRP] - Default Routing  (1) 2024.09.28
'Network/Network[GNS3, Packet]' 카테고리의 다른 글
  • [GNS3] OSPF - Virtual Link 실습
  • [Packet] VLAN 실습
  • [OSPF] OSPF 실습 -2
  • [OSPF] OSPF 실습 - 1
Kouji
Kouji
Journey to Becoming a Data & Server Engineer
  • Kouji
    Kouji's Data & Server Journey
    Kouji
  • 전체
    오늘
    어제
    • 분류 전체보기
      • Programming
        • Python
        • SQL
      • Data & AI
        • Data Analysis
        • Ai
      • Cloud(AWS)
      • OS
        • Linux
        • Docker
        • Jenkins
        • Ubuntu
        • Window
        • Kubernates
        • Ansible
      • Network
        • NVIDIA
        • Network[이론]
        • Network[GNS3, Packet]
        • Network[On-Premise]
        • Network [L2, L3]
      • 트러블 슈팅
      • Life
        • My Career Stories
        • Personal
      • 개발 + OS 지식 함양
  • 블로그 메뉴

    • 홈
    • 관리 페이지
    • 글쓰기
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    웹
    서버
    도커
    OS
    티스토리챌린지
    ubuntu
    네트워크관리사
    시스템엔지니어
    오블완
    인프라
    Linux
    네트워크엔지니어
    VMware
    리눅스
    IT
    알고리즘
    L3
    서버엔지니어
    CISCO
    dns
    화이팅
    네트워크
    스위치
    보안
    인프라엔지니어
    라우팅
    docker
    클라우드엔지니어
    AWS
    네트워크엔지니어링
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
Kouji
[OSPF] Multi-Area(Loopback , EIGRP, 축약, 재분배, 디폴트)
상단으로

티스토리툴바