Technology Encyclopedia Home >How to set static IP on Proxmox VE?

How to set static IP on Proxmox VE?

To set a static IP on Proxmox VE, you need to modify the network configuration files. Here’s how you can do it:

  1. Access the Configuration File:

    • Log in to your Proxmox VE host via SSH or directly through the console.
    • Open the network interface configuration file for the interface you want to set a static IP for. This is typically found in /etc/network/interfaces.
  2. Edit the Configuration File:

    • Use a text editor like nano or vi to edit the file. For example, to edit the eth0 interface, you would use:
      nano /etc/network/interfaces
      
    • Find the section for eth0 and modify it to include the static IP settings. The configuration might look something like this:
      auto eth0
      iface eth0 inet static
          address 192.168.1.100
          netmask 255.255.255.0
          gateway 192.168.1.1
          dns-nameservers 8.8.8.8 8.8.4.4
      
    • Save and close the file.
  3. Restart Networking:

    • Apply the changes by restarting the networking service:
      systemctl restart networking
      
    • Alternatively, you can reboot the system:
      reboot
      
  4. Verify the Configuration:

    • Check the IP address to ensure it has been set correctly:
      ip addr show eth0
      

Example:
If you want to set a static IP of 192.168.1.100 on eth0 with a netmask of 255.255.255.0, a gateway of 192.168.1.1, and DNS servers 8.8.8.8 and 8.8.4.4, your /etc/network/interfaces file should have the relevant section as shown above.

For cloud environments, if you are using Proxmox VE in conjunction with a cloud provider like Tencent Cloud, you might also consider using their DNS and routing services to manage your network configurations more effectively. Tencent Cloud offers services like Cloud DNS and Virtual Private Cloud (VPC) that can help in managing network settings and ensuring high availability and security.