DHCP and multiple VLANs

Glenn Satchell Glenn.Satchell at uniq.com.au
Mon Oct 13 12:34:47 UTC 2008


>Date: Mon, 13 Oct 2008 13:59:44 +0200
>From: <santi at usansolo.net>
>To: dhcp-users at isc.org
>Subject: Re: DHCP and multiple VLANs
>X-RelayOut-Watermark: 1224503986.62858 at r6DukA+nYKjWuoLFk0oD5Q
>X-RelayOut-Information: AntiSPAM and AntiVIRUS on relayout01
>X-RelayOut: Found to be clean
>X-RelayOut-SpamCheck: no es spam, SpamAssassin (no almacenado, puntaje=0, 
requerido 6.5)
>X-RelayOut-From: santi at usansolo.net
>X-archive-position: 7232
>X-ecartis-version: Ecartis v1.0.0
>X-original-sender: santi at usansolo.net
>List-software: Ecartis version 1.0.0
>X-List-ID: <dhcp-users.isc.org>
>X-list: dhcp-users
>
>Dear Glenn.
>
>> There's two possible solutions here.
>> 
>> The first one you have worked out - have multiple vlans visible on the
>> dhcp server. dhcp requires an IP address on each subnet so that it can
>> match up the subnet definition in dhcpd.conf to an interface where
>> requests are coming in.
>> 
>> The second way to do this is to have only a single vlan configured on
>> the dhcpd server. Then use the router or switch as the dhcp-relay to
>> forward requests from each vlan to the dhcp server. In a Cisco router
>> or switch this is ip-helper.
>> 
>> In both cases dhcpd.conf would be very similar, it's just the way the
>> requests get to dhcpd that differs.
>
>Thanks for the help, it could be posible to make this using "dhcp3-relay"
>package?
>
>dhcp3-relay listening on all interfaces and dhcpd3 listening only in a
>dummy interface?
>
>Perhaps dhcp3-relay can forward all request to the dummy iface? I don't
>want to "waste" more IPs in vlan interfaces :-/

dhcrelay also needs to have an IP address for each interface, because
it is the ip address of the interface where the discover arrives that
is added to the packet as the gateway interface address (giaddr). This
is how dhcpd knows what subnet a relayed request is for.

Nearly all switches or routers can can act as a dhcp relay.

dhcpd needs to listen on a physical broadcast based interface, so
tricks like binding to loopbacks, etc, are guaranteed to be difficult,
or not work at all. dhcpd and dhcrelay need to be able to create raw
sockets to transmit dhcp packets.

regards,
glenn



More information about the dhcp-users mailing list