Cisco DHCP Server Configuration

128 Views
Published
Cisco DHCP Server Configuration

This video is a video on how to configure a Cisco router as a DHCP server. We also have a video on setting up a Cisco router as a DHCP relay. The link to that video is at the bottom of the description.

Video Transcript:
-------------------------------------
In this video we are going to learn how to configure a Cisco switch to be a DHCP server. Once we have that working, we will have another video showing you how to setup a Cisco router as a DHCP Relay Agent.

Take a look at our network.

Router1 is configured with the IP address 192.168.10.1
Printer1 is configured with the IP address 192.168.10.5
PC1 will get its IP via DHCP.

We are going to configure Router1 to be a DHCP server with the following options:

IP address range: 192.168.10.11 – 192.168.10.254
Default Gateway: 192.168.10.1
DNS Server: 4.4.4.4

The way Cisco does it you define the network that you want to hand out addresses for, in this case the 192.168.10.0 network, and all addresses in the network are given out. That would mean the addresses 192.168.10.1 through 192.168.10.255 would all be included in the range that is given out.

If you have an address or range of addresses that you do not want to be given out by DHCP, like Printer1’s address or Router1’s address, you must exclude the addresses.

We want to exclude 192.168.10.1 through 192.168.10.10 to account for Router1, Printer1, and any future network devices or servers.

We will give out 192.168.10.1 as the default gateway and we will give out 4.4.4.4 as our DNS servers.

Let’s get started….

First, we will check to make sure we can ping from Router1 to Printer1.

Next, we will make sure our PC is configured to get an IP address via DHCP.

Now let’s go into our Router and configure DHCP.

The first thing that we will do is enable the DHCP service. You do this in global configuration mode.
Router1#conf t
Router1(config)#service dhcp

We will configure our pool later. I like to configure the addresses that I want to exclude from the pool first. This is to avoid an address being given out before it is excluded.

We want to exclude 192.168.10.1 through 192.168.10.10. We do this from global configuration mode.

Router1(config)#ip dhcp excluded-address 192.168.10.1 192.168.10.10

Now we create a DHCP pool. This is also done in global config mode.

Router1(config)#ip dhcp pool NETWORK10
(Network10 is just a name that you choose to describe the pool)

After entering the ip dhcp command, you will be placed in DHCP config mode and your prompt should change to:

Router1(dhcp-config)#

Let’s start with our options:

To configure the default gateway address that will be given out we use the default-router command.

Router1(dhcp-config)#default-router 192.168.10.1

To configure the DNS server we use the command dns-server ipaddress.

Router1(dhcp-config)#dns-server 4.4.4.4
(NOTE: you can specify up to eight dns server by separating the ip addresses with a space)

Now let’s define the network from which we are giving out addresses by using the network command.

Router1(dhcp-config)#network 192.168.10.0 255.255.255.0

Now let’s see if PC1 gets an IP address and then test to see if we can PING the printer and server.
--------------------------------------------

How To Configure a Cisco Router as a DHCP Server:
http://youtu.be/OUee45pW0x8

How to Configure a Cisco Router as a DHCP Relay Agent.
http://youtu.be/z3tq69xR1dg
Category
Routers and Switches
Be the first to comment