Score:1

Netplan does nothing

cn flag

I have this config

network:
  ethernets:
    eno1:
      dhcp4: no
      addresses: [192.168.0.103/24]
      gateway4: 192.168.0.1
      nameservers:
          addresses: [8.8.8.8,8.8.4.4]
  version: 2
  renderer: networkd

Then I do: sudo netplan try and press ENTER And finally I sudo reboot or shutdown and start manually

And when the machine comes back up the ip is always 192.168.0.102

What would be the problem?

System info

Distributor ID: Ubuntu Server
Description:    Ubuntu 20.04.2 LTS
Release:        20.04
Codename:       focal
  • I systemd-networkd is running:
 systemd-networkd.service - Network Service                                                                                                                                                                       
     Loaded: loaded (/lib/systemd/system/systemd-networkd.service; enabled; vendor preset: enabled)                                                                                                                
     Active: active (running) since Mon 2021-08-09 06:29:26 UTC; 21min ago                                                                                                                                         
TriggeredBy: ● systemd-networkd.socket                                                                                                                                                                             
       Docs: man:systemd-networkd.service(8)                                                                                                                                                                       
   Main PID: 1307 (systemd-network)                                                                                                                                                                                
     Status: "Processing requests..."                                                                                                                                                                              
      Tasks: 1 (limit: 38110)                                                                                                                                                                                      
     Memory: 1.7M                                                                                                                                                                                                  
     CGroup: /system.slice/systemd-networkd.service                                                                                                                                                                
             └─1307 /lib/systemd/systemd-networkd  
Madeo avatar
cn flag
Sorry, I have added my system info. I have tried with both networkd and without
Madeo avatar
cn flag
It is Ubuntu server
Madeo avatar
cn flag
How can I check it?
Madeo avatar
cn flag
`Unit NetworkManager.service could not be found` is not running probably
Madeo avatar
cn flag
`systemd-networkd` is running
Madeo avatar
cn flag
Thanks anyway !
Score:0
cn flag

I have found the solution. I was running with automated bridge setup from this blog post: https://octetz.com/docs/2020/2020-11-13-vm-networks/

So my network config was coming from networkd /etc/systemd/network/2-br0-dhcp.network:

[Match]
Name=br0

[Network]
DHCP=ipv4

So I have just changed this to:

[Match]                                                                                                  
Name=br0                                                                                                 
                                                                                                         
[Network]                                                                                                
DHCP=no                                                                                                  
Address=192.168.0.103/24                                                                                 
Gateway=192.168.0.1                                                                                      
DNS=1.1.1.1  
us flag
Note that it's quite possible to configure your bridge using netplan. In any case, it's a good idea to pick one layer/tool and apply all your network config there, whether it's netplan or networkd.
Madeo avatar
cn flag
Yea, I just forgot that it was configured that way
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.