soundtraining.net website links

Saturday, January 8, 2005

How to Configure DHCP on a Cisco Router

Many students in our Cisco workshops need to use a router as a Dynamic Host Configuration Protocol (DHCP) server. Here’s how to do it.

Begin by configuring a DHCP database agent, such as a TFTP or FTP server that will store the DHCP bindings database. In global configuration mode, enter the following command:

router(config)#ip dhcp database [url]

The Cisco DHCP implementation assumes that all addresses in the configured subnet are available for use. If you want to exclude certain addresses, you must explicitly configure them (also in global configuration mode):

router(config)#ip dhcp excluded-address low-address [high-address]

Now, configure a DHCP pool name, which also allows you to enter DHCP configuration mode. In the example, the pool name is “dhcpdemo”. You then specify the DHCP pool subnet address and mask.

router(config)#ip dhcp pool dhcpdemo

router(dhcp-config)#network 10.16.0.0 /8

In the above example, the “/8″ indicates an 8 bit subnet mask or 255.0.0.0.

Now, you need to configure the DHCP options, including a domain name, DNS server address(es), WINS server (NetBIOS name server) address(es) and NetBIOS node type (if you don’t know which node type to use, choose “h”), the client's default router (gateway), and lease time [(days, hours, minutes) infinite] (Defaults to one day).

router(dhcp-config)#domain-name soundtraining.net

router(dhcp-config)#dns-server 10.0.0.2

router(dhcp-config)#netbios-name-server 10.0.0.2

router(dhcp-config)#netbios-node-type h

router(dhcp-config)#default-router 10.0.0.1

router(dhcp-config)#lease 8

There are many more commands and options available with DHCP on a Cisco router. To learn more about them and gain hands-on experience, register for our Cisco Router Fundamentals 2-Day Workshop available in various cities or as an onsite presentation at your location for your group of four or more.

No comments: