MAC address change

Jan Markus markus.jan at seznam.cz
Fri Nov 25 15:17:49 UTC 2011


Dne 11/24/2011 05:10 PM, Simon Hobson napsal(a):
> Jan Markus wrote:
>
>> host customer101public {
>> hardware ethernet 00:11:22:33:44:55;
>> fixed-address 1.1.1.2;
>> }
>>
>> shared-network vlan101 {
>> subnet 10.0.0.0 netmask 255.255.255.248 {
>> range 10.0.0.2 10.0.0.6;
>> option routers 10.0.0.1;
>> }
>>
>> subnet 1.1.1.0 netmask 255.255.255.252 {
>> range 1.1.1.2;
>> option routers 1.1.1.1;
>> }
>> }
>>
>> Everything works all right. Now the customer wants to purchase a new server and he wants me to
>> remove public IP from his old server, until he will send me MAC address of the new one. So I just
>> changed MAC in the "host" declaration, restarted DHCP daemon (even removed leases file).
>>
>> But the old server is still "getting" the public IP address, or it is "keeping" it. How can I
>> specify in the dhcpd.conf, that this IP is no more for him, so he will lease address from the
>> 10.0.0.0/29 pool?
>
> Your config is wrong - you have made a VERY common mistake. You should NEVER have an address which
> is both in a pool and in a fixed address statement. Because the address is included in a pool it can
> be leased to any device - including the one you want to exclude.
>
> First step would be to remove the range statement as it isn't needed and is more likely to cause you
> problems.
>
> Doing that will be sufficient to prevent the server leasing that address.
>
> If you need to specifically prevent a device getting an address from a pool, you can add "deny
> booting" :
>
> host old-customer101public {
> hardware ethernet 00:11:22:33:44:55;
> deny booting;
> }
>

Thank you very much! That was it. I have finaly changed configuration to this:

host customer101public {
   hardware ethernet 00:11:22:33:44:55;
   fixed-address 1.1.1.2;
}

shared-network vlan101 {
   subnet 10.0.0.0 netmask 255.255.255.248 {
     option routers 10.0.0.1;
     pool {
       range 10.0.0.2 10.0.0.6;
       deny known-clients;
     }
   }

   subnet 1.1.1.0 netmask 255.255.255.252 {
     option routers 1.1.1.1;
   }
}


-Jan



More information about the dhcp-users mailing list