DHCP server unable to assign fixed address in a DHCP relay setup

Comandini, Gianluca Gianluca_Comandini at alliedtelesis.com
Fri Jun 26 10:53:14 UTC 2009


Hi All,

This is my first post on this list, hope someone can help me with this strange DHCP server behavior.
I have got a lab which simulates an ADSL service provider network. My network is something like this:

CPEs (HAG)-----------DSLAM(DHCP relay)----------Router--------DHCP Server
Sub 192.168.x.x           Sub 172.30.1.x                                                Sub 192.168.x.x

I'm able to setup my DHCP Server to correctly assign ip addresses to the CPEs, with an intermediary DHCP relay in the middle. My dhcp server is a linux PC (Fedora 10: 2.6.27.5-117.fc10.i686) with isc-dhcpd-4.0.0 package.
But this is just working if I set the DHCP Server to assign ip-addresses in a range (for example range 192.168.2.10 192.168.2.50). When I'm trying to assign a fixed address to a single CPE, for example with the statements:
host  {
            hardware ethernet 00:0d:da:00:28:1d;
            fixed-address 192.168.2.51;
              }
This is not working. All subnets 192.168.2.x, 192.168.3.x and 192.168.4.x get the same ip address on the subnet 192.168.2.x and the CPE is reporting an ip-address overlapping error.
It seem that DHCP server is not able to correctly match the agent.remote-id and agent.circuit-id of the incoming DHCP packet and select the correct fixed address to serve all subnets with the correct fixed address.
If I remove the host and fixed-address statements all is working fine and each CPE could have all his subnets correctly served with a correct ip-address. So the issue is just when trying to assign a static fixed address.
Here is my DHCP.conf file in the non working case:

ddns-update-style none;

class "MAP-MGMT" {
match if (substring (option agent.remote-id,0,3)="NE1") and (substring (option agent.circuit-id,2,1)="\x00\x66");
}

class "MAP-Voip" {
match if (substring (option agent.remote-id,0,3)="NE1") and (substring (option agent.circuit-id,2,1)="\x00\x67 ");
}

class "MAP-Data" {
match if (substring (option agent.remote-id,0,3)="NE1") and (substring (option agent.circuit-id,2,1)="\x00\x68");
}

class "MAP-Video" {
match if (substring (option agent.remote-id,0,3)="NE1") and (substring (option agent.circuit-id,2,1)="\x00\x69");
}

shared-network NE1 {
subnet 192.168.8.0 netmask 255.255.255.0 {}
#******************************************************************
#MANAGEMENT subnet 192.168.2.0 (netmask 255.255.255.0) configuration
#this subnet belongs to vlan 102
#******************************************************************
subnet 192.168.2.0 netmask 255.255.255.0 {


    option subnet-mask 255.255.255.0;
    max-lease-time 6000;
    default-lease-time 6000;

    pool {
              range 192.168.2.10 192.168.2.50;
              host RG613LH-2 {
            hardware ethernet 00:0d:da:00:28:1d;
            fixed-address 192.168.2.51;
              }
              host iMG634A-R2-ADSL-2 {
            hardware ethernet 00:0d:da:0b:49:c9;
            fixed-address 192.168.2.52;
              }
                        allow members of "MAP-MGMT";
            }
}
#******************************************************************
#VOIP subnet 192.168.3.0 (netmask 255.255.255.0) configuration
#this subnet belongs to vlan 103
#******************************************************************
subnet 192.168.3.0 netmask 255.255.255.0 {


    option subnet-mask 255.255.255.0;
    max-lease-time 6000;
    default-lease-time 6000;

    pool {
            range 192.168.3.10 192.168.3.50;
              host RG613LH-3 {
            hardware ethernet 00:0d:da:00:28:1d;
            fixed-address 192.168.3.51;
              }
              host iMG634A-R2-ADSL-3 {
            hardware ethernet 00:0d:da:0b:49:c9;
            fixed-address 192.168.3.52;
              }
           allow members of "MAP-Voip";
            }
}

#******************************************************************
#DATA subnet 192.168.4.0 (netmask 255.255.255.0) configuration
#this subnet belongs to vlan 104
#******************************************************************
subnet 192.168.4.0 netmask 255.255.255.0 {


    option subnet-mask 255.255.255.0;
    max-lease-time 6000;
    default-lease-time 6000;

    pool {
            range 192.168.4.10 192.168.4.50;
              host RG613LH-4 {
            hardware ethernet 00:0d:da:00:28:1d;
            fixed-address 192.168.4.51;
              }
              host iMG634A-R2-ADSL-4 {
            hardware ethernet 00:0d:da:0b:49:c9;
            fixed-address 192.168.4.52;
              }
            allow members of "MAP-Data";
            }
}

#******************************************************************
#VIDEO subnet 192.168.5.0 (netmask 255.255.255.0) configuration
#this subnet belongs to vlan 105
#******************************************************************
subnet 192.168.5.0 netmask 255.255.255.0 {


    option subnet-mask 255.255.255.0;
    max-lease-time 6000;
    default-lease-time 6000;

    pool {
            range 192.168.5.10 192.168.5.50;
              host RG613LH-5 {
            hardware ethernet 00:0d:da:00:28:1d;
            fixed-address 192.168.5.51;
              }
              host iMG634A-R2-ADSL-5 {
            hardware ethernet 00:0d:da:0b:49:c9;
            fixed-address 192.168.5.52;
              }
            allow members of "MAP-Video";
            }
}
}


