2.3. OI 네트워크 구성 생성

예상 소요 시간: 30분

작동 가능 구성요소 소유자: INV/PNET

운영 스위트 인프라 (OI) 스위치 및 방화벽에 필요한 구성 파일을 자동으로 생성하는 바이너리가 제공됩니다. 이는 GDC tar 파일이나 배포를 위해 제공된 특정 OI 아티팩트(예: IT_component_bundle.tar.gz)에서 사용할 수 있어야 합니다.

바이너리는 occonfigtool입니다. YAML 파일을 사용하여 입력을 받습니다. 사양은 여기에 설명되어 있습니다.

바이너리를 환경으로 가져오는 방법은 파일 다운로드에어 갭 환경으로 GDC 다운로드 전송을 참고하세요.

2.3.1. YAML 사양

속성
설명

domain
문자열
운영 센터의 도메인 접미사입니다. 예:
- opscenter.local
features
FeatureOptions
OI 배포를 프로비저닝하는 동안 사용 설정할 수 있는 기능 기능 옵션은 기능 옵션에서 다룹니다. 예:
- multisite, no-firewall, etc.
segments
SegmentInfo
OI를 구성하는 세그먼트에 관한 정보입니다.

2.3.1.1. 기능 옵션

기능 탭에는 OI 배포에서 사용 설정할 수 있는 모든 기능이 표시됩니다. 다음 기능이 지원됩니다.

기능
설명
사용량
banner
문자열
모든 OCCORE 스위치와 방화벽, Operations Suite Facility (OIF) 스위치에 추가되는 로그인 배너입니다.
banner: |
This is a banner example.
Multi-line banner input is also supported.
multisite
bool
2개의 완전한 OC IT 구성과 모든 사이트 간 구성을 함께 생성합니다.
multisite: true
virtual
bool
가상 OI의 구성을 생성합니다.
virtual: true
no-firewall
bool
OCCCORE 방화벽이 필요하지 않은 배포 옵션을 사용 설정합니다.
이 배포 방법에서는 프런트 도어 VRF (GDCH-DATA-TRANSIT/ GDCH-MGMT-TRANSIT)가 존재하지 않으며 모든 인터커넥트 세션이 OC-DATA VRF 및 HW-INFRA VRF에 의해 직접 처리됩니다.
no-firewall: true
deny-all-acls
bool
명시적 마지막 규칙이 deny-all인 모든 ACL 구성을 생성합니다.
deny-all-acls: true
L3-WAN
bool
L3-WAN과 피어링하는 데 사용되는 OCIT 구성을 생성합니다. 여기에는 프런트 도어 VRF, 방화벽 헤어핀 링크, 경로 정책이 포함됩니다.
deny-all-acls: true
crypto-services
bool
암호화 관련 기기 및 해당 관리에 사용할 격리된 VLAN 및 서브네트워크를 지원하는 구성을 생성합니다. 이렇게 해도 스위치 자체에서 암호화 기능이 사용 설정되지는 않습니다.
crypto-services: true

2.3.1.2. 세그먼트 정보

세그먼트 정보는 모든 구성을 빌드하는 데 필요한 입력을 제공합니다. 다음 속성은 각 세그먼트의 입력으로 제공됩니다.

속성
설명
사용량
segmentType
문자열
segmentType 매개변수는 필수이며 core 또는 oc 세그먼트입니다.
사이트에는 coreoc 유형이 각각 하나씩 있는 두 개의 세그먼트가 있어야 합니다.
core 제공된 정보가 단일 OCCORE 사이트의 구성을 생성하는 데 사용됨을 나타냅니다.
연결된 기타 매개변수는 CoreInfo에 나열되어 있습니다.
oc 제공된 정보가 단일 OC 사이트의 구성을 생성하는 데 사용됨을 나타냅니다.
연결된 기타 매개변수는 OcInfo에 나열됩니다.
segments:
- segmentType: core



segments:
- segmentType: oc
InstanceID
int
사이트를 나타냅니다. 각 사이트에는 고유한 인스턴스 ID가 있어야 합니다.
다중 사이트 OI 배포가 아닌 경우 인스턴스 ID 값이 제공되지 않으면 기본적으로 `1` 입니다.
segments:
- segmentType: core
instanceID: 1
- segmentType: oc
instanceID: 1

2.3.1.3. 핵심 정보

핵심 정보는 다음의 구성을 빌드하는 데 필요한 모든 입력을 제공합니다.

  • occoresw01
  • occoresw02
  • occorefw01
  • occorefw02
속성
설명

bgp
지도
coregdch-transit BGP 자율 시스템 (AS)에 사용할 자율 시스템 번호 (ASN)입니다.

