Troubleshooting

Troubleshooting networking issues

Networking issues in netplan are commonly caused by incorrect configuration of the backend in use. Some features may not be supported by the chosen backend.

Always refer to the netplan reference documentation when unsure, features that are only supported on some backends should be clearly marked as such.

If you think something is a bug, it might well be one. Please don’t hesitate to report bugs on netplan.

Debugging netplan

  1. Refer to your netplan YAML configuration to know what backend is in use. Netplan configuration will be in *.yaml files under /etc/netplan, /run/netplan, or /lib/netplan.

  2. Check that the backend configuration was generated correctly for the configuration provided in the netplan YAML by comparing the files generated by netplan under /run for the backend in use (see below).

  3. Further investigate backend behavior if the issue persists and the configuration is as expected. To do this, start the backend in debug mode, reproduce the issue, and revise the logs. Identify any missing configuration options that need to be added.

  1. If all else fails, file a bug in Launchpad.

Debugging issues with the networkd backend

Verify that configuration in /run/systemd/network includes the settings in your netplan YAML.

For instance, if the you have the following addresses: field in YAML:

addresses: [ 10.10.10.10/24, 10.20.1.1/24 ]

You should find a matching 10-netplan- file for the name of the interface, which should contain the following lines:

[Network]
Address=10.10.10.10/24
Address=10.20.1.1/24

Along with any other options you may have set. Some of the options may be written in a different file: each interface may have any of the *.network, *.netdev or *.link files.

The settings contained in these files are generally pretty self-explanatory, and are documented in systemd manpages systemd.network(5), systemd.netdev(5) and systemd.link(5). If the configuration does not match what you expect to see, this is most likely a bug in netplan. File a bug in Launchpad about your issue.

If the configuration matches, systemd-networkd may not be able to apply the configuration correctly. This may happen for a variety of reasons, and further debugging of systemd-networkd will be required. You may refer to the Ubuntu DebuggingSystemd page for more information on how to debug these issues.

Debugging issues with the NetworkManager backend

Verify that configuration in /run/NetworkManager/system-configuration includes the settings in your netplan YAML.

For instance, if the you have the following addresses: field in YAML:

addresses: [ 10.10.10.10/24, 10.20.1.1/24 ]

You should find a matching netplan- file for the name of the interface, which should contain the following lines:

[ipv4]
method=manual
address1=10.10.10.10/24
address2=10.20.1.1/24

Along with any other options you may have set. The name of options should be recognizable, compared to the configuration in your netplan YAML.

If the configuration does not match what you expect to see, this is most likely a bug in netplan. File a bug in Launchpad about your issue.

If the configuration matches, NetworkManager may not be able to apply the configuration correctly. This may happen for a variety of reasons, and further debugging of NetworkManager will be required. You may refer to the Ubuntu DebuggingNetworkManager page for more information on how to debug these issues.