DHCP and multiple VLANs

Simon Hobson dhcp1 at thehobsons.co.uk
Mon Oct 13 17:04:25 UTC 2008


<santi at usansolo.net> wrote:

>There are near about 20 vlans and I'm *not giving IP address to those vlan
>interfaces*, example:
>
>(..)
>auto vlan101
>iface vlan101 inet static
>         address 0.0.0.0
>         netmask 0.0.0.0
>         vlan_raw_device eth0
>
>auto vlan102
>iface vlan102 inet static
>         address 0.0.0.0
>         netmask 0.0.0.0
>         vlan_raw_device eth0
>(..)
>
>I start dhcpd3 listening on all interfaces, and I can't see DHCP request in
>the logs.. but I can see requests without problems using tcpdump :-/
>
>If I setup a IP for each vlanXXX interface dhcpd3 works OK; but, there's no
>way to prevent giving one IP to each vlan interface in the Linux box?

No, it will NOT work unless the server has a *VALID* IP address on 
each subnet that you want it to consider local. Not only will the 
DHCP server not work, but neither will routing of regular unicast IP 
packets which is also required for DHCP to work past the initial 
handshake.


You need to ensure that you have two conditions met :

1) You can route normal IP traffic between clients and server.

2) The server is directly connected to a subnet (and has a valid IP 
for it) OR there is a relay agent on the remote subnet.


More information about the dhcp-users mailing list