[SOLVED] DHCP Server multiple interfaces and subnets
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
Have you double-checked that the interface names are really wlan1 and usb0? In Debian it is usually wlan0. Unless you had a previous WLAN interface on wlan0 and changed the hardware. What does /sbin/ifconfig show.
It seems that your configuration is correct, I can spot no errors. But that is no guarantee.
The "INTERFACES=" in /etc/ics-dhcp-server is mandatory. So it should contain the correct interface names.
How are the network adapters configured and is Network Manager running?
By the way you should not use the entire subnet i.e x.x.x.1-x.x.x.254 because that would include the address for the adapter itself which could cause a conflict.
ifconfig reports the following interfaces: br0, eth2, eth3, lo, usb0, and wlan1. Yes hardware changes do happen, I'm working with a SOM that gets moved to other carrier boards. That's why you're seeing the strange enumeration. I have a script that watches for these changes and the script modifies other scripts and configs that use those interfaces. Since I've started with this problem, the hardware has not changed, so the configs and scripts aren't changing at this point. And as I pointed out, the interfaces do indeed work - isc-dhcp-server only wants to talk to one interface at a time, which can't possibly be right.
syslog doesn't show any errors. I looked in dhcpd.conf and found the log file set at log-facility local7; and there was no /etc/syslog.conf, so I created one and put the line 'local7.debug /var/log/dhcpd' into it and rebooted. No /var/log/dhcpd ever gets created and still no entries in /var/log/syslog when I try pulling an address from a remote machine. And looking into "https://docs.menandmice.com/display/...+for+debugging" just confused the dickens out of me - I have no idea what to really put in there for my scenario.
As a test I had a few VirtualBox VMs that I could test a dhcp server to see if I could get it working. I could not test a USB network adapter.
The network adapters were configured using NetworkManager with a static IP address 192.168.1.1/24 and 192.168.2.1/24. The basic dhcp.conf subnet declaration was :
Code:
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.100 192.168.7.200;
}
subnet 192.168.2.0 netmask 255.255.255.0 {
range 192.168.2.100 192.168.2.200;
}
I did not test both networks at the same time but I configured a Mint guest for each network one at a time and the server/client worked as expected and the guest acquired the expected IP address. I used INTERFACES="eth0 eth1" in the /etc/default/isc-dhcp-server configuration file. Since debian 8 uses systemd the dhcp log messages can be viewed using journalctl -xe command.
The basics seem to work so it is a matter of how your system is configured unless I missed something...
Thanks again both of you, there was nothing wrong with this configuration. There *was* one of those self-healing scripts that was making a change in the configs after the daemon was loaded instead of before. So this one's totally my fault - as it usually is
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.