Add more logic to set interfaces ethernet address ip/dhcp


Good afternoon

If an interface has got a fixed address (set interfaces ethernet eth1 address ‘’) and some time later one would like to change it to dhcp (set interfaces ethernet eth0 address dhcp) then the user gets:

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

Of course, that’s true.
Why does VyOS not automatically remove the static IP-Address (or asks for it or give some hint how to remove the static addess)?

Kind regards,


There are MANY other cases of mutually incompatible configuration settings. A design assumption in the UI is that the operator has read the documentation, including

delete interfaces ethernet eth1 address ...


Hi carl.byington

Thanks for your answer!, I’ve read the manual, but the delete-command has no example - it’s just mentioned as a note:

and therefore I probably did not “internalized” it.

Yes - and many of them are probably already checked on commit…
and I assume, that many of the checks know the solution but just explain what’s wrong - and not how to solve it.

It was just an idea.

Thanks a lot for your help with the delete-command!,
kind regards,


From the VYATTA_QUICKSTART_GUIDE Page 36, Chapter 5:

Delete a configuration node: vyatta@vyatta# delete interfaces ethernet eth0 address