- LINUX

[Rocky] nmcli 고정 IP 설정






1. 버전

– Rocky-9.2







2. 설명





2-1. nmcli 란?

NetworkManager와 상호 작용할 수 있도록 하는 명령어 도구입니다.







3. nmcli





3-1. 네트워크 디바이스 확인

# nmcli device

DEVICE  TYPE      STATE                   CONNECTION
ens32   ethernet  connected               ens32
lo      loopback  connected (externally)  lo




3-2. 고정 IP 설정

# nmcli connection modify ens32 ipv4.addresses 192.168.204.221/24
# nmcli connection modify ens32 ipv4.gateway 192.168.204.254
# nmcli connection modify ens32 ipv4.dns 168.126.63.1
# nmcli connection modify ens32 ipv4.method manual
# nmcli connection up ens32




3-3. 고정 IP 설정 확인

# nmcli connection show ens32 | grep ipv4

ipv4.method:                            manual
ipv4.dns:                               168.126.63.1
ipv4.addresses:                         192.168.204.221/24
ipv4.gateway:                           192.168.204.254


# ifconfig

ens32: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.204.221  netmask 255.255.255.0  broadcast 192.168.204.255
        inet6 fe80::250:56ff:fead:14b0  prefixlen 64  scopeid 0x20<link>
        ether 00:50:56:ad:14:b0  txqueuelen 1000  (Ethernet)
        RX packets 3120  bytes 208890 (203.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 167  bytes 27215 (26.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 72  bytes 6120 (5.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 72  bytes 6120 (5.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


# ping google.com

64 bytes from kix06s11-in-f14.1e100.net (142.250.207.110): icmp_seq=1 ttl=55 time=77.0 ms
64 bytes from kix06s11-in-f14.1e100.net (142.250.207.110): icmp_seq=2 ttl=55 time=77.1 ms
64 bytes from kix06s11-in-f14.1e100.net (142.250.207.110): icmp_seq=3 ttl=55 time=77.1 ms



seuheu

최근 게시물

[Linux] Rocky Linux란 무엇인가?

1. 개요 Rocky Linux는 엔터프라이즈 환경에서 사용되는 RHEL(Red Hat Enterprise Linux)과 완전히 호환되는 오픈소스 Linux…

%일 전

[Hardware] Supermicro IPMIView 설치 및 사용법

https://youtu.be/XwG4jBWakzQ 1. 개요 Supermicro IPMIView는 Supermicro에서 제공하는 IPMI (Intelligent Platform Management Interface) 기반의 통합 관리…

%일 전

[Rocky 8.10] KVM NIC Bonding + Bridge 구성하기

1. 개요 이 문서는 두 개의 NIC (enp5s0f0, enp5s0f1)를 bonding(active-backup) 방식으로 구성하고, 해당 bond 장치를 브리지(br0) 와 연결하여 KVM 가상머신에서…

%일 전

[Rocky] KVM에서 NVIDIA GPU Passthrough 시 RmInitAdapter failed 오류 해결하기

1. 개요 KVM에서 NVIDIA GPU를 Passthrough 설정하여 VM에 할당할 때 RmInitAdapter failed 오류를 자주 접하게…

%일 전

[Proxmox] pGPU와 vGPU 동시 사용 설정

1. 개요 Proxmox에서 pGPU(Physical GPU)와 vGPU(Virtual GPU)를 동일한 서버에서 동시에 사용하는 방법을 정리합니다. 2. 버전…

%일 전

[Proxmox] vGPU 설정

1. 개요 Proxmox에서 vGPU를 설정하는 방법을 정리합니다. 2. 버전 Proxmox 8.2 3. vGPU란? vGPU(Virtual GPU)는…

%일 전