KVM의 NAT를 생성 하고 삭제
Rocky 9.4 Minimal
가상 머신이 외부 네트워크와 통신할 수 있도록 하는 네트워크 설정 방식
가상 머신이 호스트 시스템의 네트워크 연결을 공유하여 인터넷에 접근할 수 있음
IP 주소 공유
– 가상 머신은 호스트 시스템의 IP 주소를 공유
– 외부 네트워크에서는 가상 머신이 호스트 시스템의 IP 주소를 통해 통신하는 것처럼 보임
보안 강화
– 가상 머신은 외부 네트워크에 직접 노출되지 않음
간편한 설정
– NAT 설정은 비교적 간단하며, 많은 경우 기본 설정으로도 충분히 작동
# virsh net-list –all
Name State Autostart Persistent
--------------------------------------------
default active yes yes
# cat << EOL >> seuheu-net.xml
<network>
<name>seuheu-net</name>
<forward mode=’nat’/>
<bridge name=’virbr1′ stp=’on’ delay=’0’/>
<ip address=’192.168.100.254′ netmask=’255.255.255.0′>
<dhcp>
<range start=’192.168.100.1′ end=’192.168.100.253’/>
</dhcp>
</ip>
</network>
EOL
<network>
- 네트워크 정의의 시작과 끝을 나타냅니다.
<name>seuheu-net</name>
- 네트워크 이름을 지정
- virsh 명령어를 사용할 때 네트워크를 식벽하는 데 사용
<forward mode='nat'/>
- NAT 모드를 사용
<bridge name='virbr1' stp='on' delay='0'/>
- 네트워크 브리지를 virbr1로 설정
- 가상 네트워크 인터페이스를 생성
- STP(Spanning Tree Protocol)를 활성화하여 네트워크 루프를 방지
- 초기 지연 시간을 0으로 설정
<ip address='192.168.100.254' netmask='255.255.255.0'>
- 네트워크 브리지의 IP 주소를 192.168.100.254로 설정
- 서브넷 마스크를 255.255.255.0으로 지정
<dhcp>
- DHCP(Dynamic Host Configuration Protocol) 설정을 정의
- 가상 머신에 IP 주소를 자동으로 할당할 수 있음
<range start='192.168.100.1' end='192.168.100.253'/>
- DHCP 서버가 할당할 수 있는 IP 주소 범위를 192.168.100.1부터 192.168.100.253까지로 설정
- 이 범위 내에서 가상 머신에 IP 주소를 할당
# virsh net-define seuheu-net.xml
Network mynatnetwork defined from seuheu-net.xml
# virsh net-list –all
Name State Autostart Persistent
-------------------------------------------------
default active yes yes
seuheu-net inactive no yes
# virsh net-start seuheu-net
Network seuheu-net started
# virsh net-autostart seuheu-net
Network seuheu-net marked as autostarted
# virsh net-list –all
Name State Autostart Persistent
-----------------------------------------------
default active yes yes
seuheu-net active yes yes
# virsh net-autostart seuheu-net –disable
Network seuheu-net unmarked as autostarted
# virsh net-list –all
Name State Autostart Persistent
-----------------------------------------------
default active yes yes
seuheu-net active no yes
# virsh net-destroy seuheu-net
Network seuheu-net destroyed
# virsh net-list –all
Name State Autostart Persistent
-------------------------------------------------
default active yes yes
seuheu-net inactive no yes
# virsh net-undefine seuheu-net
Network seuheu-net has been undefined
# virsh net-list –all
Name State Autostart Persistent
--------------------------------------------
default active yes yes
1. 개요 Rocky Linux는 엔터프라이즈 환경에서 사용되는 RHEL(Red Hat Enterprise Linux)과 완전히 호환되는 오픈소스 Linux…
https://youtu.be/XwG4jBWakzQ 1. 개요 Supermicro IPMIView는 Supermicro에서 제공하는 IPMI (Intelligent Platform Management Interface) 기반의 통합 관리…
1. 개요 이 문서는 두 개의 NIC (enp5s0f0, enp5s0f1)를 bonding(active-backup) 방식으로 구성하고, 해당 bond 장치를 브리지(br0) 와 연결하여 KVM 가상머신에서…
1. 개요 KVM에서 NVIDIA GPU를 Passthrough 설정하여 VM에 할당할 때 RmInitAdapter failed 오류를 자주 접하게…
1. 개요 Proxmox에서 pGPU(Physical GPU)와 vGPU(Virtual GPU)를 동일한 서버에서 동시에 사용하는 방법을 정리합니다. 2. 버전…
1. 개요 Proxmox에서 vGPU를 설정하는 방법을 정리합니다. 2. 버전 Proxmox 8.2 3. vGPU란? vGPU(Virtual GPU)는…
댓글 보기