DHCP and multiple VLANs

Brian Raaen braaen at zcorum.com
Mon Oct 13 12:39:11 UTC 2008


Dear Santi,
	If you are putting the server in all the vlans you pretty much need to assign 
an ip to each vlan interface.  Depending on your network topology you may 
want to set up your router(s) to relay dhcp to the server using option 82.  I 
have seen Cable networks with 4-5 CMTSs where each serves at least a CM 
(cable modem) network and one or more CPE network pools.  Basically you set 
up your cmts/router to relay dhcp traffic to the dhcp server that is on a 
different network.  I have attached an example config from my home where I am 
using a cisco 871 router to run dhcp for wireless and wired dhcp.  The dhcp 
server is in my 'internal' subnet and only has one ip.


----------------------

Brian Raaen
Network Engineer
braaen at zcorum.com


#
#
# Router config
#
#
interface FastEthernet4
 description connection to backbone router
 ip address 10.0.0.2 255.255.255.0
 duplex auto
 speed auto
!
interface Dot11Radio0
 bandwidth 54000
 ip address 10.0.3.1 255.255.255.0
 ip helper-address 10.0.2.7
 !
!
interface Vlan1
 description internal network
 ip address 10.0.2.1 255.255.255.0
!


#
#
# dhcpd.conf
#
#


###
#### Global Settings
####
authoritative;
log-facility local4;
default-lease-time 86400;
max-lease-time 86400;
option domain-name "example.net";
option domain-name-servers 10.0.2.7;
next-server 10.0.2.7;
option time-servers 10.0.2.7;
option time-offset -18000;
server-identifier 10.0.2.7;
option log-servers 10.0.2.7;
ping-check on;
option netbios-name-servers 10.0.2.7;
option netbios-node-type 8;


####
#### Wired Network
####
subnet 10.0.2.0 netmask 255.255.255.0 {
        option subnet-mask 255.255.255.0;
        option broadcast-address 10.0.2.255;
        option routers 10.0.2.1;

        pool {
                range 10.0.2.10 10.0.2.200;
                deny dynamic bootp clients;
        }
}

###
### Wireless Network
###
subnet 10.0.3.0 netmask 255.255.255.0 {
        option subnet-mask 255.255.255.0;
        option broadcast-address 10.0.3.255;
        option routers 10.0.3.1;

        pool {
                range 10.0.3.10 10.0.3.200;
                deny dynamic bootp clients;
        }
}




On Monday 13 October 2008, santi at usansolo.net wrote:
> 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 :-/
> 
> Regards,
> 
> --
> Santi Saez
> http://woop.es
> 
> 
> 




More information about the dhcp-users mailing list