LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   ISC DHCP Server (https://www.linuxquestions.org/questions/linux-server-73/isc-dhcp-server-610625/)

gsuresh_01 01-02-2008 01:09 PM

ISC DHCP Server
 
Hai ,
Iam trying to test the DHCP server in linux.
Iam able to install and run the examples of assigning the IP addresses
to client based on range and pool entries.
My problem is that when i use DHCP option 82 for relay agent information for assigning IP addresses based on the option 82 fields.
They are agent.id and remote.id sub options for option 82.

Iam able to compare and check the agent.id and remote.id in class definitions as shown below. They are getting matched, based on the option 82 information received from the relay agent as shown below.

class MyNetWork {
match if agent.id == "eth1" ;
}


class MyPCNetwork {

match if remote.id == "SUBMAC"

}


subnet mysubnet {
pool {
allow members of MyNetWork
192.168.8.2 192.168.8.254
}

when doing the dhcp requests from clients, the packet is broadcasted to client with ip lease.


but when i need to check both the agent.id and remote.id in a single classs so that it can be used for holding the informaton. when i test the these classes for the option 82 information sub options and ethnic values and or combination of others, etc.

Problem
=======
when i

is there any one has code which can allot IP addresss statically to a network based on the network topology. FOr examples, the PC is connected in the port 1 of the Switch and is in turn connected to some other which is having relay agent, and from there to dhcp srver lan.
how can i write dhcpd.conf for checkig the two suboptions of option 82.

to put long story short,

how can use two conditions checks in single class
or

how can i check the both option 82 sub options inthe dhcp server so that i can assigne ip addresss based on iff agent.id = "eth1" and remote.id = "client1" .

Sorry for my english.

waiting for reply,


Suresh Guduru


All times are GMT -5. The time now is 12:27 PM.