Sunday, May 24, 2020

How to Configuring a Router-Based DHCP Server

Using a router as a DHCP server is a somewhat common practice in smaller networks.
Once you move into larger organizations, DHCP services are typically centralized onto
server platforms. Either DHCP option is capable of sending TFTP server information to
the IP phones.
Example 3-3 shows the syntax used to configure a WAN branch router as a DHCP server.
Example 3-3 Configuring Router-Based DHCP Services
Note: This example uses a Cisco router as a DHCP server. I (Jeremy) took this approach
because using a router as a DHCP server is simple and stable. That being said, most people
use a Windows server or some other centralized device for DHCP services. Even Cisco
Unified Communications Manager includes DHCP server capabilities. In these cases, you
typically need to configure an ip helper-address <central DHCP server IP address> to
forward DHCP requests to the central DHCP server for the voice VLAN devices.
The way in which Cisco routers approach DHCP configurations is slightly different from
how many other DHCP servers do so. Most DHCP servers allow you to specify a range of
IP addresses that you would like to hand out to clients. Cisco routers take the opposite approach:
you first specify a range of addresses that you do not want to hand out to clients
(using the ip dhcp excluded-address syntax from global configuration mode). Configuring
the excluded addresses before you configure the DHCP pools ensures that the Cisco
router does not accidentally hand out IP addresses before you have a chance to exclude
them from the range. The DHCP service on the router will begin handing out IP addresses
from the first nonexcluded IP address in the network range. In Example 3-3, this is
172.16.1.10 for the voice scope and 172.16.2.10 for the data scope.
Tip: Notice a DNS server of 4.2.2.2 is assigned to both the data and voice devices. This is
a well-known, open DNS server on the Internet. This IP address works fantastically to test
connectivity and DNS services in new network deployments because it is such a simple IP
address to remember.
WAN_RTR#configure terminal
WAN_RTR(config)#ip dhcp excluded-address 172.16.1.1 172.16.1.9
WAN_RTR(config)#ip dhcp excluded-address 172.16.2.1 172.16.2.9
WAN_RTR(config)#ip dhcp pool DATA_SCOPE
WAN_RTR(dhcp-config)#network 172.16.2.0 255.255.255.0
WAN_RTR(dhcp-config)#default-router 172.16.2.1
WAN_RTR(dhcp-config)#dns-server 4.2.2.2
WAN_RTR(dhcp-config)#exit
WAN_RTR(config)#ip dhcp pool VOICE_SCOPE
WAN_RTR(dhcp-config)#network 172.16.1.0 255.255.255.0
WAN_RTR(dhcp-config)#default-router 172.16.1.1
WAN_RTR(dhcp-config)#option 150 ip 172.16.1.1
WAN_RTR(dhcp-config)#dns-server 4.2.2.2

The way in which Cisco routers approach DHCP configurations is slightly different from
how many other DHCP servers do so. Most DHCP servers allow you to specify a range of
IP addresses that you would like to hand out to clients. Cisco routers take the opposite approach:
you first specify a range of addresses that you do not want to hand out to clients
(using the ip dhcp excluded-address syntax from global configuration mode). Configuring
the excluded addresses before you configure the DHCP pools ensures that the Cisco
router does not accidentally hand out IP addresses before you have a chance to exclude
them from the range. The DHCP service on the router will begin handing out IP addresses
from the first nonexcluded IP address in the network range. In Example 3-3, this is
172.16.1.10 for the voice scope and 172.16.2.10 for the data scope.

Also notice that the VOICE_SCOPE DHCP pool includes the option 150 syntax. This creates
the custom TFTP server option to be handed out to the Cisco IP Phones along with
their IP address information. In this case, the TFTP server of the IP phones is the same as
the default gateway because we use the CME router as a call processing agent. As mentioned
in the section, “Understanding the Cisco IP Phone Boot Process,” the TFTP server
holds the configuration files for the phones. When you configure a Cisco IP Phone in
Cisco Unified Communications Manager (CUCM) or CME, an XML configuration file is
generated and stored on a TFTP server. These CML configuration files have a filename format
of SEP<IP Phone MAC Address>.cnf.xml and contain a base configuration for the IP
phone (specifying language settings, URLs, and so on). Most importantly, these XML
files contain a list of up to three CUCM server or CME IP addresses the Cisco IP Phone
uses for registration. After the IP phone receives the XML file, it attempts to register with
the first CUCM or CME server listed in the file. If it is unable to reach that server, it
moves down to the next until the list is exhausted (at which point the IP phone reboots and tries it all over again).

No comments:

Post a Comment