MAC address change

Simon Hobson dhcp1 at thehobsons.co.uk
Thu Nov 24 16:10:08 UTC 2011


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;
	}

-- 
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.



More information about the dhcp-users mailing list