Setting up Dnsmaq to serve DHCP addresses to Hostapd Hotspot

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I am trying to setup dnsmasq to act as DHCP server for a hostapd-based WiFi hotspot.



When client connects WAP2 negotiation succeeds, but dnsmasq consistently outputs the following errors.



[ 2081.576809] DHCP[wlan0] - DISCOVER [TX][ 2081.580476] 
[ 2081.582008] DHCP[wlan0] - DISCOVER [RX]
dnsmasq-dhcp: no address range available for DHCP request via wlan0
[ 2085.297432] DHCP[wlan0] - DISCOVER [TX][ 2085.301107]
[ 2085.302630] DHCP[wlan0] - DISCOVER [RX]
dnsmasq-dhcp: no address range available for DHCP request via wlan0


These usually mean the configured range is incompatible with device settings.



If this is the case I fail to understand why.



My test dnsmaq.conf is very basic:



root@imx8qxpa0tcuap:~# cat /etc/dnsmasq.conf 
domain-needed
bogus-priv
interface=wlan0
dhcp-range=192.168.207.20,192.168.207.50,12h


... and current net settings should be compatible:



root@imx8qxpa0tcuap:~# ip addr show wlan0
5: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP 0
link/ether a0:cc:2b:a5:e0:05 brd ff:ff:ff:ff:ff:ff
inet 192.168.207.1/32 scope global wlan0
valid_lft forever preferred_lft forever
inet6 fe80::a2cc:2bff:fea5:e005/64 scope link
valid_lft forever preferred_lft forever
root@imx8qxpa0tcuap:~# ip route
192.168.207.0/24 dev wlan0 scope link


Initial dnsmasq printouts show no problem:



root@imx8qxpa0tcuap:~# dnsmasq -d
dnsmasq: started, version 2.78 cachesize 150
dnsmasq: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP DHCPy
dnsmasq-dhcp: DHCP, IP range 192.168.207.20 -- 192.168.207.50, lease time 12h
dnsmasq: reading /etc/resolv.conf
dnsmasq: using nameserver 8.8.8.8#53
dnsmasq: using nameserver 8.8.4.4#53
dnsmasq: using nameserver 2001:4860:4860::8888#53
dnsmasq: using nameserver 2001:4860:4860::8844#53
dnsmasq: read /etc/hosts - 6 addresses


What am I doing wrong?



Note1: in this test setup the WiFi Hotspot goes nowhere (yet) only communication between client and Hotspot itself are supposed to work.



Note2: the machine is a custom board (i.MX8) running a Yocto based distribution.










