DHCP on VLAN
Simon Hobson
dhcp1 at thehobsons.co.uk
Sat Feb 24 17:10:34 UTC 2007
Kenneth Ling wrote:
>so did the dhcp server need to have all vlan IP ?
See below
>eg.
>assume my vlan ip are
>192.168.1.0/24
>192.168.2.0/24
>192.168.3.0.24
>and my dhcp server is 192.168.100.100/24
>do i need to configure 192.168.1.1/24, 192.168.2.1/24 in the dhcp server ,
>and the cisco
Simple answer - we don't and CANNOT know the answer to that since we
don't know what your network is set up like ! However, I'll have a
guess at two likely configs and you can correct me if I'm wrong ...
config 1
I'm assuming that you have a port on the switch configured as a trunk
port, and this is connected to your server. I'll further assume that
the server is also doing routing between subnets.
This requires that you configure VLAN tagging on the ethernet port
connected to the switch trunk port AND that you configure a virtual
interface for each VLAN that you wish to use. Note that I do NOT mean
configure multiple IP addresses on one port (aka aliases) such as
eth0:1 as 192.168.1.1, I mean that you must configure a VLAN
interface (eg vlan1 at eth0) for each vlan.
You must also configure a subnet declaration for each subnet in your
dhcp config. However, since each subnet is directly attached to the
dhcp server, you do NOT configure a relay agent in the switch.
This setup may be considered as analogous to having multiple ethernet
ports in the server, each connected to a separate switch. All the
VLAN stuff does is allow you to condense all the separate ports and
switches into one with some packet tags and software taking care of
the segregation instead of physically segregating the networks.
config 2
For this one I'll assume you have level 3 routing ability in the
switch, and the server is only directly connected to one VLAN. In
this mode, the routing between networks is done by the router in the
switch and you must configure a relay agent on every network except
the one to which the server is directly connected. The dhcp server
will see all but one of the networks as remote networks, but that is
handled automagically. You will have one ethernet port with one IP
address connected to a non-trunk port on the switch.
You still need the same dhcp configuration with subnet declarations
for all the subnets.
More information about the dhcp-users
mailing list