Skip to main content

Setting your ggrock server back to DHCP so that it may get a new IP address

Grab a copy of these commands before proceeding

ip a

cat /etc/network/interfaces

cat /etc/resolv.conf

Once that is done, we need to make a backup of the interface file

cp /etc/network/interfaces /etc/network/interfaces.SP.bak

Run this command so the server is staged to DHCP an address the next time it powers on

cp /etc/network/interfaces.bak/interfaces.bak /etc/network/interfaces

NOTE:
To undo the changes, simply issue the command below which will restore the backup we made

cp /etc/network/interfaces.SP.bak /etc/network/interfaces

ADDITIONAL NOTE

We didn't bounce the networking service, which is why the changes are 'staged' - if we did bounce networking, it'd grab a new address now which is undesirable.

Was this article helpful?

More in Debian OS

Not finding what you are looking for?

Chat with us or send us an email. Chat is open 24/7 through the bubble at the bottom right.

Send us an email