How to change from dhcp to fixed address (or vice versa)?


#1

Good afternoon

if an interface was configured to a fix address (e.g. set interfaces ethernet eth1 address ‘192.168.0.1/24’) and one would like to change to dhcp (set interfaces ethernet eth0 address dhcp) one gets:

Can’t configure static IPv4 address and DHCP on the same interface.

How can we remove the static IP Address?
(Or the other way round: how can we remove an active DHCP on an interface to assign a static IP Address?

Thanks a lot for any help!,
kind regards,
Tom


#2

just delete the fixed address.

delete interfaces ethernet eth1 address 192.168.0.1/24
set interfaces ethernet eth1 address dhcp
commit

or the reverse.


#3

Hi JFL

ouch…, thank you very much!!, I’ve tried many other things…

Kind regards,
Tom