Turning On Network Debugging
You can set systemd-networkd to work in debug mode so that you can analyze log files with debugging information to help troubleshoot networking problems.
You can turn on network debugging by adding a drop-in file in /etc/systemd to customize the default systemd configuration in /usr/lib/systemd.
Procedure
- Run the following command as root to create a directory with the name
systemd-networkd.service.d, including the.dextension.
mkdir -p /etc/systemd/system/systemd-networkd.service.d/
- Run the following command as root to establish a
systemddrop-in unit with a debugging configuration for the network service.
cat > /etc/systemd/system/systemd-networkd.service.d/10-loglevel-debug.conf << "EOF"
[Service]
Environment=SYSTEMD_LOG_LEVEL=debug
EOF
- Reload the
systemctldaemon and restart thesystemd-networkdservice for the changes to take effect.
systemctl daemon-reload
systemctl restart systemd-networkd
- Verify your changes.
systemd-delta --type=extended
- View the log files by running this command.
journalctl -u systemd-networkd
- After debugging the network connections, turn debugging off by deleting the drop-in file.
rm /etc/systemd/system/systemd-networkd.service.d/10-loglevel-debug.conf
Last modified August 1, 2024: Merge pull request #1562 from naltanov/photon-hugo (a784a46)