ubuntu 17.10 server. Bridge not starting on reboot

Asked by David Hornbaker

All of the Ethernet cards start, but the bridge does not. running netplan apply brings up the bridge. How do I make sure the bridge comes up on reboot?

Everything is fine after the netplan apply, but not after reboot. How can I fix this?

contens of .yaml file
network:
   version: 2
   renderer: networkd
   ethernets:
       enp4s0:
           dhcp4: false
           addresses: [192.168.1.15/24]
           gateway4: 192.168.1.1
            nameservers:
                 addresses: [192.168.1.95 192.168.1.244]
       enx0050b60dec7f:
              dhcp4: false
   bridges:
       br0:
           dhcp4: yes
           interfaces: [enx0050b60dec7f]

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

You could add it to the boot up and it'll run each time.

Note that Artful is not LTS so you may want to upgrade to Bionic. The upgrade may resolve the issue you are having

Revision history for this message
David Hornbaker (daveho) said :
#2

Ok, I'm new at Linux. can you point me to doc for adding it to boot up?

Thanks

Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#3

What is the output of:

ls -l /etc/rc.local

I found this which shows the system will use the old school rc.local way if the file exists.
https://askubuntu.com/questions/886620/how-can-i-execute-command-on-startup-rc-local-alternative-on-ubuntu-16-10

Artful (Ubuntu 17.10) also uses systemd instead of init so applies

Revision history for this message
David Hornbaker (daveho) said :
#4

There was no rc.local, so I created it and added netplan apply. The bridge is now coming up on reboot.

Thanks to all

Revision history for this message
David Hornbaker (daveho) said :
#5

Thanks actionparsnip, that solved my question.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#6

Make sure you add the last line:

exit 0

To make the OS a little happier