A bizarre problem that I haven't found anywhere else on the internet, hinting it's probably me f'ing something up, but what? Trying to start dnsmasq.service, no matter if on boot or from user session when all network services are available and working, fails with "unknown interface enp2s0" error... except the entire rest of the system claims it's up.

andrzej@andrzej-PC ~ $ sudo systemctl start dnsmasq
Job for dnsmasq.service failed because the control process exited with 
error code. See "systemctl status dnsmasq.service" and "journalctl -xe" for details.
andrzej@andrzej-PC ~ $ systemctl status dnsmasq
● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
   Loaded: loaded (/lib/systemd/system/dnsmasq.service; disabled; vendor preset:
  Drop-In: /run/systemd/generator/dnsmasq.service.d
           └─50-dnsmasq-$named.conf, 50-insserv.conf-$named.conf
   Active: failed (Result: exit-code) since Mon 2017-07-10 02:09:41 CEST; 3s ago
  Process: 5551 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=
  Process: 5548 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUC

Jul 10 02:09:41 andrzej-PC systemd[1]: Starting dnsmasq - A lightweight DHCP and
Jul 10 02:09:41 andrzej-PC dnsmasq[5548]: dnsmasq: syntax check OK.
Jul 10 02:09:41 andrzej-PC dnsmasq[5551]: dnsmasq: unknown interface enp2s0
Jul 10 02:09:41 andrzej-PC systemd[1]: dnsmasq.service: Control process exited, 
Jul 10 02:09:41 andrzej-PC systemd[1]: Failed to start dnsmasq - A lightweight D
Jul 10 02:09:41 andrzej-PC systemd[1]: dnsmasq.service: Unit entered failed stat
Jul 10 02:09:41 andrzej-PC systemd[1]: dnsmasq.service: Failed with result 'exit

Right, except:

andrzej@andrzej-PC ~ $ ifconfig
enp2s0    Link encap:Ethernet  HWaddr /*correct address*/  
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:921 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:147421 (147.4 KB)

and same for ip addr:

2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether /*same*/ brd ff:ff:ff:ff:ff:ff

and finally:

andrzej@andrzej-PC ~ $ cat /sys/class/net/enp2s0/operstate

What? Oh, and my config file looks like this:

  • this interface might be up but it does not look configured, I cannot see any ip and no packet has been ever received on it. Be sure to be able to ping it even from itself – M4rty Jul 10 '17 at 13:00
  • That's because it's an ethernet interface I'm trying to use to set up PXE boot on another computer. I connect with my home network via a wireless card, of course having a different interface. – Deuxis Jul 10 '17 at 15:58
  • Oh, I forgot to mention, once after a reboot dnsmasq started working for no apparent reason, and when trying to PXE boot ifconfig showed packets going both ways, but the "client" computer didn't receive any DHCP offer and when I restarted dnsmasq it failed with the same error again. – Deuxis Jul 13 '17 at 19:27
  • I have the same error trying to do the same thing (set up PXE boot), @Deuxis, did you find any solution? – Hadrien TOMA Sep 17 '17 at 8:09
  • Sadly not, @HadrienTOMA. It simply became apparent to me that the computer I'm trying to revive isn't worth the effort. Good luck with your search! – Deuxis Sep 19 '17 at 14:18

System restart helped - dnsmasq started without issues. It is possible that device config for the interface configured to use with dnsmasq were not yet in force

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.