Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

As the question title states, I want to classify my clients based on the interface their requests are coming from. Can this be done with normal matching?

Or should I restrict the DHCP server to only one interface and have dhcrelay listening on the others?

I'm really not sure if this is possible since I don't have much experience with dhcpd configuration so any advice is appreciated.

Clarification:

The DHCP server has multiple virtual interfaces (i.e eth0.1, eth0.2, etc) each on a different VLAN. The client's requests arrive as unicast (through a dhcp relay) to each of those interfaces depending on the VLAN they're coming from.

share|improve this question
1  
Please clarify, are you saying your DHCPD server has multiple interfaces or that your clients are coming from multiple subnets that are remote to the DHCPD server? –  SpacemanSpiff Jul 4 '12 at 3:13
    
@SpacemanSpiff I've edited my question for clarification. –  kirbuchi Jul 4 '12 at 3:21
    
Can you please draw a diagram of your environment? –  SpacemanSpiff Jul 4 '12 at 14:24

1 Answer 1

When a router or other device relays a DHCP request, it sends along with it the subnet information of the interface that it received the request on. In other words, the point of relay is that your DHCP server does not need an interface on each VLAN to serve multiple subnets.

Are you trying to override that behavior and issue an IP address in a different subnet then is on the interface?

Maybe someone can clarify, but I believe if you have it listening on all those interfaces, it will issue an IP from the subnet which is configured on that interface.

share|improve this answer
    
What I currently do is assign IPs based on the subnet the request is coming from, for example: subnet 10.154.214.0 netmask 255.255.255.224 {range 10.154.214.2 10.154.214.30;} Since in some cases I'll have the same IPs on two different interfaces I want to find a way to differentiate based on the interface the request arrived to. –  kirbuchi Jul 4 '12 at 3:37
    
And yes, I'm trying to issue an IP in a different subnet than is on hte interface. –  kirbuchi Jul 4 '12 at 3:44
2  
"Since in some cases I'll have the same IPs on two different interfaces" -- stop doing that and all will be well. –  womble Jul 4 '12 at 5:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.