I am trying to set a static IP for my ubuntu server by creating a yaml file on /etc/netplan/ as follows:

    version: 2
    renderer: networkd        
            dhcp4: no
            addresses: []

But sudo netplan apply returns an error:

Error in network definition /etc/netplan/01-netcfg.yaml line 6 column 23: Malformed Address '',  must be X.X.X.X/NN or ... ".
  • 1
    Have you tried "[]" (without the leading zero before the 8)?
    – ejjl
    Apr 5, 2019 at 20:19

1 Answer 1


The error code indicates that there is a "Malformed Address" in "".

Try leaving out the leading zero in the fourth octet (i.e. write '').

  • 4
    FYI the reason for this is for most integer to strong converters if you prefix a decimal number with 0 it attempts to parse the following as an octal number, and 8 is not a valid octal digit.
    – Joel C
    Apr 6, 2019 at 1:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.