DHCP on VLAN

Kenneth Ling kenneth_ling at gawab.com
Mon Feb 26 16:09:14 UTC 2007


 hi simon,
 thank for the info, i use the config 2,
the cisco switch i use is cisco 6509.
all the vlan will  configure that on dhcp will get  ip from
192.168.100.100/24(my dhcp server, direct cannot to cisco switch)
and my vlan are 192.168.1.0/24 192.168.20/24 192.168.3.0/24 192.168.4.0/24
question is how actually configure on linux dhcp server ?
need vlan setting on each vlan ? (when i configure vlan on eth0, i still
configure the vlan ip as well right ?)

hope the info provide is enough...

tq

Simon Hobson wrote: 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
thecisco Simple answer - we don't and CANNOT know the answer to that since
wedon't know what your network is set up like ! However, I'll have a guess
attwo 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
alsodoing 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
Ido 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
(egvlan1 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
ethernetports 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
onlydirectly 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. 
-- regards Kenneth Ling 


More information about the dhcp-users mailing list