two interfaces, same range

Mike Schmidt mike at sepia.com
Wed Jul 4 16:33:24 UTC 2007


I suppose if you had no other choice, and really really had to do that, 
you could try something like this:

Use iptables to intercept the inbound dhcp broadcasts from each 
interface and send them to different ports (assuming you have the 
bridge-netfilter stuff installed)
This would essentially kill the broadcast (well, grab it, anyway). I 
think. The dhcp experts might want to comment.
Then run a separate copy of dhcp-relay on each port, setting relay-id to 
a different id for each  port
Then classify dhcp requests by relay-id.

I haven't tried this, it's just an idea. But it sounds feasible to me.
If you don't understand the method above, please don't try it. I would 
consider it a hack. I don't know anything about debian, though, so 
caveat emptor

To any purists out there, sorry, I shouldn't have mentioned it. If it 
works, though, it would allow us to tie-in netfilter rules to dhcp ranges.

Mike

Simon Hobson wrote:
> mateus wrote:
>
>   
>> i have a server with two interfaces, each interface is conected with a
>> different switch, i need to do this:
>> eth0 - range 192.168.0.10 192.168.0.100
>> eth1 - range 192.168.0.110 192.168.0.200
>>
>> how can i do this? im using debian 4
>>     
>
>
> I assume you have one subnet (192.168.0.0/24) and your server is 
> configured as a bridge. If you aren't running as a bridge then I 
> believe you would have an invalid network configuration.
>
> Unfortunately, as far as I know there is no way to allocate addresses 
> as you wish. I don't think there is anything in the inbound packet to 
> identify the interface, and the interface isn't available as a 
> parameter to use in a match statement.
>
>
> Incidentally, for those more familiar with the implementation (David 
> ?). How does the server deal with a bridge setup, does it have the 
> ability to look at a bridge the interface is a member of to find the 
> IP address and so select the right subnet, or does it require the 
> interface to have an IP ?
>   


More information about the dhcp-users mailing list