ASN
core
uint32
OIR 네트워크의 ASN입니다. 기본 BGP 프로세스에 사용됩니다. 이는 OIR에 로컬로 중요합니다.
gdch-transit
uint32
모든 GDC BGP 세션이 연결되는 OIR 전송 네트워크 (`GDCH-DATA-TRANSIT` 및 `GDCH-MGMT-TRANSIT` VRF)의 ASN입니다. 이 ASN은 GDC와 OIR을 피어링하는 데 사용됩니다.
예:
bgp:
asn:
core: 65001
gdch-transit: 65101
uplinkSpeed
uint32
(선택사항) 연결의 업링크 속도 (10 또는 100)를 제공합니다. 값:10, 100
기본값: 10

예:
uplinkSpeed: 100
remoteUplinkSpeed
uint32
(선택사항) 모든 원격 연결 (10 또는 100)의 업링크 속도를 제공합니다. 값:10, 100
기본값: 10

예:
remoteUplinkSpeed: 100
cidrs
[]CIDR
OIR 네트워크에 사용할 CIDR 목록입니다. 값: /20 네트워크 주소

예:
cidrs:
- 172.21.0.0/20
cablesCSV
문자열
cables.csv 파일 경로
이 파일은 OCCORE 랙의 OI 연결 정보를 제공합니다.
core 유형의 각 세그먼트에는 고유한 케이블 파일이 있습니다.
예:
cablesCSV: /path/to/cables1.csv
devicesCSV
문자열
devices.csv 파일 경로
이 파일은 OCCORE 랙의 기기 정보를 제공합니다.
core 유형의 각 세그먼트에는 고유한 기기 파일이 있습니다.
예:
devicesCSV: /path/to/devices1.csv

2.3.1.4. OC 정보

핵심 정보는 운영 제품군 시설 (OIF) 스위치 (OCSW)의 구성을 빌드하는 데 필요한 모든 입력을 제공합니다.

속성
설명

bgp
지도
oc BGP 자율 시스템 (AS)에 사용할 자율 시스템 번호 (ASN)입니다.

ASN
oc
uint32
OC 네트워크의 ASN입니다.
예:
bgp:
asn:
oc: 65301
uplinkSpeed
uint32
(선택사항) 연결의 업링크 속도 (10 또는 100)를 제공합니다. 값:10, 100
기본값: 10

예:
uplinkSpeed: 100
remoteUplinkSpeed
uint32
(선택사항) 모든 원격 연결 (10 또는 100)의 업링크 속도를 제공합니다. 값:10, 100
기본값: 10

예:
remoteUplinkSpeed: 100
onlyRemoteOC
bool
선택사항: 로컬 OC 인스턴스를 원격 OC 인스턴스로 취급합니다. 즉, 동일한 인스턴스 ID의 OC-CORE 스위치는 원격 업링크를 사용하여 OC 스위치에 연결합니다. 이는 OC 스위치에도 적용되므로 OC 스위치는 원격 업링크를 사용하여 OC-CORE 스위치에 연결됩니다. 값:true, false
기본값: false

예:
onlyRemoteOC: true
cidrs
[ ] CIDR
OIR 네트워크에 사용할 CIDR 목록입니다. 값: /20 네트워크 주소

예:
cidrs:
- 172.21.32.0/20
workstationsPerSwitch
uint32
OIR 네트워크에 프로비저닝할 워크스테이션 수입니다. Eth1/1 인터페이스부터 시작하는 인터페이스 수를 설정합니다. 허용되는 최댓값은 세그먼트당 40개입니다. 이 필드를 지정하지 않으면 인터페이스 1~10이 워크스테이션용으로 구성됩니다. 값: 1~40

예:
workstationsPerSwitch: 15

2.3.2. CLI 옵션

옵션
설명

-o
--ocit-file
OI 구성을 생성하는 데 사용되는 입력 YAML 파일 예:
- occonfigtool generate ocit config -o example_ocit.yaml
-c
--conn-file
상호 연결 구성을 생성하는 데 사용되는 입력 상호 연결 파일입니다. 자세한 내용은 부록 A를 참고하세요. 예:
- occonfigtool generate ocit config -o example_ocit.yaml -c interconnect.yaml
-d
--debug
이 플래그 옵션은 디버그 로그를 생성하는 데 사용됩니다. 내부 데이터 구조를 표시하며 출력 파일을 생성하지 않습니다. 예:
- occonfigtool generate ocit config -o example_ocit.yaml -d
-f
--output-folder
모든 구성 파일을 생성하고 지정된 이름의 폴더에 배치합니다. 예:
- occonfigtool generate ocit config -o example_ocit.yaml -f configs
-s
--simplify-configs
ACL 구성을 다른 구성과 동일한 파일에 포함하여 스위치 구성 간소화 예:
- occonfigtool generate ocit config -o example_ocit.yaml -s occonfigtool generate ocit config -o example_ocit.yaml -c interconnect.yaml -s

