0

I have 2 raspberry pi's running in my house with intermittent connectivity and both get dhcp addresses from my DHCP server.

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet 10.0.60.5  netmask 255.255.255.255  broadcast 0.0.0.0
    inet6 fe80::c487:63ce:160a:acd5  prefixlen 64  scopeid 0x20<link>
    ether e4:5f:01:db:a0:00  txqueuelen 1000  (Ethernet)
    RX packets 426505  bytes 46789104 (44.6 MiB)
    RX errors 0  dropped 37337  overruns 0  frame 0
    TX packets 336554  bytes 183810523 (175.2 MiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

However ip a shows:

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether e4:5f:01:db:a0:00 brd ff:ff:ff:ff:ff:ff
inet 10.0.60.5/32 scope global eth0
   valid_lft forever preferred_lft forever
inet 10.0.60.3/24 brd 10.0.60.255 scope global dynamic noprefixroute eth0
   valid_lft 54817sec preferred_lft 44017sec
inet 10.0.60.3/32 scope global eth0
   valid_lft forever preferred_lft forever
inet 10.0.60.130/32 scope global eth0
   valid_lft forever preferred_lft forever
inet6 fe80::c487:63ce:160a:acd5/64 scope link 
   valid_lft forever preferred_lft forever

Grep'ing journalctl for the extra IP addresses shows these log messages:

Apr 28 09:10:43 pi1 avahi-daemon[427]: Registering new address record for 10.0.60.5 on eth0.IPv4.
Apr 28 09:10:43 pi1 avahi-daemon[427]: Registering new address record for 10.0.60.3 on eth0.IPv4.
Apr 28 09:10:45 pi1 avahi-daemon[427]: Withdrawing address record for 10.0.60.3 on eth0.
Apr 28 09:10:45 pi1 avahi-daemon[427]: Registering new address record for 10.0.60.3 on eth0.IPv4.
Apr 28 09:10:45 pi1 avahi-daemon[427]: Got SIGHUP, reloading.
Apr 28 09:10:45 pi1 avahi-daemon[427]: No service file found in /etc/avahi/services.
Apr 28 17:04:37 pi1 avahi-daemon[427]: Withdrawing address record for 10.0.60.130 on eth0.
Apr 28 17:04:37 pi1 avahi-daemon[427]: Leaving mDNS multicast group on interface eth0.IPv4 with address 10.0.60.130.
Apr 28 17:04:37 pi1 avahi-daemon[427]: Joining mDNS multicast group on interface eth0.IPv4 with address 10.0.60.3.
Apr 28 17:04:40 pi1 avahi-daemon[427]: Registering new address record for 10.0.60.130 on eth0.IPv4.

Why is avahi requesting new DHCP addresses and how can I configure it to use my original address? Note: I do have mDNS repeaters enabled for my home VLANs.

Edit: I don't have any other dhcp clients running that I'm aware of. NetworkManager is not installed, and just see one ip listed in dhcpcd: Apr 28 21:10:45 pi1 dhcpcd[4202]: eth0: offered 10.0.60.3 from 10.0.60.1

2
  • FWIW I have 2 Pi 5 side by side, and use WiFi on the 2.4 GHz band. Seems to work reliably
    – anon
    Commented Apr 29 at 15:13
  • First of all, don't use ifconfig anymore. It is deprecated on Linux. ip is the go-to command now. // Why do you assume these addresses are from DHCP? There is no indication they are. It's highly unlikely, too, with a /32 subnet mask.
    – Daniel B
    Commented Apr 29 at 18:08

1 Answer 1

0

Why is avahi requesting new DHCP addresses and how can I configure it to use my original address?

It isn't. You're confusing cause and effect. Avahi-daemon is not a DHCP client; its job is to react to any IP address additions or removals on your network interfaces so that it may correctly advertise them over mDNS.

Make sure you only have one DHCP client running, but also grep your entire /etc for the extra addresses – they look suspiciously like they have been added statically through some network configuration.

1
  • I don't have any other dhcp clients running that I'm aware of. NetworkManager is not installed, and just see one ip listed in dhcpcd: Apr 28 21:10:45 pi1 dhcpcd[4202]: eth0: offered 10.0.60.3 from 10.0.60.1
    – Nathan
    Commented Apr 29 at 15:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .