I have just set up a new Ubuntu server and I am going to be doing a lot of networking tests.
During setup, I simply skipped the network step.
I now need to switch between DHCP and an address quite often.
I know I can easily give a port an address via ifconfig eth0 x.x.x.x netmask x.x.x.x
, but, is there an alternative that can be used in order to set a port to use DHCP?
If this isn't possible, I am guessing I can default in /etc/network/interfaces
to dhcp and then just use up/down or restart networking in order to apply... but, I would much rather use ifconfig.
Change from static to dynamic
Change back