ISC DHCP Server configuration for multiple pools on Ubuntu 18.04

J.Witvliet at mindef.nl J.Witvliet at mindef.nl
Fri Feb 24 09:41:54 UTC 2023


How about multiple virtual nics, all bount via a bridge to the same physical device?


From: "pvs via ubuntu-users" <ubuntu-users at lists.ubuntu.com<mailto:ubuntu-users at lists.ubuntu.com>>
Date: Thursday, 23 February 2023 at 10:26:03
To: "ubuntu-users at lists.ubuntu.com" <ubuntu-users at lists.ubuntu.com<mailto:ubuntu-users at lists.ubuntu.com>>
Cc: "pvs" <pvs at cdot.in<mailto:pvs at cdot.in>>
Subject: ISC DHCP Server configuration for multiple pools on Ubuntu 18.04


Hello,

I am setting up new ISC DHCP Server (version 4.3.5) on Ubuntu 18.04. This system is configured with single NIC.
Need to configure DHCP server for multiple leases on different Class C networks.

Googled and tried multiple ways, none of them worked.

Contents of  /etc/dhcpd/dhcpd.conf file

authoritative;

shared-network companynetwork {
subnet 192.168.40.0 netmask 255.255.255.0{
 range 192.168.40.150 192.168.40.160 ;
option domain-name-server 8.8.8.8;
option subnet-mask 255.255.255.0;
option routers 192.168.40.1;
option broadcast-address 192.168.40.255;
default-lease-time 600;
max-lease-time 7200;
}
subnet 10.10.10.0 netmask 255.255.255.0{
 range 10.10.10.10 10.10.10.20;
 option subnet-mask 255.255.255.0;
 option routers 10.10.10.1;
 option broadcast-address 10.10.10.255;
 default-lease-time 600;
 max-lease-time 7200;
}
subnet 192.168.37.0 netmask 255.255.255.0{
 range 192.168.37.131 192.168.37.140;
 option subnet-mask 255.255.255.0;
 option routers 192.168.37.1;
 default-lease-time 600;
 max-lease-time 7200;
}
}

Contents of/etc/netplan/50-cloud-init.yaml    -----   network configuration file

network:
    version: 2
    ethernets:
       ens160:
               addresses:
                   - 192.168.40.29/24
               gateway4: 192.168.40.1
               nameservers:
                   addresses: [8.8.8.8]


With the above configuration, DHCP addresses get issued from192.168.40.0 pool only, not from other pools.

Any help is greatly appreciated

Thanks in advance

Regards,

पं. विष्णु शंकर         P. Vishnu Sankar
टीम लीडर                Team Leader-Network Operations
सी-डॉट                  C-DOT
इलैक्ट्रॉनिक्स सिटी फेज़ I    Electronics City Phase I
होसूर रोड बेंगलूरु          Hosur Road Bengaluru – 560100
फोन  Ph                91 80 25119466
------------------------------------------------------
Disclaimer :
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.
If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.
The sender does not accept liability for any errors or omissions in the contents of this message, which arise as a result.

Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien u niet de geadresseerde bent of dit bericht abusievelijk aan u is toegezonden, wordt u verzocht dat aan de afzender te melden en het bericht te verwijderen. De Staat aanvaardt geen aansprakelijkheid voor schade, van welke aard ook, die verband houdt met risico's verbonden aan het elektronisch verzenden van berichten.

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. The State accepts no liability for damage of any kind resulting from the risks inherent in the electronic transmission of messages.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20230224/1165a67f/attachment-0001.html>


More information about the ubuntu-users mailing list