This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

dhcp static mapping not working

version 9.353-4  on a sophos 220

we have dhcp scopes set  with the tick box   "Clients with static mappings only"

we have hosts defined in definitions and userss >network defintions 

the dhcp is giving out the ip addresses reserved for static hosts

so 2 problems

1. the rule static mappings only is not working

2. it is ignoring the static mappings also



This thread was automatically locked due to age.
  • Neil, unlike with Windows Server, the UTM's DHCP server does not make "reservations." You must make static assignments outside of the "Range" assigned dynamically by DHCP.

    Cheers - Bob

     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Is there a way to view which static mappings are active?  I was expecting to see them in the lease table but I guess as the mappings are defined outside the scope, it doesn't display.

    I can see in the log that DHCP is provisioning the correct ip to MAC, but I would like it listed in a table somewhere as to which ones are active.

    Maybe it is somewhere else?

    Thanks

  • If you want to confirm, just search the DHCP Server log for the IP or the MAC.

    Cheers - Bob

     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • I am getting these errors in my DHCP log files.

    2016:09:13-20:21:14 jh_home dhcpd: DHCPREQUEST for 10.254.254.166 from 34:23:87:e3:67:05 via eth0
    2016:09:13-20:21:14 jh_home dhcpd: DHCPACK on 10.254.254.166 to 34:23:87:e3:67:05 via eth0
    2016:09:13-20:21:14 jh_home dhcpd: Dynamic and static leases present for 10.254.254.166.
    2016:09:13-20:21:14 jh_home dhcpd: Remove host declaration REF_NetHosJennlaptop or remove 10.254.254.166
    2016:09:13-20:21:14 jh_home dhcpd: from the dynamic address pool for 10.254.254.0/24
    2016:09:13-20:21:14 jh_home dhcpd: uid lease 10.254.254.166 for client 34:23:87:e3:67:05 is duplicate on 10.254.254.0/24

    I use 10.254.254.2 - 10.254.254.254 for my DHCP pool.  I have created quite a few hosts by clicking on their DHCP lease and clicking on the "Make Static" button.  However, I am thinking that letting the static IP be part of the DHCP pool isn't what the UTM wants me to do (even though this is what the interface offers).  Do I need to change my DHCP Pool and then set static IPs for the "Hosts" that are outside of the Pool?

  • hi 

    as Bob said above - 

    Neil, unlike with Windows Server, the UTM's DHCP server does not make "reservations." You must make static assignments outside of the "Range" assigned dynamically by DHCP.

    as strange as it seems this is the way it works 

    the clients still even talk to the dhcp sever , even thought they dont get their assigment from it 

    example we have a wireless dhcp for BYOD devices , we manage this using mac addresses,  this way we never need to change the password 

    so in effect all entries are  static 

    10.254.254.2 - 10.254.254.254     in this example   i would set  a minimal scope   10.254.254.2-  10.254.254.20   say  then you assign the static addresses starting at 10.254.254.21 >    

    in the definition you still specify the dhcp scope , even thought the static ip is outside the scope

    i can confirm  this works - i dont not use the "make static"

    hope this helps

    neil

  • Bob,

    I am bit lost here. statement from you seems to be correct when I look at the DHCP log in the UTM. However, my client gets DHCP address anyway with static mapping in the UTM (pl see attached screenshot), even though its within the DHCP scope range (192.168.100.4-253). "Clients with static mapping only" option is ticked in the DHCP advanced option in the UTM.

     

     

    UTM IP: 192.168.100.1

    Client IP: 192.168.100.17 (static mapping in UTM DHCP server)

     

    From DHCP client log:

    ash@lt31113 ~ $ cat /var/log/syslog | grep DHCP
    Jan 16 15:35:39 lt31113 NetworkManager[4170]: <info>  [1484541336.4381] Using DHCP client 'dhclient'
    Jan 16 15:35:45 lt31113 dhclient[5994]: DHCPREQUEST of 192.168.100.7 on wlp4s0 to 255.255.255.255 port 67 (xid=0x1cb41713)
    Jan 16 15:35:45 lt31113 dhclient[5994]: DHCPACK of 192.168.100.7 from 192.168.100.1
    Jan 16 15:35:45 lt31113 dnsmasq[6004]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify
    Jan 16 20:28:47 lt31113 NetworkManager[4065]: <info>  [1484558927.6273] Using DHCP client 'dhclient'
    Jan 16 20:28:53 lt31113 dhclient[6074]: DHCPREQUEST of 192.168.100.7 on wlp4s0 to 255.255.255.255 port 67 (xid=0x37eb193d)
    Jan 16 20:28:53 lt31113 dhclient[6074]: DHCPACK of 192.168.100.7 from 192.168.100.1
    Jan 16 20:28:53 lt31113 dnsmasq[6084]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify

     

    From UTM log for the same client (which validate Bob's statement):

    2017:01:16-13:36:53 utm dhcpd: Dynamic and static leases present for 192.168.100.7.
    2017:01:16-13:36:53 utm dhcpd: Remove host declaration REF_NetHosBobbyiph4 or remove 192.168.100.7
    2017:01:16-13:36:53 utm dhcpd: from the dynamic address pool for 192.168.100.0/24
    2017:01:16-13:36:53 utm dhcpd: DHCPREQUEST for 192.168.100.7 from e4:b3:18:90:36:7f via eth0
    2017:01:16-13:36:53 utm dhcpd: DHCPACK on 192.168.100.7 to e4:b3:18:90:36:7f via eth0
    2017:01:16-15:35:44 utm dhcpd: Dynamic and static leases present for 192.168.100.7.
    2017:01:16-15:35:44 utm dhcpd: Remove host declaration REF_NetHosBobbyiph4 or remove 192.168.100.7
    2017:01:16-15:35:44 utm dhcpd: from the dynamic address pool for 192.168.100.0/24
    2017:01:16-15:35:44 utm dhcpd: DHCPREQUEST for 192.168.100.7 from e4:b3:18:90:36:7f via eth0
    2017:01:16-15:35:44 utm dhcpd: DHCPACK on 192.168.100.7 to e4:b3:18:90:36:7f via eth0


    How my client is getting IP address from the UTM DHCP server? Its a mystery!

    By the way, the reason I bumped into this post, is I am now unable to add host with static mapping either within or outside the DHCP range. I get an error message something like "Definitions & Users → Network Definitions:
    Removing 1 invalid element(s) '0800271194d6' from the list." 0800271194d6 is the mac address of the client I am trying to add. I tried with another mac address, and still the similar error message.
  • Ashabc, as neildonaldson repeated above, my first post here explains that "unlike with Windows Server, the UTM's DHCP server does not make "reservations." You must make static assignments outside of the "Range" assigned dynamically by DHCP."

    Your static assignment is inside the range of your DHCP server.

    Cheers - Bob

     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • I've just been faced with this exact same problem. I've been using "reservations" in the maner described by @Ashabc for over 10 years dating back to Astaro and have never expereinced this issue. The whole point of static mapping is that you are reserving addresses *that are contained within the DHCP pool for speficic hosts* to avoid having to set static IPs on them. This makes absolutely no sense and I have a really hard time beleiving Sophos (and Astaro back in the day) confgiured the DHCP to act otherwise not to mention I've been doing it this way for many many years. So why all of a sudden am I expereincing this? I'm going ot call support and ask the same question. No offense but I fear the answers provided here cannot be true.

  • My company first began installing the ASG (UTM) in 2003.  I began to pick it up from our lead engineer in 2004.  The DHCP server has always functioned like this - dynamic and static ranges instead of "reservations" like the Windows DHCP server.  If you haven't been troubled by this in the past, it's likely because you have very few devices.  Like virtually all of the functions of the UTM, Astaro took an open source service, hardened it and integrated it - the fundamental functioning of the way it did DHCP was not altered.

    Cheers - Bob

     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • I think we're getting caught up in terminology. I've been using utm since 99 and any "reservation" in the host definition simply by specifying the desired up would guarantee that address would go to that host as long as you entered the mac address. I even called Sophos this afternoon just to confirm. XG is different in that you cannot specify address from the pool but not the case for utm and it has always been that way. I have clients with 50+ nodes so it not because it's small networks.