Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Some hosts are not registred in my DNS domain by DHCP server

    Scheduled Pinned Locked Moved DHCP and DNS
    13 Posts 2 Posters 3.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      papou
      last edited by

      HI All,

      I have a strange things that i do not understant with my pfsense 2.1.4.
      I have a DHCP server with Enable registration of DHCP client names in DNS. tagged and a DNS domain "home"

      For some host set in dhcp server, i can ping hostname.home and for some hostname.home is unknown

      /var/dhcpd/etc/dhcpd.conf : [extract]

      option domain-name "home";
      option ldap-server code 95 = text;
      option domain-search-list code 119 = text;

      default-lease-time 7200;
      max-lease-time 86400;
      log-facility local7;
      one-lease-per-client true;
      deny duplicates;
      ping-check true;
      authoritative;
      subnet 192.168.0.0 netmask 255.255.255.0 {
              pool {
                      ddns-update-style interim;
                      range 192.168.0.31 192.168.0.245;
              }

      option routers 192.168.0.1;
              ddns-domainname "home";
              option domain-name-servers 192.168.0.1;

      }
      host s_lan_0 {
              hardware ethernet 10:bf:XX:XX:XX:XX;
              fixed-address 192.168.0.2;
              option host-name "WAVE2";
      }
      ….
      host s_lan_23 {
              hardware ethernet b8:27:XX:XX:XX:XX;
              fixed-address 192.168.0.26;
              option host-name "raspdio";
      }
      ddns-update-style interim;
      zone home {
              primary XX.XX.0.1;
              secondary XX.XX.0.2;
      }
      zone 168.192.in-addr.arpa {
              primary XX.XX.0.1;
              secondary XX.XX.0.2;
      }

      more /etc/resolv.conf

      domain home
      nameserver 127.0.0.1
      search numericable.fr
      nameserver XX.XX.0.1
      nameserver XX.XX.0.2

      When doing ping from pfsense :
      [2.1.4-RELEASE][admin@beastie.home]/var/dhcpd/etc(4): ping wave2.home
      PING wave2.home (192.168.0.2): 56 data bytes

      => All is OK ! ;D
      –- wave2.home ping statistics ---
      2 packets transmitted, 0 packets received, 100.0% packet loss
      [2.1.4-RELEASE][admin@beastie.home]/var/dhcpd/etc(5): ping raspdio.home
      PING raspdio.home.numericable.fr (MYWANIP): 56 data bytes
      => Not working. My home domain is not used, but instead numericable.fr so it use my @WANIP :-\

      Do you have any clue? :o

      Thank you

      Papou

      1 Reply Last reply Reply Quote 0
      • johnpozJ
        johnpoz LAYER 8 Global Moderator
        last edited by

        question, why do you have this?

        search numericable.fr
        nameserver XX.XX.0.1
        nameserver XX.XX.0.2

        You can validate what dhcp hosts that pfsense would find via the entries in the host file.

        example
        on pfsense look at /etc/hosts - scroll to the bottom and you should see stuff like this for your dhcp clients

        dhcpleases automatically entered

        192.168.1.214  sp-vm.local.lan sp-vm          # dynamic entry from dhcpd.leases
        192.168.2.212  Johns-Phone.local.lan Johns-Phone              # dynamic entry from dhcpd.leases
        192.168.2.215  Kims-Phone.local.lan Kims-Phone        # dynamic entry from dhcpd.leases
        192.168.2.211  Chromecast.local.lan Chromecast        # dynamic entry from dhcpd.leases
        192.168.2.213  android-497a3c8329e0a007.local.lan android-497a3c8329e0a007            # dynamic entry from dhcpd.leases

        An intelligent man is sometimes forced to be drunk to spend time with his fools
        If you get confused: Listen to the Music Play
        Please don't Chat/PM me for help, unless mod related
        SG-4860 24.11 | Lab VMs 2.7.2, 24.11

        1 Reply Last reply Reply Quote 0
        • P
          papou
          last edited by

          Hi Johnpoz,

          First of all : Thank you for your reply.

          Concerning my resolv.conf file:
          I do not know where search numericable.fr come from (numericable.fr is the domain name of my provider but i did not enter it somewhere)

          nameserver XX.XX.0.1
          nameserver XX.XX.0.2
          are my Provider DNS server

          In my /etc/hosts i have only some of my dhcp hosts

          192.168.0.1    beastie.home beastie
          192.168.0.7    ebox.home ebox
          192.168.0.23    RaspBureau.home RaspBureau
          192.168.0.22    RaspSalon.home RaspSalon
          192.168.0.7    vpnebox.dyndns.org vpnebox
          192.168.0.7    www.papou.info www
          192.168.0.7    wanebox.dyndns.org wanebox
          192.168.0.2    wave.home wave
          192.168.0.2    wave2.home wave2

          But many are missing : I have arround 30 hosts in my home (i know : i am IP addict…  ::)

          Do you know what can be the problem ? Why some are registred and some not ?  :o

          1 Reply Last reply Reply Quote 0
          • johnpozJ
            johnpoz LAYER 8 Global Moderator
            last edited by

            did those entries have  # dynamic entry from dhcpd.leases after them?

            Where they under this section heading

            dhcpleases automatically entered

            Those just look like entries that came from host over ride, did you manually put them in?

            One we verify that auto entries are being put in from leases - then we can figure out why some are specific host is not working.

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 24.11 | Lab VMs 2.7.2, 24.11

            1 Reply Last reply Reply Quote 0
            • P
              papou
              last edited by

              Hi,

              I confirm that this is my full /etc/hosts file and i did not put anything manually.

              The date of last update of the file :

              [2.1.4-RELEASE][admin@beastie.home]/var/etc(8): ls -la /var/etc/hosts
              -rw-r–r--  1 root  wheel  338 Aug  1 02:22 /var/etc/hosts

              This is strange !

              I did not tag for each hosts : Enable registration of DHCP client names in DNS. But only of the DHCP server Main configuration. Should I do this for each hosts ? But when i look WAVE2 for example, the tag is not set in the hosts configuration and it has an entry in /hosts…

              1 Reply Last reply Reply Quote 0
              • johnpozJ
                johnpoz LAYER 8 Global Moderator
                last edited by

                what?  What do you not understand about - is that there or not?

                dhcpleases automatically entered

                Look at attached, I am not talking about you manually editing the host file or host configuration of registration - did you put in anything in the over rides - see 2nd pic

                Also keep in mind "If this option is set, then machines that specify their hostname when requesting a DHCP lease will be registered in the DNS forwarder, so that their name can be resolved."

                This is why its good idea to track down a specific machine and figure out why.  And easy enough to have it release and renew while sniffing to see if it sends hostname, etc.  Also did you check the box for static dhcp registration as well in the dns forwarder section?  Do you have dhcp reservation "static" set for some machine in your dhcp server?

                hosts.png
                hosts.png_thumb
                overrides.png
                overrides.png_thumb

                An intelligent man is sometimes forced to be drunk to spend time with his fools
                If you get confused: Listen to the Music Play
                Please don't Chat/PM me for help, unless mod related
                SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                1 Reply Last reply Reply Quote 0
                • P
                  papou
                  last edited by

                  Hi,

                  [2.1.4-RELEASE][admin@beastie.home]/root(1): cat /etc/hosts
                  127.0.0.1 localhost localhost.home
                  192.168.0.1 beastie.home beastie
                  192.168.0.7 ebox.home ebox
                  192.168.0.23 RaspBureau.home RaspBureau
                  192.168.0.22 RaspSalon.home RaspSalon
                  192.168.0.7 vpnebox.dyndns.org vpnebox
                  192.168.0.7 www.papou.info www
                  192.168.0.7 wanebox.dyndns.org wanebox
                  192.168.0.2 wave.home wave
                  192.168.0.2 wave2.home wave2

                  I confirm you that i have never modified this file manualy and there is no entry # dhcpleases automatically entered (see attached file)

                  Effectivelly i have entered a long time ago some hosts in hosts overide because it was not registered my dhcp host… (see attached file and sorry not to have mentioned that  :-[)

                  I have also put my DHCP configuration and a sample of a static hosts.
                  As mentioned i have also try with check box "Enable registration of DHCP client names in DNS" with home as Domain on a static hosts but it does not work (no # dhcpleases automatically entered in my /etc/hosts after aplaying change) .
                  And for me as it is set in main DHCP configuration :  it should do it for all my hosts (static or dynamic) . Am i wrong ? Or it should be set for each static hosts ?  ???

                  But i have also non static hosts and it is not working too.... no entry in /etc/hosts :o Why ?

                  Hosts.jpg
                  Hosts.jpg_thumb
                  ![DHCP 1.jpg](/public/imported_attachments/1/DHCP 1.jpg)
                  ![DHCP 1.jpg_thumb](/public/imported_attachments/1/DHCP 1.jpg_thumb)
                  ![DHCP 2.jpg](/public/imported_attachments/1/DHCP 2.jpg)
                  ![DHCP 2.jpg_thumb](/public/imported_attachments/1/DHCP 2.jpg_thumb)
                  DHCP3.jpg
                  DHCP3.jpg_thumb
                  ![Hosts Overrides.jpg](/public/imported_attachments/1/Hosts Overrides.jpg)
                  ![Hosts Overrides.jpg_thumb](/public/imported_attachments/1/Hosts Overrides.jpg_thumb)
                  ![Static DHCP Mapping.jpg](/public/imported_attachments/1/Static DHCP Mapping.jpg)
                  ![Static DHCP Mapping.jpg_thumb](/public/imported_attachments/1/Static DHCP Mapping.jpg_thumb)

                  1 Reply Last reply Reply Quote 0
                  • johnpozJ
                    johnpoz LAYER 8 Global Moderator
                    last edited by

                    and the one screen shot that would be of actual use your not showing ;)

                    dnsforwarder.png
                    dnsforwarder.png_thumb

                    An intelligent man is sometimes forced to be drunk to spend time with his fools
                    If you get confused: Listen to the Music Play
                    Please don't Chat/PM me for help, unless mod related
                    SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                    1 Reply Last reply Reply Quote 0
                    • P
                      papou
                      last edited by

                      YES ! That's it !

                      Effectively as you can see the option : Register DHCP leases in DNS forwarder and Register DHCP static mappings in DNS forwarder where not tagged ! :'(

                      After having tagged them and cleaning useless hosts in DNS forwarder,  my hosts file is now full of all my static and dynamic hosts !
                      Effectivelly my configuration was not consistant between DHCP server and DNS Forwarder.  :o

                      Many thank for your skills and your patience Johnpoz ! :D

                      Papou

                      ![DNS Forwarder Before.jpg](/public/imported_attachments/1/DNS Forwarder Before.jpg)
                      ![DNS Forwarder Before.jpg_thumb](/public/imported_attachments/1/DNS Forwarder Before.jpg_thumb)
                      ![Hosts After.jpg](/public/imported_attachments/1/Hosts After.jpg)
                      ![Hosts After.jpg_thumb](/public/imported_attachments/1/Hosts After.jpg_thumb)

                      1 Reply Last reply Reply Quote 0
                      • johnpozJ
                        johnpoz LAYER 8 Global Moderator
                        last edited by

                        Glad you got it sorted - so you have a popcorn player as well, curious what model - I have A110, that has been running for years!  Best little device, use it every day..  Seems you got lots of raspberry pis in all places of the house – what you do with those?  I have one as well, its currently not doing much other than a shell I can get into - keep meaning to hook up gps  I have sitting in box and turn it into my stratum 1 time server..

                        But seems you have them in many rooms - record temp, control lights? Video?

                        I am curious sort - sorry ;)

                        An intelligent man is sometimes forced to be drunk to spend time with his fools
                        If you get confused: Listen to the Music Play
                        Please don't Chat/PM me for help, unless mod related
                        SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                        1 Reply Last reply Reply Quote 0
                        • P
                          papou
                          last edited by

                          Hi,

                          Effectively i have popcorn A110 & A200. But now they are switched off to be replaced by some Raspberry PI with XBMC . Work quiet well with definitevely a better interface than popcorn. I am a big fan of XBMC !
                          I also use raspberry pi to remote control temp of room and freezer, detect water flow with flowmeter, and also remote control powerplug using DI-O protocol. It's a funny way of doing some electronic stuff without doing to much math… My IT engineer background is coming back....
                          ;)
                          Papou

                          1 Reply Last reply Reply Quote 0
                          • johnpozJ
                            johnpoz LAYER 8 Global Moderator
                            last edited by

                            I have never had a problem with the A110 interface - I like the listing, easy to navigate - quick.  While the picture of the movie box and all that is slick and all.  Don't really see the purpose - I have my videos in folders TV shows and Movies, And a watch folder where I put my new stuff - as I watch it move it over to specific folder, etc.

                            I have played with xmbc on the pi - and while it does work.  And if my popcorn died I could see using that - one big thing for me is the lack of component and hdmi out like the A110 - I send the video to other rooms via component and watch on the main tv via hdmi.  So simple push of button and I can watch the popcorn in all rooms of the house, etc.

                            Thanks for info - curious the need to control temp in freezer.  I set mine to -5 on the digital control on the front, and there you go ;)  As to flowmeter are you tracking water usage which would be cool as shit!!  Or are you using it a flooding sensor to turn on say sump pump or something..  If using it to measure the water usage in your house I would be very interested in that!!!

                            An intelligent man is sometimes forced to be drunk to spend time with his fools
                            If you get confused: Listen to the Music Play
                            Please don't Chat/PM me for help, unless mod related
                            SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                            1 Reply Last reply Reply Quote 0
                            • P
                              papou
                              last edited by

                              Hi, (Sorry for late answer)

                              In a popcorn without HDD, the interface is very light and not customizable. As my linux server is acting as NAS :  i prefer XBMC on raspberry with a 4gb SD in it, as i can fully customize it.
                              Regarding the freezer : As it is in the cellar , in case of bad closed door, i cannot hear the alarm. (it append one time and i through away 300€ of foods… ) The purpose of the rasp is to call me (via my alarm module) or send SMS (not implemented yes, but i will use a 3G modem stick)
                              For the flowmeter, it is also acting as an alarm system in case of a leakage of my Culligan (It already appened to me. A problem with a ring as generated a high water consumption) I am now detecting the leak when some water, normaly used to clean the tank two time a month, go away continuously to the sewage...)

                              1 Reply Last reply Reply Quote 0
                              • First post
                                Last post
                              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.