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 questions...

Hi,

on my ASG110 6.202 I enabled dhcp service.
The range is 192.168.0.1 to 192.168.0.3 on the internal interface.
The 3 available IPs are reserved to 3 mac addresses.
So I believed that only the reserved devices can get the IP, instead the dhcp service gives the reserved IP addresses to any connected devices.

Why?


This thread was automatically locked due to age.
  • What you need to do is setup the DHCP server with fixed addressing information for each laptop.
    You set and address range for DHCP (dynamic) allocation tht is blocked in the firewall both proxy and filter. You assign the approved machines an ip address from outside the dynamic range (eg static) which has fixed MAC details against it, that way only approved laptops can get out into the www.
    This way you can easily manage the DHCP common fields from the ASTARO.
    The filer and proxy are easily managed by creating networh gruop of the 3 ip addresses and using that name in the approved (allowed) access and by default everyone else is blocked.

    You have total control as to who can and can't access the www.

    Ian M
  • Hi all,

    ok, I can set up all the tricks I want in the astaro but at the end of the day,
    I want to remark that the dhcp service doesn't work as it should.
    If I reserved an IP address to a specific MAC, I don't understand why astaro dhcp server provides this IP to another pc/notebook with a different MAC address.
  • So your saying that:

    your network for the internal is 192.168.0.0/24
    your IP for the interface is 192.168.0.254/32
    DHCP is turned on for the "internal" interface
    Your DHCP range start is 192.168.0.1
    Your DHCP range end is 192.168.0.4
    You are setting statics using an IP in the Range (Like the latest 6.202 manual instructs)
    Your Dynamics are pulling the address reserved for the Statics

    I remember having a similar problem sometime back... right or wrong, on the Astaros we manage that run DHCP, we have set the statics OUTSIDE the range (even though the doc reads you MUST set the statics inside the range) and seems to work fine... 

    Anyone know what the impact is by setting the statics outside the range vs. inside?  

    Another question though... are there any existing leases on the IP previous to it being used in a static map?
  • the existing leases have never been used in a static map.
    Instead some of the static map IPs at the begining were in the leases table...than they were converted to static.
  • Try this:  

    Delete your statics.

    If you want your range to be 192.168.1.10~192.168.1.15, set the range to something other than that... say, 192.168.1.16~192.168.1.20 (call this the TEST range).

    Disable, then re-enable the DHCP service from the gui...

    Make sure a client pulls from the new range... Also, check the lease table below and see if any old leases remain... (there is a post here about how to purge the DHCP lease table from the shell)

    Now, set your statics with addresses inside the range you WANT (192.168.1.10~15 in this example).  Now, see if they clients are getting the proper address.  If not, see paragraph above and make sure the lease table ONLY has leases in it for the TEST range.  

    I am not sure, but I seem to remember having a problem getting a static lease to pull IF the IP was still part of a dynamic lease...

    BTW... are you on 6.203?

    Maybe nothing to do with this, but I have noticed sometimes on XP, doing a "ipconfig /renew" does not always pull DHCP config changes... I disable then re-enable the interface if I am having an issue. check this article out about configuring how wintel DHCP clients behave (http://www.windowsitpro.com/Article/ArticleID/47131/47131.html)
  • Ok raburman,

    I'm using 6.203 anyway with your suggestions I can't deny the leasing of IP to the notebooks with MAC not present in static mapping.
    I want to give the IP address only to notebooks with authorized MAC.
  • I was told that static DHCP leases should be reserved OUTSIDE the DHCP range (on 5.x at least).

    Barry
  • From page 195 of the Astaro 6.2 Manual date 02-05-2006:
    2. In the Static Mappings window, make the following settings:
    MAC Address: In the MAC Address entry field, enter the MAC
    address of the network card. The MAC address must be entered
    as in the following example
    Example: 00:04:76:16:EA:62
    IP Address: Enter the IP address into this entry field. The
    address must be within the range specified by the Range Start
    and Range End options.

    Comment: In this entry field you can optionally enter a comment
    on a static mapping.

    (Maybe an Astaro typo?  within should be outside?)

    I did a test and I think I found your problem:

    I set up a range of 192.168.1.100~102

    I let 3 machines pull addresses and they all received IP's in order 102 first, then 101, and 100.  All macs appeared in the lease table.

    I then copied-pasted the macs, and created statics.  I even mixed them up...(gave different addresses other than what was originally leased - BUT STILL IN THE RANGE OF 100~102 (wanted to make sure they would get what was based on the new static and not on the old lease))

    Disabled/enabled the adapters on the workstations, and they all took their new static IP.

    So now all 3 addresses are used and there are none left in the range.

    I then brought up a fourth machine never seen by DHCP.  It requested an IP, and was given the last IP in the range (102).  Even though it was in use by a static lease... I then looked in the DHCP log:

    006:06:20-12:25:46 (none) dhcpd: Dynamic and static leases present for 192.168.1.102.
    2006:06:20-12:25:46 (none) dhcpd: Remove host declaration 192_168_1_102 or remove 192.168.1.102
    2006:06:20-12:25:46 (none) dhcpd: from the dynamic address pool for 192.168.1.0/24


    It appears that if there are no more IPs available in the range, it will start again at the top of the range, and assign that IP (regardless of a static map).  I don't know if this is by design or not...  This is why we set our statics outside the range on our Astaro's and created a definition for the dynamic range and called it "purgatory", then blocked all traffic from purgatory.  This still does not prevent an aggressive user from setting his IP manually by pinging for an available IP (unless you have ACL's somewhere).

    I guess you were expecting the DHCP server not to respond if there are no more IPs available?  I admit, that would be usefull.

    Again, I have no idea if this is the way it is designed to behave... anyone know?