Score:0

Ubuntu 20.04 false subnet per interface isc-dhcp-server

ng flag

This morning I have configure my interfaces

network:
    version: 2
    renderer: networkd
    ethernets:
        ens160:
          dhcpd4: true
          nameservers:
            addresses: [8.8.8.8,8.8.4.4]
        ens192:
          dhcpd4: false
          addresses: [192.168.0.1/24]
         ens224:
           dhcpd4: false
           addresses: [192.168.10.1/24]

And tried to configure my DHCP server:

subnet 192.168.0.0 netmask 255.255.255.0 {
    interface ens192;
    option domain-name "Tor.org";
    range 192.168.0.2 192.168.0.252;
    option routers 192.168.0.1;
    option domain-name-servers 192.168.0.1;
    option subnet-mask 255.255.255.0;
}


subnet 192.168.10.0 netmask 255.255.255.0 {
    interface ens224;
    option domain-name "Network.org";
    range 192.168.10.2 192.168.10.252;
    option routers 192.168.10.1;
    option domain-name-servers 192.168.10.1;
    option subnet-mask 255.255.255.0;
}

on /etc/default/isc-dhcp-server I add this: INTERFACESv4: "ens192 ens224"

However, any subnet return from the dhcp server is from: 192.168.0.0/24 and I have no idea why, so I checked dhcp manual:

""" Please note that the current implementation assumes clients only have a single network interface. A client with two network interfaces will see unpredictable behavior. This is considered a bug, and will be fixed in a later release. It may be helpful to enable the one-lease-per-client parameter so that roaming clients do not trigger this same behavior. """

Do you have any idea ?

djdomi avatar
za flag
i had similar issues and changed over to dnsmask since it had an easier Syntax. Maybe this might be a option for you?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.