How to configure DHCP Server on Cisco IOS

Hello Sebastian

What the documentation is saying is that the IP address on the router interface is already excluded from any DHCP scope that is being used. For example, looking at the topology from the lesson:

image

Let’s say that the DHCP server is configured with the following:

interface FastEthernet0/0
 ip address 192.168.12.254 255.255.255.0
!
ip dhcp pool MYPOOL
 network 192.168.12.0 255.255.255.0
 default-router 192.168.12.254
 dns-server 208.67.222.222
!
end

Note that one of the interfaces of the DHCP server, namely Fa0/0, is assigned an IP address within that scope. What the Cisco documentation is saying is that there is an implicit exclude command like so:

ip dhcp excluded-address 192.168.12.254

So the IP address of the interface which is within the scope of the DHCP pool is automatically excluded without needing to add any additional configurations.

This is true regardless of whether or not that particular IP address is the gateway of the scope.

I hope this has been helpful!

Laz

Thank you Laz,

My question is more around the use of the network and broadcast address within the subnet of the DHCP pool, and whether or not these were automatically excluded from the DHCP allocation on Cisco IOS.

I setup a test environment and configured a network address like the example above - reserving from 0 - 254 in the pool. I enabled debugs on the router and it stated the pool was exhausted, refusing to allocate the .255 address to a client.

I was just wondering because in an exam environment such as the CCIE EI, if I were asked to create an address pool with reservations, whether or not I should be including the network and broadcast in that address range - which I’m still not entirely sure of.

Hopefully this makes sense.

Hello Sebastian

DHCP servers “know” that the network and broadcast addresses of any configured scope are “off limits” when it comes to assigning them to DHCP clients. By definition, these addresses are never assigned to hosts, as you surely know, so any decent DHCP server should have that intelligence built in to its operation.

Remember, on any DHCP server, you typically indicate the network address and a subnet mask, such as 192.168.12.0/24 to indicate the scope. This, by the very definition of the RFC for IPv4, excludes .0 and .255.

I would be very surprised if a DHCP server required you to explicitly exclude these addresses to ensure they are not given.

One more thought. Many hosts will not allow you to manually configure their addresses as the network or broadcast address. I just tried on my Windows computer to assign it the broadcast address, and it gave me an error. So even if a DHCP server does, strangely enough, assign such addresses, the OS of the host should reject such an assignment.

I hope this has been helpful!

Laz

I was wondering if you know a good article with all DHCP options that would be considered good to know for essential services like TFTP, Phones, etc

Hello Cameron

You can find all of the DHCP options at the Internet Assigned Numbers Authority (IANA) since they officially define them. You can see the list here:
https://www.iana.org/assignments/bootp-dhcp-parameters/bootp-dhcp-parameters.xhtml

As for information about DHCP options for the most essential services, it depends on what you mean by “essential”. For IP phones, the most often used options are:

When configuring IP phones using DHCP, specific DHCP options are commonly used to ensure that the phones receive the correct configuration and can connect to the necessary services, such as VoIP servers. Here are the most often used DHCP options for IP phones:

  1. Option 66 (TFTP Server Name):

    • Specifies the IP address or hostname of the TFTP server from which the IP phone can download its configuration file.
  2. Option 150 (TFTP Server Address):

    • Similar to Option 66, but allows specifying multiple TFTP server IP addresses. This option is often used in Cisco IP phone deployments.
  3. Option 3 (Router):

    • Provides the default gateway that the IP phone should use to communicate with other networks, including the VoIP server.
  4. Option 6 (Domain Name Server):

    • Specifies the IP addresses of the DNS servers that the IP phone should use to resolve domain names.
  5. Option 120 (SIP Server):

    • Provides the IP address or hostname of the SIP (Session Initiation Protocol) server, allowing the IP phone to register and initiate calls.
  6. Option 144 (Telephone Number Mapping (ENUM) Service):

    • Allows the IP phone to obtain ENUM information, which maps phone numbers to IP addresses using DNS.
  7. Option 2 (Time Offset):

    • Specifies the offset from UTC in seconds, used by the IP phone to display the correct time based on the phone’s timezone.
  8. Option 42 (Network Time Protocol (NTP) Servers):

    • Provides the IP addresses of NTP servers for the IP phone to synchronize its internal clock.
  9. Option 15 (Domain Name):

    • Supplies the DNS domain name, which the IP phone can use as part of its fully qualified domain name (FQDN).
  10. Option 4 (Time Server):

    • Specifies the IP addresses of the time servers that the IP phone can use, although NTP servers (Option 42) are more commonly used.

These DHCP options help automate the configuration process for IP phones. For other requirements, let us know and we may be able to create a NetworkLessons note about the most often-used DHCP options.

I hope this has been helpful!

Laz

Hi Laz,

Thank you for this, it was helpful! I think this would be a helpful addition and would be worth creating a NetworkLessons note about the most commonly ones used.

Hello Cameron.

I’ve created a NetworkLessons note based on this post here. I may possibly create one with additional DHCP options at some point. Thanks!

Laz

Thank you this is great!

1 Like