Match based on Ralay Agent IP

Simon Hobson dhcp1 at thehobsons.co.uk
Fri May 7 13:30:29 UTC 2010


Pawel Warowny wrote:

>  > You mean, clients in the 192.168.100.0 subnet should automatically
>>  get addresses in that subnet, and similarly with clients in the
>>  192.168.200.0 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 10.0.1.1 and I
>want to assign for these requests ip address from subnet
>192.168.100.0/24.
>The same for relay agent ip 10.0.2.1 and subnet 192.168.200.0/24.

Then it's still automagic - you have a shared network so you define 
it like this :
shared-network "net1" {
   subnet 192.168.1.0 netmask 255.255.255.0 {
   }
   subnet 192.168.100.0 netmask 255.255.255.0 {
     option routers ....
     pool {
       range 192.168.100.2 192.168.100.254;
     }
   }
}

That tells the DHCP server that the 192.168.1.0 and 192.168.100.0 
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 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