The failure had not recurred until today. My slightly amended version of the script provided above by Steve Chadsey (schadsey), 2017-07-19, https://bugs.launchpad.net/ubuntu/+source/avahi/+bug/1586528/comments/18 did not rectify the problem. I have since modified it more and hope that it can provide useful diagnostics next time there is a similar failure.
The connection was active until after 00:49:01. It was restored manually by 08:11:59. Unfortunately, I cannot be certain whether I reactivated the interface or whether an automated script did so. yoyo ~ # ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:25:64:72:72:14 inet6 addr: fe80::c1e6:4b25:5c64:f669/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:65340342 errors:0 dropped:0 overruns:0 frame:0 TX packets:26833432 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:21650436815 (21.6 GB) TX bytes:140523812727 (140.5 GB) Interrupt:18 yoyo ~ # ifconfig eth0 down yoyo ~ # ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:25:64:72:72:14 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:65340378 errors:0 dropped:0 overruns:0 frame:0 ---------------------^^^^^^^^------------------^ TX packets:26833625 errors:0 dropped:0 overruns:0 carrier:0 ---------------------^^^^^^^^------------------^ collisions:0 txqueuelen:1000 RX bytes:21650441164 (21.6 GB) TX bytes:140523828704 (140.5 GB) -------------------^^^^^^^^^^^---------------------^^^^^^^^^^^^ Interrupt:18 Notice that the counts of packets and bytes had been increasing, and that no packets had been dropped. yoyo ~ # ip a add 192.168.42.187 dev eth0 yoyo ~ # ip a s eth0 2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000 link/ether 00:25:64:72:72:14 brd ff:ff:ff:ff:ff:ff inet 192.168.42.187/32 scope global eth0 valid_lft forever preferred_lft forever yoyo ~ # ip a del 192.168.42.187 dev eth0 Warning: Executing wildcard deletion to stay compatible with old scripts. Explicitly specify the prefix length (192.168.42.187/32) to avoid this warning. This special behaviour is likely to disappear in further releases, fix your scripts! yoyo ~ # ip a s eth0 2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000 link/ether 00:25:64:72:72:14 brd ff:ff:ff:ff:ff:ff yoyo ~ # ip a add 192.168.42.187/24 dev eth0 yoyo ~ # ip a s eth0 2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000 link/ether 00:25:64:72:72:14 brd ff:ff:ff:ff:ff:ff inet 192.168.42.187/24 scope global eth0 valid_lft forever preferred_lft forever yoyo ~ # ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:25:64:72:72:14 inet addr:192.168.42.187 Bcast:0.0.0.0 Mask:255.255.255.0yoyo ~ # ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:25:64:72:72:14 inet addr:192.168.42.187 Bcast:0.0.0.0 Mask:255.255.255.0 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:65340544 errors:0 dropped:357 overruns:0 frame:0 -----------------------------------------------^^^ TX packets:26834217 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:21650460079 (21.6 GB) TX bytes:140523878283 (140.5 GB) Interrupt:18 Now there are dropped packets. yoyo ~ # ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:25:64:72:72:14 inet addr:192.168.42.187 Bcast:0.0.0.0 Mask:255.255.255.0 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:65340544 errors:0 dropped:638 overruns:0 frame:0 -----------------------------------------------^^^ TX packets:26834217 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:21650460079 (21.6 GB) TX bytes:140523878283 (140.5 GB) Interrupt:18 More packets have been dropped. yoyo ~ # ifconfig eth0 down yoyo ~ # ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:25:64:72:72:14 inet addr:192.168.42.187 Bcast:0.0.0.0 Mask:255.255.255.0 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:65340544 errors:0 dropped:687 overruns:0 frame:0 TX packets:26834217 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:21650460079 (21.6 GB) TX bytes:140523878283 (140.5 GB) Interrupt:18 Oops. My memory let me down:- yoyo ~ # ifconfig eth0 up dhcp dhcp: Unknown host ifconfig: `--help' gives usage information. yoyo ~ # ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:25:64:72:72:14 inet addr:192.168.42.187 Bcast:0.0.0.0 Mask:255.255.255.0 inet6 addr: fe80::225:64ff:fe72:7214/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 !---------^^ RX packets:65340857 errors:0 dropped:697 overruns:0 frame:0 TX packets:26834733 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:21650604853 (21.6 GB) TX bytes:140523968671 (140.5 GB) Interrupt:18 One surprising discovery was that a virtual machine maintained its connection through the same interface that the physical host had lost. Also, the network manager icon was missing from the task bar (though it may have gone because of my actions). On the physical host, the D.H.C.P. daemon "dhclient" had terminated. Its last known activity was at 01:18:47. [LinuxMint] graham@yoyo $ grep "dhclient" /var/log/daemon.log | tail -n 4 Sep 1 01:17:08 yoyo dhclient[20006]: DHCPREQUEST of 192.168.42.187 on eth0 to 255.255.255.255 port 67 (xid=0x458de0a7) Sep 1 01:18:02 yoyo dhclient[20006]: message repeated 4 times: [ DHCPREQUEST of 192.168.42.187 on eth0 to 255.255.255.255 port 67 (xid=0x458de0a7)] Sep 1 01:18:23 yoyo dhclient[20006]: DHCPREQUEST of 192.168.42.187 on eth0 to 255.255.255.255 port 67 (xid=0x458de0a7) Sep 1 01:18:47 yoyo dhclient[20006]: message repeated 2 times: [ DHCPREQUEST of 192.168.42.187 on eth0 to 255.255.255.255 port 67 (xid=0x458de0a7)] Fri Sep 01 12:33:22 ~ Here is an except from /var/log/daemon.log showing activities of avahi-daemon: Sep 1 00:48:54 yoyo dhclient[20006]: DHCPACK of 192.168.42.187 from 192.168.42.129 Sep 1 00:48:54 yoyo dhclient[20006]: bound to 192.168.42.187 -- renewal in 708 seconds. Sep 1 00:53:07 yoyo avahi-daemon[1017]: Withdrawing address record for 192.168.42.187 on eth0. Sep 1 00:53:07 yoyo avahi-daemon[1017]: Leaving mDNS multicast group on interface eth0.IPv4 with address 192.168.42.187. Sep 1 00:53:07 yoyo avahi-daemon[1017]: Interface eth0.IPv4 no longer relevant for mDNS. Sep 1 00:53:09 yoyo ntpd[20331]: Deleting interface #3 eth0, 192.168.42.187#123, interface stats: received=11901, sent=12617, dropped=0, active_time=611380 secs Sep 1 00:53:09 yoyo ntpd[20331]: 85.199.214.102 local addr 192.168.42.187 -> <null> ... Sep 1 08:11:36 yoyo ntpd[2507]: error resolving pool 0.ubuntu.pool.ntp.org: Temporary failure in name resolution (-3) Sep 1 08:11:59 yoyo avahi-daemon[1017]: Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.42.187. Sep 1 08:11:59 yoyo avahi-daemon[1017]: New relevant interface eth0.IPv4 for mDNS. Sep 1 08:11:59 yoyo avahi-daemon[1017]: Registering new address record for 192.168.42.187 on eth0.IPv4. Sep 1 08:12:02 yoyo systemd[1]: Started Network Manager. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to network-manager in Ubuntu. https://bugs.launchpad.net/bugs/1586528 Title: Avahi-daemon withdraws address record Status in avahi package in Ubuntu: New Status in network-manager package in Ubuntu: Confirmed Bug description: For some reason, if I leave my Ubuntu VM up for a prolonged period of time the machine will lose connection to the network. ip addr shows that the nic port no longer has an address and an examination of the syslog shows this: May 27 14:19:38 matt-VirtualBox avahi-daemon[590]: Withdrawing address record for 10.0.2.15 on enp0s3. May 27 14:19:38 matt-VirtualBox avahi-daemon[590]: Leaving mDNS multicast group on interface enp0s3.IPv4 with address 10.0.2.15. May 27 14:19:38 matt-VirtualBox avahi-daemon[590]: Interface enp0s3.IPv4 no longer relevant for mDNS. for no known reason. The only reliable way to get the network to come back (that I have found) is a full reboot. ProblemType: Bug DistroRelease: Ubuntu 16.04 Package: avahi-daemon 0.6.32~rc+dfsg-1ubuntu2 ProcVersionSignature: Ubuntu 4.4.0-22.40-generic 4.4.8 Uname: Linux 4.4.0-22-generic x86_64 ApportVersion: 2.20.1-0ubuntu2 Architecture: amd64 CurrentDesktop: Unity Date: Fri May 27 15:11:34 2016 InstallationDate: Installed on 2015-10-22 (218 days ago) InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Release amd64 (20151021) SourcePackage: avahi UpgradeStatus: Upgraded to xenial on 2016-03-30 (58 days ago) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/avahi/+bug/1586528/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp