change ip address every 6 hours

Glenn Satchell glenn.satchell at uniq.com.au
Wed Feb 15 12:58:50 UTC 2012


Each client knows its current address, and sends that in a renewal request.

To force the server to decline that address it has to be invalid. Deleting
the lease file doesn't help because the server will see the renewal, note
that there is nothing in the lease file that matches, so re-issue it.

Something like this perhaps:

# config 1
authoritative;
subnet 192.168.100.0 netmask 255.255.25.50 {
  range 192.168.100.2 192.168.100.127;
}

# config 2
authoritative;
subnet 192.168.100.0 netmask 255.255.25.50 {
  range 192.168.100.128 192.168.100.255;
}

Swap these configs and restart the server. All leases in the old range
will be deleted as they are no longer valid. When a client tries to renew
the old IP address will be invalid, so it  will start over and be assigned
a new address out of the new range.

For a 6 hour turnaround you probably want a lease time about 1-2 hours.

But as others have said, this is really a bad idea. If you want to
dis-allow services use a router access list in front of the clients and
block inbound traffic.

regards,
-glenn

> Hi,
>
> While reading this thread, I came up with a doubt. Said you have a range
> of
> addresses, 192.168.100.0/24 to be short. One possible config to serve this
> in dhcpd would be
>
> subnet 192.168.100.0 255.255.255.0 {
>
> range 192.168.100.2 192.168.100.254;
>
> more_stuff;
>
> }
>
> But I know that you can use more that one range of addresses on the same
> subnet, said:
>
> subnet 192.168.100.0 255.255.255.0 {
>
> pool { range 192.168.100.2 192.168.100.63; more_stuff; }
> pool { range 192.168.100.64 192.168.100.127; more_stuff; }
> pool { range 192.168.100.128 192.168.100.191; more_stuff; }
> pool { range 192.168.100.192 192.168.100.254; more_stuff; }
>
> }
>
> So, my doubt is if using one way or another would change the way dhcpd
> distributes the addresses, assuming that there is no rule to bind any
> hardware address to any address, and all other parameters (e.g. lease
> time)
> are very same.
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users





More information about the dhcp-users mailing list