Red Hat Training

A Red Hat training course is available for Red Hat Virtualization

14.7.2.3. 네트워크 인터페이스 네트워크 파일

14.7.2.3.1. 네트워크 인터페이스 네트워크 파일
호스트의 각 네트워크 인터페이스는 네트워크 인터페이스 카드의 네트워크 연결을 나타내는 network_attachments 하위 수집을 노출합니다. 각 network_attachment 는 네트워크 인터페이스에 연결된 네트워크를 나타내며 다음 요소를 포함합니다.

표 14.6. 호스트 네트워크 인터페이스의 네트워크 연결 요소

요소
유형
설명
속성
네트워크 ID=
GUID
인터페이스가 연결된 네트워크에 대한 참조입니다.
host_nic id=
GUID
호스트 네트워크 인터페이스에 대한 참조입니다.
ip_address_assignments
complex
네트워크의 IP 구성입니다. 각 ip_address_assignment 에는 assignment_methodip address= 넷마스크= gateway= sub-elements가 포함되어 있습니다.
 
속성
complex
네트워크의 사용자 지정 속성 키를 정의합니다. 각 속성에namevalue 하위 요소가 포함되어 있습니다.
 
reported_configurations
complex
네트워크 연결의 구성 속성 읽기 전용 목록입니다. 네트워크 연결에 커밋되지 않은 네트워크 구성이 포함된 경우 in_sync 부울이 false 입니다. 각 reported_configuration 에는 name,expected_value,actual_value, in_sync 하위 요소가 포함되어 있습니다.

예 14.16. 네트워크 인터페이스 카드의 네트워크 연결의 XML 표현

<network_attachment href="/ovirt-engine/api/hosts/00000000-0000-0000-0000-000000000000/nics/00000000-0000-0000-0000-000000000000/networkattachments/00000000-0000-0000-0000-000000000000" id="00000000-0000-0000-0000-000000000000">
    <network href="/ovirt-engine/api/networks/00000000-0000-0000-0000-000000000009" id="00000000-0000-0000-0000-000000000009"/>
    <host_nic href="/ovirt-engine/api/hosts/00000000-0000-0000-0000-000000000000/nics/00000000-0000-0000-0000-000000000000" id="00000000-0000-0000-0000-000000000000"/>
    <ip_address_assignments>
        <ip_address_assignment>
            <ip address="XX.XX.XX.XX" netmask="255.255.255.0" gateway="XX.XX.XX.XX"/>
            <assignment_method>static</assignment_method>
        </ip_address_assignment>
    </ip_address_assignments>
    <reported_configurations>
        <in_sync>true</in_sync>
        <reported_configuration>
            <name>mtu</name>
            <expected_value>1500</expected_value>
            <actual_value>1500</actual_value>
            <in_sync>true</in_sync>
        </reported_configuration>
        <reported_configuration>
            <name>bridged</name>
            <expected_value>true</expected_value>
            <actual_value>true</actual_value>
            <in_sync>true</in_sync>
        </reported_configuration>
        <reported_configuration>
            <name>vlan</name>
            <in_sync>true</in_sync>
        </reported_configuration>
        <reported_configuration>
            <name>boot_protocol</name>
            <expected_value>DHCP</expected_value>
            <actual_value>DHCP</actual_value>
            <in_sync>true</in_sync>
        </reported_configuration>
    </reported_configurations>
</network_attachment>
네트워크를 네트워크 인터페이스 카드에 연결할 때 ID 또는 이름이 있는 네트워크 요소가 필요합니다.

예 14.17. 호스트 네트워크 인터페이스 카드에 네트워크 연결

POST /ovirt-engine/api/hosts/00000000-0000-0000-0000-000000000000/nics/00000000-0000-0000-0000-000000000000/networkattachments HTTP/1.1
Accept: application/xml
Content-type: application/xml

<networkattachment>
    <network id="00000000-0000-0000-0000-000000000000"/>
</networkattachment>
ip_address_assignmentsproperties 요소는 updatable post-creation입니다.

예 14.18. 네트워크 연결 수정

PUT /ovirt-engine/api/hosts/00000000-0000-0000-0000-000000000000/nics/00000000-0000-0000-0000-000000000000/networkattachments/00000000-0000-0000-0000-000000000000 HTTP/1.1
Accept: application/xml
Content-type: application/xml

<networkattachment>
    <ip_address_assignments>
        <ip_address_assignment> 
            <ip address="XX.XX.XX.XX" netmask="255.255.255.0" gateway="XX.XX.XX.XX"/>
	    <assignment_method>static</assignment_method>
	</ip_address_assignment>
    </ip_address_assignments>
</networkattachment>
네트워크 연결에서 DELETE 요청이 있는 네트워크 인터페이스 카드에서 네트워크를 분리합니다.

예 14.19. 호스트 네트워크 인터페이스 카드에서 네트워크 분리

DELETE /ovirt-engine/api/hosts/00000000-0000-0000-0000-000000000000/nics/00000000-0000-0000-0000-000000000000/networkattachments/00000000-0000-0000-0000-000000000000 HTTP/1.1
Accept: application/xml
Content-type: application/xml

HTTP/1.1 204 No Content
중요
네트워크 연결 구성 변경 사항을 명시적으로 커밋해야 합니다. 14.8.8절. “호스트 네트워크 구성 작업 커밋”을 참조하십시오.