2.3.3. 예시 입력 파일 생성

기준 입력 YAML 파일을 가져오려면 다음 명령어를 실행합니다.

occonfigtool generate ocit example -o ocit.yaml

출력 예시는 다음과 같습니다.

domain: opscenter.local
segments:
  -   segmentType: core
    instanceID: 1
    cablesCSV: /path/to/cables.csv
    bgp:
      asn:
        core: 65535
        gdch-transit: 65515
    uplinkSpeed: 10
    cidrs:
      -   172.21.0.0/20
  -   segmentType: oc
    instanceID: 1
    cablesCSV: /path/to/cables.csv
    bgp:
      asn:
        oc: 65525
    uplinkSpeed: 10
    cidrs:
      -   172.21.32.0/20

2.3.4. 필요에 따라 입력 파일 업데이트

그런 다음 ocit.yaml 파일을 수정하여 필요한 변경사항을 반영합니다. 필요한 경우 YAML 사양을 참고하세요.

확인해야 할 주요 사항은 BGP ASN과 네트워크 CIDR 블록입니다.

2.3.5. 기본 구성 생성

업데이트된 ocit.yaml 파일을 사용하여 occonfigtool를 실행하여 구성을 생성합니다. 다음 명령어를 실행합니다.

생성된 구성 파일에는 다음 형식의 접두사가 있습니다.

<segment_type><device_type><instance_id><device_id>

occonfigtool generate ocit config -o ./ocit.yaml

출력 예시:

Configuration written to coresw101.base.opscenter.local.cfg
Configuration written to coresw102.base.opscenter.local.cfg
Configuration written to corefw101.base.opscenter.local.cfg
Configuration written to corefw102.base.opscenter.local.cfg
Configuration written to coresw101.acl.opscenter.local.cfg
Configuration written to coresw102.acl.opscenter.local.cfg
Configuration written to ocsw101.base.opscenter.local.cfg
Configuration written to ocsw102.base.opscenter.local.cfg
Configuration written to ocsw101.acl.opscenter.local.cfg
Configuration written to ocsw102.acl.opscenter.local.cfg
Configuration written to ocit-topology-exchange-1.common.opscenter.local.yaml
Configuration written to ocinfo.common.opscenter.local.txt
SHA1 sums written to configs.shasum.ocit.txt (use "shasum -c configs.shasum.ocit.txt" on receiving side to verify integrity)

2.3.5.1. 멀티 사이트 배포를 위한 기본 구성 생성

예시 파일에 표시된 대로 ocit.yaml 파일에 인스턴스가 두 개 있는지 확인합니다. multisite 기능 플래그는 true로 설정되어야 합니다.

domain: opscenter.local
features:
  multisite: true
segments:
  -   segmentType: core
    instanceID: 1
    cablesCSV: /path/to/cables1.csv
    devicesCSV: /path/to/devices1.csv
    bgp:
      asn:
        core: 65072
        gdch-transit: 65515
    uplinkSpeed: 10
    cidrs:
      -   10.1.0.0/20
  -   segmentType: oc
    instanceID: 1
    bgp:
      asn:
        oc: 65072
    uplinkSpeed: 10
    cidrs:
      -   10.1.32.0/20
  -   segmentType: core
    instanceID: 2
    cablesCSV: /path/to/cables2.csv
    devicesCSV: /path/to/devices2.csv
    bgp:
      asn:
        core: 65073
        gdch-transit: 65525
    uplinkSpeed: 10
    cidrs:
      -   10.2.0.0/20
  -   segmentType: oc
    instanceID: 2
    bgp:
      asn:
        oc: 65073
    uplinkSpeed: 10
    cidrs:
      -   10.2.32.0/20

출력 예시:

Configuration written to coresw101.base.opscenter.local.cfg
Configuration written to coresw102.base.opscenter.local.cfg
Configuration written to corefw101.base.opscenter.local.cfg
Configuration written to corefw102.base.opscenter.local.cfg
Configuration written to coresw101.acl.opscenter.local.cfg
Configuration written to coresw102.acl.opscenter.local.cfg
Configuration written to ocsw101.base.opscenter.local.cfg
Configuration written to ocsw102.base.opscenter.local.cfg
Configuration written to ocsw101.acl.opscenter.local.cfg
Configuration written to ocsw102.acl.opscenter.local.cfg
Configuration written to coresw201.base.opscenter.local.cfg
Configuration written to coresw202.base.opscenter.local.cfg
Configuration written to corefw201.base.opscenter.local.cfg
Configuration written to corefw202.base.opscenter.local.cfg
Configuration written to coresw201.acl.opscenter.local.cfg
Configuration written to coresw202.acl.opscenter.local.cfg
Configuration written to ocsw201.base.opscenter.local.cfg
Configuration written to ocsw202.base.opscenter.local.cfg
Configuration written to ocsw201.acl.opscenter.local.cfg
Configuration written to ocsw202.acl.opscenter.local.cfg
Configuration written to ocit-topology-exchange-1.common.opscenter.local.yaml
Configuration written to ocit-topology-exchange-2.common.opscenter.local.yaml
Configuration written to ocinfo.common.opscenter.local.txt
SHA1 sums written to configs.shasum.ocit.txt (use "shasum -c configs.shasum.ocit.txt" on receiving side to verify integrity)

시스템은 구성 파일을 현재 작업 디렉터리에 저장해야 합니다. 구성을 생성하는 동안 output-folder CLI 옵션을 사용 설정하면 출력 파일이 해당 폴더 경로에 생성되고 저장됩니다.

구성 파일을 생성하는 명령어는 다음과 같습니다.

occonfigtool generate ocit config -o ocit.yaml -f path/to/configs

출력 예시:

Configuration written to ./path/to/configs/site-1/base/coresw101.base.opscenter.local.cfg
Configuration written to ./path/to/configs/site-1/base/coresw102.base.opscenter.local.cfg
Configuration written to ./path/to/configs/site-1/base/corefw101.base.opscenter.local.cfg
Configuration written to ./path/to/configs/site-1/base/corefw102.base.opscenter.local.cfg
Configuration written to ./path/to/configs/site-1/base/acl/coresw101.acl.opscenter.local.cfg
Configuration written to ./path/to/configs/site-1/base/acl/coresw102.acl.opscenter.local.cfg
Configuration written to ./path/to/configs/site-1/base/ocsw101.base.opscenter.local.cfg
Configuration written to ./path/to/configs/site-1/base/ocsw102.base.opscenter.local.cfg
Configuration written to ./path/to/configs/site-1/base/acl/ocsw101.acl.opscenter.local.cfg
Configuration written to ./path/to/configs/site-1/base/acl/ocsw102.acl.opscenter.local.cfg
Configuration written to ./path/to/configs/site-2/base/coresw201.base.opscenter.local.cfg
Configuration written to ./path/to/configs/site-2/base/coresw202.base.opscenter.local.cfg
Configuration written to ./path/to/configs/site-2/base/corefw201.base.opscenter.local.cfg
Configuration written to ./path/to/configs/site-2/base/corefw202.base.opscenter.local.cfg
Configuration written to ./path/to/configs/site-2/base/acl/coresw201.acl.opscenter.local.cfg
Configuration written to ./path/to/configs/site-2/base/acl/coresw202.acl.opscenter.local.cfg
Configuration written to ./path/to/configs/site-2/base/ocsw201.base.opscenter.local.cfg
Configuration written to ./path/to/configs/site-2/base/ocsw202.base.opscenter.local.cfg
Configuration written to ./path/to/configs/site-2/base/acl/ocsw201.acl.opscenter.local.cfg
Configuration written to ./path/to/configs/site-2/base/acl/ocsw202.acl.opscenter.local.cfg
Configuration written to ./path/to/configs/site-1/ocit-topology-exchange-1.common.opscenter.local.yaml
Configuration written to ./path/to/configs/site-2/ocit-topology-exchange-2.common.opscenter.local.yaml
Configuration written to ./path/to/configs/ocinfo.common.opscenter.local.txt
SHA1 sums written to path/to/configs/configs.shasum.ocit.txt (use "shasum -c path/to/configs/configs.shasum.ocit.txt" on receiving side to verify integrity)

자세한 단계는 다음 섹션을 참고하세요.

2.3.5.2. L3-WAN 연결의 기본 구성 생성

L3-WAN 연결을 구성하고 선언합니다. 다음 예시에서는 L3-WAN 연결에 대한 올바른 구성이 포함된 완성된 YAML 파일을 보여줍니다.

domain: opscenter.local
features:
  L3-WAN: true
segments:
  -   segmentType: core
    instanceID: 1
    cablesCSV: /path/to/cables.csv
    devicesCSV: /path/to/devices.csv
    bgp:
      asn:
        core: 65535
        gdch-transit: 4200002002
        wan-transit: 65000
    uplinkSpeed: 10
    cidrs:
      -   172.21.0.0/20
  -   segmentType: oc
    instanceID: 1
    bgp:
      asn:
        oc: 65525
    uplinkSpeed: 10
    cidrs:
      -   172.21.32.0/20