카테고리 없음

Cisco ACI CLI 설정 방법

IT전문가126 2025. 3. 11. 20:35

Cisco ACI CLI 설정 방법 – 엔지니어 가이드

Cisco ACI(Application Centric Infrastructure)는 네트워크를 정책 중심(Policy-based) 으로 관리할 수 있도록 설계된 SDN 솔루션입니다. GUI (APIC Web UI)를 이용한 설정이 일반적이지만, CLI(Command Line Interface)를 통해 더 정밀한 제어가 가능합니다.

이 문서에서는 Cisco ACI CLI를 사용하여 Fabric 설정, Tenants, EPGs(Endpoint Groups), Contracts, VLAN, Static Path Binding 등을 구성하는 방법을 상세히 설명하겠습니다.


1. Cisco ACI CLI 접속 방법

(1) APIC 컨트롤러에 SSH 접속

APIC 컨트롤러에 SSH로 접속하여 CLI 모드로 진입합니다.

ssh admin@<APIC_IP>
  • admin: 기본 사용자 계정 (변경 가능)
  • <APIC_IP>: APIC 컨트롤러의 IP 주소

2. Fabric 설정 및 노드 등록

(1) 현재 Fabric 상태 확인

Fabric 노드 상태를 확인하려면 아래 명령어를 실행합니다.

show fabric node

출력 예시:

ID   Name      Role       Fabric State  Version  
101  Leaf1     leaf       active        5.2(3)  
102  Spine1    spine      active        5.2(3)  
103  Leaf2     leaf       active        5.2(3)  

(2) Fabric 자동 등록 활성화

ACI는 자동으로 Fabric 노드를 감지할 수 있습니다. 자동 등록이 활성화되어 있는지 확인하려면:

show running-config | include auto-provision

만약 비활성화되어 있다면, 활성화하려면:

apic# conf t
apic(config)# fabric auto-provision enable
apic(config)# commit

(3) 수동으로 Leaf/Spine 노드 추가하기

노드가 자동으로 등록되지 않는 경우, 수동으로 노드를 추가할 수 있습니다.

apic# fabric node add <node_id> <node_name> <role> <serial_number>

예시:

apic# fabric node add 101 Leaf1 leaf ACI10123XYZ
apic# fabric node add 102 Spine1 spine ACI10234XYZ

3. Tenant 생성 및 네트워크 구성

ACI의 핵심 개념은 Tenant (독립적인 네트워크 공간) 입니다.

(1) Tenant 생성

apic# tenant create MyTenant
apic# commit

Tenant가 정상적으로 생성되었는지 확인하려면:

show tenant

(2) VRF (Context) 생성

Tenant 내에서 VRF (Virtual Routing and Forwarding) 을 설정합니다.

apic# tenant MyTenant
apic(tenant)# vrf create MyVRF
apic(tenant-vrf)# commit

(3) Bridge Domain (BD) 생성

Bridge Domain은 L2 네트워크를 정의하는 논리적 개체입니다.

apic# tenant MyTenant
apic(tenant)# bridge-domain create MyBD
apic(tenant-bd)# vrf MyVRF
apic(tenant-bd)# commit

(4) Subnet 추가

Bridge Domain 내에 서브넷을 추가하여 게이트웨이를 설정합니다.

apic(tenant-bd)# subnet add 192.168.1.1/24
apic(tenant-bd)# commit

4. EPG(Endpoint Group) 설정 및 VLAN 바인딩

EPG는 서로 같은 정책을 공유하는 엔드포인트(서버, VM 등)의 그룹입니다.

(1) EPG 생성

apic# tenant MyTenant
apic(tenant)# application-profile create MyApp
apic(tenant-ap)# epg create MyEPG
apic(tenant-ap-epg)# bridge-domain MyBD
apic(tenant-ap-epg)# commit

(2) Static Path Binding 설정 (VLAN 매핑)

Leaf 스위치의 인터페이스와 VLAN을 매핑하려면:

apic(tenant-ap-epg)# static-port binding leaf101 eth1/1 vlan 100
apic(tenant-ap-epg)# commit

이 설정은 Leaf 101의 Eth1/1 포트에 VLAN 100을 바인딩합니다.


5. Contract 설정 (EPG 간 트래픽 제어)

ACI에서 EPG 간의 트래픽은 기본적으로 차단됩니다. Contract를 생성하여 허용할 트래픽을 정의해야 합니다.

(1) Contract 생성

apic# tenant MyTenant
apic(tenant)# contract create MyContract
apic(tenant-contract)# commit

(2) Contract에 필터(ACL) 추가

예를 들어, TCP 80 (HTTP) 트래픽을 허용하는 필터를 만들려면:

apic(tenant)# filter create WebFilter
apic(tenant-filter)# entry create AllowHTTP
apic(tenant-filter-entry)# ether-type ip
apic(tenant-filter-entry)# protocol tcp
apic(tenant-filter-entry)# dst-port 80
apic(tenant-filter-entry)# commit

(3) Contract에 필터 적용

apic(tenant-contract)# subject create WebTraffic
apic(tenant-contract-subject)# filter WebFilter
apic(tenant-contract-subject)# commit

(4) Contract를 EPG에 적용

  • 제공(Provider) EPG에 Contract 적용
    apic(tenant-ap-epg)# contract provide MyContract
    apic(tenant-ap-epg)# commit
    
  • 소비(Consumer) EPG에 Contract 적용
    apic(tenant-ap-epg)# contract consume MyContract
    apic(tenant-ap-epg)# commit
    

6. 설정 확인 및 디버깅

(1) 현재 설정 확인

show tenant MyTenant
show bridge-domain MyBD
show epg MyEPG
show contract MyContract

(2) 트래픽 흐름 확인

show endpoint
show fabric forwarding

(3) 로그 및 이벤트 확인

show logging
show event-history

7. 결론

Cisco ACI CLI를 활용하면 GUI에서 할 수 있는 모든 네트워크 설정을 더욱 세밀하게 제어할 수 있습니다.

Fabric 설정 및 노드 등록
Tenant, VRF, Bridge Domain, Subnet 설정
EPG 생성 및 VLAN 바인딩
Contract 및 필터 설정
CLI 디버깅 및 트래픽 확인

위 명령어들을 잘 활용하면 대규모 네트워크 환경에서도 신속하게 ACI 설정을 자동화 및 최적화할 수 있습니다. 🚀