To have the working fine case it's enough to remove the hosts declarations:


ddns-update-style none;

class "MAP-MGMT" {
match if (substring (option agent.remote-id,0,3)="NE1") and (substring (option agent.circuit-id,2,1)="\x00\x66");
}

class "MAP-Voip" {
match if (substring (option agent.remote-id,0,3)="NE1") and (substring (option agent.circuit-id,2,1)="\x00\x67 ");
}

class "MAP-Data" {
match if (substring (option agent.remote-id,0,3)="NE1") and (substring (option agent.circuit-id,2,1)="\x00\x68");
}

class "MAP-Video" {
match if (substring (option agent.remote-id,0,3)="NE1") and (substring (option agent.circuit-id,2,1)="\x00\x69");
}

shared-network NE1 {
subnet 192.168.8.0 netmask 255.255.255.0 {}
#******************************************************************
#MANAGEMENT subnet 192.168.2.0 (netmask 255.255.255.0) configuration
#this subnet belongs to vlan 102
#******************************************************************
subnet 192.168.2.0 netmask 255.255.255.0 {


    option subnet-mask 255.255.255.0;
    max-lease-time 6000;
    default-lease-time 6000;

    pool {
              range 192.168.2.10 192.168.2.50;
            allow members of "MAP-MGMT";
            }
}
#******************************************************************
#VOIP subnet 192.168.3.0 (netmask 255.255.255.0) configuration
#this subnet belongs to vlan 103
#******************************************************************
subnet 192.168.3.0 netmask 255.255.255.0 {


    option subnet-mask 255.255.255.0;
    max-lease-time 6000;
    default-lease-time 6000;

    pool {
            range 192.168.3.10 192.168.3.50;
           allow members of "MAP-Voip";
            }
}

#******************************************************************
#DATA subnet 192.168.4.0 (netmask 255.255.255.0) configuration
#this subnet belongs to vlan 104
#******************************************************************
subnet 192.168.4.0 netmask 255.255.255.0 {


    option subnet-mask 255.255.255.0;
    max-lease-time 6000;
    default-lease-time 6000;

    pool {
            range 192.168.4.10 192.168.4.50;
            allow members of "MAP-Data";
            }
}

#******************************************************************
#VIDEO subnet 192.168.5.0 (netmask 255.255.255.0) configuration
#this subnet belongs to vlan 105
#******************************************************************
subnet 192.168.5.0 netmask 255.255.255.0 {


    option subnet-mask 255.255.255.0;
    max-lease-time 6000;
    default-lease-time 6000;

    pool {
            range 192.168.5.10 192.168.5.50;
            allow members of "MAP-Video";
            }
}
}


I thank you in advance for all your replies and if you need more details and information don't hesitate to ask me.

Best Regards
Gianluca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20090626/f384f3b4/attachment.html>


More information about the dhcp-users mailing list