0

So I finally decided to make use of my laptop, and make a Ubuntu Server router from it. I have two NICs: wlp1s0 used as WiFi for my WAN and my ethernet enp2s0 as my LAN.

I'm following this guide.

The issue that I get is that without assigning an IP manually to enp2s0 (LAN) my isc-dhcp-server won't start:

● isc-dhcp-server.service - ISC DHCP IPv4 server
   Loaded: loaded (/lib/systemd/system/isc-dhcp-server.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2019-09-29 17:20:01 CEST; 9s ago
     Docs: man:dhcpd(8)
  Process: 1059 ExecStart=/bin/sh -ec      CONFIG_FILE=/etc/dhcp/dhcpd.conf;      if [ -f /etc/ltsp/dhcpd.conf ]; then CONF Main PID: 1059 (code=exited, status=1/FAILURE)

router dhcpd[1059]:
router dhcpd[1059]: Not configured to listen on any interfaces!
router dhcpd[1059]:
router dhcpd[1059]: If you think you have received this message due to a bug rather
router dhcpd[1059]: than a configuration issue please read the section on submitting
router dhcpd[1059]: bugs on either our web page at www.isc.org or in the README file
router dhcpd[1059]: before submitting a bug.  These pages explain the proper
router dhcpd[1059]: process and the information we find helpful for debugging..
router dhcpd[1059]:
router dhcpd[1059]: exiting.

When I asssign an IP to my enp2s0 (LAN) using:

ifconfig enp2s0 192.168.4.1 netmask 255.255.255.0

isc-dhcp-server starts but with an error referring to wlp1s0 (WAN):

router dhcpd[1297]:    in your dhcpd.conf file for the network segment
router dhcpd[1297]:    to which interface wlp1s0 is attached. **

Netplan conf:

network:
  version: 2
  renderer: networkd
  ethernets:
    enp2s0:
      optional: true #I use this to not be delayed with a 2-minute waiting time upon reboot.
      dhcp4: false
      addresses: [192.168.4.1/24]
      nameservers:
         addresses: [8.8.8.8, 8.8.4.4]
         search: []
  wifis:
    wlp1s0:
      dhcp4: yes
      access-points:
        <modem ESSID>:
          password: <modem password>

dhcpd.conf:

option domain-name "router";
option domain-name-servers 8.8.8.8, 8.8.4.4;
default-lease-time 600;
max-lease-time 7200;
ddns-update-style none;
authoritative;
log-facility local7;
subnet 192.168.4.0 netmask 255.255.255.0 {
     range 192.168.4.101 192.168.4.200;
     option subnet-mask 255.255.255.0;
     option routers 192.168.4.1;
     option broadcast-address 192.168.4.255;
}

ifconfig wlp1s0 output:

wlp1s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.2.2  netmask 255.255.255.0  broadcast 192.168.2.255
        inet6 fe80::e2ce:c3ff:fe4d:3af1  prefixlen 64  scopeid 0x20<link>
        ether e0:ce:c3:4d:3a:f1  txqueuelen 1000  (Ethernet)
        RX packets 317  bytes 29949 (29.9 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 204  bytes 44963 (44.9 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

What's going wrong?

  • I made some improvements. Only when I connect the ethernet cable in the enp2s0 the interface gets an IP assigned. Apparently without the connection it doesn't get an IP assigned. Is this normal behavior? – empec Sep 30 at 6:30

Your Answer

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

Browse other questions tagged or ask your own question.