KEVIN CHEN
KEVIN CHEN

Reputation: 1

MDNS not advertising the network interface after network restart in systemd

In systemd, MDNS (avahi-daemon) stops broadcasting the network interface after the network restart. However, for the same scenario, in system init, MDNS will work perfectly normal.

Tried:

  1. Changed the avahi-daemon configuration file
  2. restart the avahi-daemon after restarting the network
  3. Checked the firewall (no firewall)
  4. Tried systemd-resolved
  5. Changed hostapd configuration

Upvotes: -1

Views: 876

Answers (1)

KEVIN CHEN
KEVIN CHEN

Reputation: 1

I am so glad that I have it figured out. The reason why the MDNS stopped broadcasting is because the interface didn't properly restart.

In systemd, after the network restarts, it requires a reload of the configuration manually to generate an IP address. So after restarting the network, manually reloading the network interface configuration by ifconfig interface down and ifconfig interface up (interface need to be replaced by the real interface name).

Also, purely doing a ifconfig interface up won't work. The network interface probably has a cache. So bring the interface down ifconfig down can help remove the cache.

Please correct me if any of the description above is wrong. Thanks.

Upvotes: 0

Related Questions