---
title: Return a Vultr Server to the Default DHCP Configuration
url: https://docs.vultr.com/configure-a-vultr-server-to-use-dhcp-for-dynamic-ip
description: Learn how to reset your Vultr server back to its default DHCP configuration with our step-by-step guide for both Linux and Windows operating systems.
publish_date: 2022-03-25T00:00:00Z
last_updated: 2025-04-01T00:00:00Z
header_image: https://docs.vultr.com/public/doc-assets/961/632a77fa8f357a13.png
---

> Index of every Vultr Docs page in markdown: https://docs.vultr.com/llms.txt

## Introduction

When you deploy a Vultr virtual cloud server, it receives an IP address assignment automatically with DHCP. Usually, you do not need to change the network settings. However, if you are [configuring BGP](https://docs.vultr.com/configuring-bgp-on-vultr) or [private networks](https://docs.vultr.com/how-to-create-a-vultr-virtual-private-cloud-vpc), you may need to set a static IP address for your server.

When you restore a server backup that used a static IP, it must be reset to DHCP to receive a working IP address. If you need to reset the network after restoring a snapshot, follow this guide which explains how to return a Vultr server to the default DHCP configuration.

## Getting Started

Before proceeding, follow these steps to locate your server's network adapter name.

1. Log in through the Vultr Web Console as root.
1. Follow these steps to find your network adapter name.
1. Make a note of your adapter name and follow the instructions for your OS.

## CentOS 7

List your network configuration files. If your adapter name is `eth0`, you'll see:

    # ls /etc/sysconfig/network-scripts/ifcfg-*

    ifcfg-eth0   ifcfg-lo

You may see other adapter names if you previously deployed this server on a different Vultr host. If you have configuration files that do not match your current adapter names, it's a good practice to move them to a backup location.

Edit or create a new configuration file named `ifcfg-{your adapter name}`.

    # nano /etc/sysconfig/network-scripts/ifcfg-eth0

Replace any existing content with the following. Replace `eth0` with your adapter name.

    DEVICE="eth0"
    BOOTPROTO="dhcp"
    ONBOOT="yes"
    TYPE="Ethernet"
    NM_CONTROLLED="no"
    IPV6_AUTOCONF="yes"
    IPV6INIT="yes"
    NOZEROCONF="yes"

See if a static route configuration exists.

    # ls /etc/sysconfig/network-scripts/route-*

    route-eth0

If there is a static route for your interface name, remove it.

    # rm /etc/sysconfig/network-scripts/route-eth0

Restart networking or reboot.

    # service network restart

## CentOS 8

List your network configuration files. If your adapter name is `enp1s0`, you may see:

    # ls /etc/sysconfig/network-scripts/ifcfg-*

    ifcfg-enp1s0

You may see other adapter names if you previously deployed this server on a different Vultr host. If you have configuration files that do not match your current adapter names, it's a good practice to move them to a backup location.

Edit or create a new configuration file named `ifcfg-{your adapter name}`.

    # nano /etc/sysconfig/network-scripts/ifcfg-enp1s0

Replace any existing content with the following. Replace `enp1s0` with your adapter name.

    TYPE="Ethernet"
    DEVICE="enp1s0"
    ONBOOT="yes"
    BOOTPROTO="dhcp"
    IPV6INIT="yes"
    IPV6_AUTOCONF="yes"

Restart the connection or reboot. Replace `enp1s0` with your adapter name in the commands below.

    # nmcli con load /etc/sysconfig/network-scripts/ifcfg-enp1s0
    # nmcli con up 'System enp1s0'

## Debian 9 & 10

Edit your network interface file.

    # nano /etc/network/interfaces

Replace the contents with the Vultr default information. Replace `enp1s0` with your adapter name in three places.

    # This file describes the network interfaces available on your system

    #source /etc/network/interfaces.d/*

    auto lo
    iface lo inet loopback

    allow-hotplug enp1s0
    iface enp1s0 inet dhcp
    iface enp1s0 inet6 auto

Restart networking or reboot.

    systemctl restart networking.service

## Fedora

Run the following commands to return your system to DHCP. Replace `enp1s0` with your adapter name.

    # nmcli connection modify enp1s0 ipv4.method auto
    # nmcli connection down enp1s0
    # nmcli connection up enp1s0

## FreeBSD

Edit `/etc/rc.conf`.

    # vi /etc/rc.conf

Populate the file with the following.

        hostname="example"
        sshd_enable="YES"
        ntpd_enable="YES"
        static_routes="linklocal"
        devmatch_blacklist="virtio_random.ko"
        sendmail_submit_enable="NO"
        ifconfig_vtnet0="DHCP"

* Make sure to replace `hostname="example"` with your hostname.
* Adjust **vtnet0** in the `ifconfig_vtnet0="DHCP"` line for your adapter name, if needed.

Reboot the system.

    # reboot

## OpenBSD 6.9

Edit `/etc/hostname.vio0`.

    # vi /etc/hostname.vio0

Delete everything in this file and replace it with a single line:

    dhcp

Reboot, or restart the networking subsystem.

    # reboot

    # sh /etc/netstart

## Ubuntu

List your network configuration files. If your adapter name is `enp1s0`, you'll see:

    # ls /etc/netplan/

    10-enp1s0.yaml

You may see other adapter names if you previously deployed this server on a different Vultr host. If you have configuration files that do not match your current adapter names, it's a good practice to move them to a backup location.

Edit or create a new configuration file named `10-{your adapter name}.yaml`.

    # nano /etc/netplan/10-enp1s0.yaml

Replace any existing content with the following. Replace `enp1s0` with your adapter name. YAML files require proper indentation. Pay attention to the formatting.

    network:
      version: 2
      renderer: networkd
      ethernets:
        enp1s0:
          dhcp4: yes

Update networking or reboot.

    # netplan apply

## Windows

1. Use the web console to connect to the server desktop. (Changes to the network will disconnect you if you use Remote Desktop.)
1. Open **Control Panel**.
1. Click **Network and Internet**.
1. Click **Network and Sharing Center**.

    ![Network and Sharing Center](https://docs.vultr.com/public/doc-assets/961/7e65d562396b147f.png)

1. Click the **Ethernet** connection to open the **Ethernet Status** dialog.

    ![Select Ethernet](https://docs.vultr.com/public/doc-assets/961/d616a49ad75eba2c.png)

1. Click the **Properties** button.

    ![Ethernet Properties Button](https://docs.vultr.com/public/doc-assets/961/bcd6e3debddad03d.png)

1. Select **Internet Protocol Version 4**, then click the **Properties** button.

    ![IPv4 Properties](https://docs.vultr.com/public/doc-assets/961/76dd764bd1c132eb.png)

1. Set the adapter to **Obtain an IP address automatically**.

    ![IPv4 Advanced](https://docs.vultr.com/public/doc-assets/961/f15121dbdd48c180.png)

1. Click **OK** to save the settings.
