Linux Commands - Deathraymind/HomeLab GitHub Wiki
Proxmox Network Configuration Guide
This guide covers the steps to configure network settings in Proxmox using either DHCP or a static IP address.
DHCP Configuration
1. Identify Your Network Interface
-
Default network interface in Proxmox is often named
ens18
. -
Run
ip a
to check available network interfaces.ip a
2. Edit Network Configuration
-
Open the network configuration file:
sudo nano /etc/netplan/01-netcfg.yml
-
Update the file with the following YAML configuration:
network: version: 2 ethernets: ens18: dhcp4: true
- Ensure correct indentation and specify your network interface (e.g.,
ens18
). - Set
dhcp4
totrue
to enable DHCP.
- Ensure correct indentation and specify your network interface (e.g.,
3. Save and Apply Configuration
-
Save the changes (Ctrl + X, Y, Enter).
-
Apply the configuration:
sudo netplan apply
Static IP Configuration
1. Identify Your Network Interface
-
Typically
ens18
in Proxmox. -
Confirm by running
ip a
.ip a
2. Edit Network Configuration
-
Open the configuration file:
sudo nano /etc/netplan/01-netcfg.yml
-
Configure a static IP address:
network: version: 2 renderer: networkd ethernets: ens18: dhcp4: no addresses: - 172.16.16.16/16 # Desired static IP and subnet gateway4: 172.16.0.1 # Actual gateway address nameservers: addresses: - 172.16.0.1 # DNS server(s) - 8.8.8.8 # DNS server(s)
- Correctly indent and specify your network interface (
ens18
). - Replace IP and DNS addresses as necessary.
- Correctly indent and specify your network interface (
3. Save and Apply Configuration
-
Save the changes (Ctrl + X, Y, Enter).
-
Apply the static IP configuration:
sudo netplan apply
Explanation
DHCP Configuration Process
- Identify Network Interface: Usually
ens18
. - Open Network Configuration: Edit with
nano
. - Edit Configuration File: Modify to enable DHCP.
- Save and Apply: Use Ctrl + X, Y, Enter, then
sudo netplan apply
.
Static IP Configuration Process
- Identify Network Interface: Typically
ens18
. - Open Network Configuration: Edit with
nano
. - Edit Configuration File: Set up a static IP.
- Save and Apply: Save and run
sudo netplan apply
.