Score:0

Ubuntu 22.04.5 netplan generate > Error in network definition : invalid prefix length in address of using Public-IP but get OK on using Local-IP

in flag

Configuring Ubuntu 22.04.5 network, both "netplan generate" or "netplan apply" on 00-installer-config.yaml file by this below configuration of using local-IP fortunately got success and no problem found :

networks: version: 2 renderer: networkd ethernets: enp4s0: dhpc4: false addressses: [192.168.0.224/24] routes: - to: default via: 192.168.0.3 nameaddresses: addresses: [192.168.0.1,8.8.8.8]

Unfurtunately, when I just replaced the Local-IP with a Global-IP as below then error found both on "netplan generate" or "netplan apply" :

networks: version: 2 renderer: networkd ethernets: enp4s0: dhpc4: false addressses: [119.18.157.14/248] routes: - to: default via: 119.18.157.9 nameaddresses: addresses: [119.18.156.10,119.18.152.10,8.8.8.8]

The error message is :

Error in network definition : invalid prefix length in address [119.18.157.14/248]

with caret sign ^ under "[".

invalid prefix length error image

Kindly please help ...

Syamsul Arifin avatar
in flag
When I remove the bracket of addressses: [119.18.157.14/248] to be addressses: 119.18.157.14/248 other error occured. Error also happened when I replace "addressses: [119.18.157.14/248]" become "addressses: - 119.18.157.14/248".
user535733 avatar
cn flag
Greetings, time traveler! Ubuntu 22.04.5 is planned for the future, but does not yet exist. Perhaps you mean Ubuntu 20.04.5? That does exist.
waltinator avatar
it flag
Please see `https://netplan.io` and `https://netplan.io/examples`. Please read https://askubuntu.com/help/how-to-ask and https://askubuntu.com/help/formatting
Syamsul Arifin avatar
in flag
Excuse me for the wrong Version. lsb_release -a got Ubuntu 22.04.2 Jammy LST version. The error still remain event I reinstalled the Ubuntu Server, Error happened when using Public-IP configuration only on *.yaml file. Please help.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.