Score:0

Error in network definition: unknown key 'network' network:

tt flag

I have been going at it for almost a day and stuck on this yaml configuration. Basically I am trying to setup a bridge network so that my VMs can receive IPs from my DHCP on my LAN network. I have tried all sort of yaml validators out there and it says all is well but when i run netplan generateI am getting the error message Error in network definition: unknown key 'network' network:below is my actual configuration file. please me fix this issue.

network:
version: 2
renderer: networkd
ethernets:
 enxa0cec8e3e039:
   dhcp4: no
     #      dhcp6: no
     #addresses: [192.168.0.17/24]
     #gateway4: 192.168.0.1
     #nameservers:
     #addresses: [8.8.8.8,192.168.0.1]

network:
version: 2
renderer: networkd

ethernets:
 enxa0cec8e3e039:
         dhcp4: false
         dhcp6: false
bridges:
 br0:
       interfaces: [enxa0cec8e3e039]
       address: [192.168.1.166/24]
       gateway4: 192.168.1.1
       mtu: 1500
       nameservers:
         addresses: [192.168.1.1]
       parameters:
             stp: true
             forward-delay: 4
       dhcp4: no
       dhcp6: no```
waltinator avatar
it flag
It'd guess it is complaining about the duplicated 3 lines (the 2nd `network:` line, and the following 2).
I sit in a Tesla and translated this thread with Ai:

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.