View previous topic :: View next topic |
Author |
Message |
cz0 Apprentice
Joined: 13 Jun 2005 Posts: 280 Location: /earth/russia/moscow
|
Posted: Tue Apr 13, 2021 7:38 pm Post subject: Managing unconfigured ifaces with ISC dhcp |
|
|
Hi folks!
Recently I found that my wifi hot spot stopped to work after reboot. After some investigation I found that dhcp is in respond:
Code: |
Apr 12 19:46:56 cux dhcpd[2895]: No subnet declaration for wlan0 (no IPv4 addresses).
Apr 12 19:46:56 cux dhcpd[2895]: ** Ignoring requests on wlan0. If this is not what
Apr 12 19:46:56 cux dhcpd[2895]: you want, please write a subnet declaration
Apr 12 19:46:56 cux dhcpd[2895]: in your dhcpd.conf file for the network segment
Apr 12 19:46:56 cux dhcpd[2895]: to which interface wlan0 is attached. **
|
After feather investigation I figured out, that net.wlan0 that serves wifi is starting up in different way that it used to be. And if I restart dhcpd after hostapd is started, I will get dhcpd respond on the wlan0 subnet.
Previously, I had fallowing configuration:
/etc/init.d/dhcpd
Code: |
depend() {
need !net net.lan0 net.wlan0
use logger dns
}
|
/etc/conf.d/net
Code: |
config_wlan0="10.0.1.1/24 broadcast 10.0.1.255"
mode_wlan0="master"
essid_wlan0="VAULT"
channel_wlan0="8"
modules_wlan0="!wpa_supplicant"
|
And this granted me dhcpd started after net.wlan0 got the address, but not anymore, so I have to add:
Code: |
use logger dns hostapd
|
To /etc/init.d/dhcpd to make it start after hostapd.
This configuration work, but this is not reliable as wifi may fail.
I wonder if there are any ways to make dhcpd accept requests if interface comes up after dhcpd was started or maybe restart dhcpd when interface get addresses so it will "see" it is able to accept requests from new subnet. |
|
Back to top |
|
|
cz0 Apprentice
Joined: 13 Jun 2005 Posts: 280 Location: /earth/russia/moscow
|
Posted: Tue Apr 13, 2021 10:06 pm Post subject: |
|
|
What I found is that BIND needs no net dependency as it will start/stop listening on interfaces as soon as they became ready:
Code: |
Apr 14 00:55:35 cux named[2061]: no longer listening on 10.0.0.1#53
Apr 14 00:55:46 cux named[2061]: listening on IPv4 interface lan0, 10.0.0.1#53
Apr 14 00:56:54 cux named[2061]: no longer listening on 10.0.0.1#53
Apr 14 00:57:01 cux named[2061]: listening on IPv4 interface lan0, 10.0.0.1#53
|
This seem not to work for dhcpd, or (hopefully) I'm missing something? |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|