share|improve this question

























    up vote
    1
    down vote

    favorite












    I am trying to setup dnsmasq to act as DHCP server for a hostapd-based WiFi hotspot.



    When client connects WAP2 negotiation succeeds, but dnsmasq consistently outputs the following errors.



    [ 2081.576809] DHCP[wlan0] - DISCOVER [TX][ 2081.580476] 
    [ 2081.582008] DHCP[wlan0] - DISCOVER [RX]
    dnsmasq-dhcp: no address range available for DHCP request via wlan0
    [ 2085.297432] DHCP[wlan0] - DISCOVER [TX][ 2085.301107]
    [ 2085.302630] DHCP[wlan0] - DISCOVER [RX]
    dnsmasq-dhcp: no address range available for DHCP request via wlan0


    These usually mean the configured range is incompatible with device settings.



    If this is the case I fail to understand why.



    My test dnsmaq.conf is very basic:



    root@imx8qxpa0tcuap:~# cat /etc/dnsmasq.conf 
    domain-needed
    bogus-priv
    interface=wlan0
    dhcp-range=192.168.207.20,192.168.207.50,12h


    ... and current net settings should be compatible:



    root@imx8qxpa0tcuap:~# ip addr show wlan0
    5: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP 0
    link/ether a0:cc:2b:a5:e0:05 brd ff:ff:ff:ff:ff:ff
    inet 192.168.207.1/32 scope global wlan0
    valid_lft forever preferred_lft forever
    inet6 fe80::a2cc:2bff:fea5:e005/64 scope link
    valid_lft forever preferred_lft forever
    root@imx8qxpa0tcuap:~# ip route
    192.168.207.0/24 dev wlan0 scope link


    Initial dnsmasq printouts show no problem:



    root@imx8qxpa0tcuap:~# dnsmasq -d
    dnsmasq: started, version 2.78 cachesize 150
    dnsmasq: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP DHCPy
    dnsmasq-dhcp: DHCP, IP range 192.168.207.20 -- 192.168.207.50, lease time 12h
    dnsmasq: reading /etc/resolv.conf
    dnsmasq: using nameserver 8.8.8.8#53
    dnsmasq: using nameserver 8.8.4.4#53
    dnsmasq: using nameserver 2001:4860:4860::8888#53
    dnsmasq: using nameserver 2001:4860:4860::8844#53
    dnsmasq: read /etc/hosts - 6 addresses


    What am I doing wrong?



    Note1: in this test setup the WiFi Hotspot goes nowhere (yet) only communication between client and Hotspot itself are supposed to work.



    Note2: the machine is a custom board (i.MX8) running a Yocto based distribution.










    share|improve this question























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I am trying to setup dnsmasq to act as DHCP server for a hostapd-based WiFi hotspot.



      When client connects WAP2 negotiation succeeds, but dnsmasq consistently outputs the following errors.



      [ 2081.576809] DHCP[wlan0] - DISCOVER [TX][ 2081.580476] 
      [ 2081.582008] DHCP[wlan0] - DISCOVER [RX]
      dnsmasq-dhcp: no address range available for DHCP request via wlan0
      [ 2085.297432] DHCP[wlan0] - DISCOVER [TX][ 2085.301107]
      [ 2085.302630] DHCP[wlan0] - DISCOVER [RX]
      dnsmasq-dhcp: no address range available for DHCP request via wlan0


      These usually mean the configured range is incompatible with device settings.



      If this is the case I fail to understand why.



      My test dnsmaq.conf is very basic:



      root@imx8qxpa0tcuap:~# cat /etc/dnsmasq.conf 
      domain-needed
      bogus-priv
      interface=wlan0
      dhcp-range=192.168.207.20,192.168.207.50,12h


      ... and current net settings should be compatible:



      root@imx8qxpa0tcuap:~# ip addr show wlan0
      5: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP 0
      link/ether a0:cc:2b:a5:e0:05 brd ff:ff:ff:ff:ff:ff
      inet 192.168.207.1/32 scope global wlan0
      valid_lft forever preferred_lft forever
      inet6 fe80::a2cc:2bff:fea5:e005/64 scope link
      valid_lft forever preferred_lft forever
      root@imx8qxpa0tcuap:~# ip route
      192.168.207.0/24 dev wlan0 scope link


      Initial dnsmasq printouts show no problem:



      root@imx8qxpa0tcuap:~# dnsmasq -d
      dnsmasq: started, version 2.78 cachesize 150
      dnsmasq: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP DHCPy
      dnsmasq-dhcp: DHCP, IP range 192.168.207.20 -- 192.168.207.50, lease time 12h
      dnsmasq: reading /etc/resolv.conf
      dnsmasq: using nameserver 8.8.8.8#53
      dnsmasq: using nameserver 8.8.4.4#53
      dnsmasq: using nameserver 2001:4860:4860::8888#53
      dnsmasq: using nameserver 2001:4860:4860::8844#53
      dnsmasq: read /etc/hosts - 6 addresses


      What am I doing wrong?



      Note1: in this test setup the WiFi Hotspot goes nowhere (yet) only communication between client and Hotspot itself are supposed to work.



      Note2: the machine is a custom board (i.MX8) running a Yocto based distribution.










      share|improve this question













      I am trying to setup dnsmasq to act as DHCP server for a hostapd-based WiFi hotspot.



      When client connects WAP2 negotiation succeeds, but dnsmasq consistently outputs the following errors.



      [ 2081.576809] DHCP[wlan0] - DISCOVER [TX][ 2081.580476] 
      [ 2081.582008] DHCP[wlan0] - DISCOVER [RX]
      dnsmasq-dhcp: no address range available for DHCP request via wlan0
      [ 2085.297432] DHCP[wlan0] - DISCOVER [TX][ 2085.301107]
      [ 2085.302630] DHCP[wlan0] - DISCOVER [RX]
      dnsmasq-dhcp: no address range available for DHCP request via wlan0


      These usually mean the configured range is incompatible with device settings.



      If this is the case I fail to understand why.



      My test dnsmaq.conf is very basic:



      root@imx8qxpa0tcuap:~# cat /etc/dnsmasq.conf 
      domain-needed
      bogus-priv
      interface=wlan0
      dhcp-range=192.168.207.20,192.168.207.50,12h


      ... and current net settings should be compatible:



      root@imx8qxpa0tcuap:~# ip addr show wlan0
      5: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP 0
      link/ether a0:cc:2b:a5:e0:05 brd ff:ff:ff:ff:ff:ff
      inet 192.168.207.1/32 scope global wlan0
      valid_lft forever preferred_lft forever
      inet6 fe80::a2cc:2bff:fea5:e005/64 scope link
      valid_lft forever preferred_lft forever
      root@imx8qxpa0tcuap:~# ip route
      192.168.207.0/24 dev wlan0 scope link


      Initial dnsmasq printouts show no problem:



      root@imx8qxpa0tcuap:~# dnsmasq -d
      dnsmasq: started, version 2.78 cachesize 150
      dnsmasq: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP DHCPy
      dnsmasq-dhcp: DHCP, IP range 192.168.207.20 -- 192.168.207.50, lease time 12h
      dnsmasq: reading /etc/resolv.conf
      dnsmasq: using nameserver 8.8.8.8#53
      dnsmasq: using nameserver 8.8.4.4#53
      dnsmasq: using nameserver 2001:4860:4860::8888#53
      dnsmasq: using nameserver 2001:4860:4860::8844#53
      dnsmasq: read /etc/hosts - 6 addresses


      What am I doing wrong?



      Note1: in this test setup the WiFi Hotspot goes nowhere (yet) only communication between client and Hotspot itself are supposed to work.



      Note2: the machine is a custom board (i.MX8) running a Yocto based distribution.







      dnsmasq hostapd






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Oct 4 at 10:11









      ZioByte

      18519




      18519




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          Your wlan0 interface network mask is wrong.



          -->>> 192.168.207.1/32



          A /32 network mask has 32 bits, 255.255.255.255 which is the whole IP address.



          You probably meant 192.168.207.0/24 e.g. 255.255.255.0 aka a C class network address. A /24 mask allows you to serve up to 254 IP addresses, from 192.168.207.1 to 192.168.207.254.






          share|improve this answer




















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f473188%2fsetting-up-dnsmaq-to-serve-dhcp-addresses-to-hostapd-hotspot%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            1
            down vote



            accepted










            Your wlan0 interface network mask is wrong.



            -->>> 192.168.207.1/32



            A /32 network mask has 32 bits, 255.255.255.255 which is the whole IP address.



            You probably meant 192.168.207.0/24 e.g. 255.255.255.0 aka a C class network address. A /24 mask allows you to serve up to 254 IP addresses, from 192.168.207.1 to 192.168.207.254.






            share|improve this answer
























              up vote
              1
              down vote



              accepted










              Your wlan0 interface network mask is wrong.



              -->>> 192.168.207.1/32



              A /32 network mask has 32 bits, 255.255.255.255 which is the whole IP address.



              You probably meant 192.168.207.0/24 e.g. 255.255.255.0 aka a C class network address. A /24 mask allows you to serve up to 254 IP addresses, from 192.168.207.1 to 192.168.207.254.






              share|improve this answer






















                up vote
                1
                down vote



                accepted







                up vote
                1
                down vote



                accepted






                Your wlan0 interface network mask is wrong.



                -->>> 192.168.207.1/32



                A /32 network mask has 32 bits, 255.255.255.255 which is the whole IP address.



                You probably meant 192.168.207.0/24 e.g. 255.255.255.0 aka a C class network address. A /24 mask allows you to serve up to 254 IP addresses, from 192.168.207.1 to 192.168.207.254.






                share|improve this answer












                Your wlan0 interface network mask is wrong.



                -->>> 192.168.207.1/32



                A /32 network mask has 32 bits, 255.255.255.255 which is the whole IP address.



                You probably meant 192.168.207.0/24 e.g. 255.255.255.0 aka a C class network address. A /24 mask allows you to serve up to 254 IP addresses, from 192.168.207.1 to 192.168.207.254.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Oct 4 at 10:17









                Rui F Ribeiro

                37k1273117




                37k1273117



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f473188%2fsetting-up-dnsmaq-to-serve-dhcp-addresses-to-hostapd-hotspot%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Bahrain

                    Postfix configuration issue with fips on centos 7; mailgun relay