KanREN DHCP Seminar November 7-9, 2005

Configuring Remote Subnets

To configure a DHCP server to grant addresses on multiple subnets, the router should be configured to relay DHCP messages from the remote subnets to the server. On a Cisco router, that looks like this:

interface Vlan11

ip address 192.168.11.254 255.255.255.0

ip helper-address 192.168.10.253

This has already been configured for the classroom green network.

Next, define the new subnet to the server. Create a new configuration file called dhcpd.conf-subnets, and enter your new subnet declaration.

subnet 192.168.11.0 netmask 255.255.255.0 {

option routers 192.168.11.254;

range 192.168.11.32 192.168.11.63;

}

Then include the subnets file into the main configuration file:

# Include subnet declarations

include "dhcpd.conf-subnets";

Test your configuration, then activate your changes.

lab1:/var/dhcp # dhcpd -t

Internet Systems Consortium DHCP Server V3.0.4b2

Copyright 2004-2005 Internet Systems Consortium.

All rights reserved.

For info, please visit http://www.isc.org/sw/dhcp/

lab1:/var/dhcp # kill `cat dhcpd.pid`

lab1:/var/dhcp # dhcpd

Now move your client to the green network and make sure you can get an IP address and reach the Internet.

Success!

2005-11-07T09:22:35