Match based on Ralay Agent IP

Simon Hobson dhcp1 at
Fri May 7 13:30:29 UTC 2010

Pawel Warowny wrote:

>  > You mean, clients in the subnet should automatically
>>  get addresses in that subnet, and similarly with clients in the
>> subnet ? You don't do anything at all - just define the
>>  subnets and the DHCP server will take care of it autopmagically. SO
>>  all you need is :
>Thanks for reply, but the problem is a bit different.
>The _main_ IP address of my relay agent servers is not within the subnet
>I want to assign for clients and that's why your solution will not work.
>Relay Agent IP field in dhcp discover packet is and I
>want to assign for these requests ip address from subnet
>The same for relay agent ip and subnet

Then it's still automagic - you have a shared network so you define 
it like this :
shared-network "net1" {
   subnet netmask {
   subnet netmask {
     option routers ....
     pool {

That tells the DHCP server that the and 
networks are on the same wire, and it will take care of things for 
you. The other network is defined in the same way.

Simon Hobson

Visit 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