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

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

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.

Hi JFL

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

Kind regards,
Tom

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.