Specifies the default router for the pool to use

The following are tasks for configuring a Cisco IOS DHCP server:

■ Configuring a DHCP database agent or disabling DHCP conflict logging

■ Configuring a DHCP address pool (required)

■ Excluding IP addresses

■ Enabling the Cisco IOS DHCP server and relay agent features

■ Configuring manual bindings

■ Configuring a DHCP server boot file

■ Configuring the number of ping packets and timeout

■ Enabling the Cisco IOS DCHP client on Ethernet interfaces

■ Performing a DHCP server options import and autoconfiguration

■ Configuring the relay agent information option in BOOTREPLY messages

■ Configuring a relay agent information reforwarding policy

■ Enabling the DHCP smart-relay feature

Not all of the optional features are covered in detail. Additional information on these optional features is available on Cisco.com.

© 2006 Cisco Systems, Inc. Manipulating Routing Updates 5-71

Cisco IOS DHCP Server Commands and Parameters

This table identifies the major commands to implement Cisco IOS DHCP server and options.

Readers' Questions

  • Lisa
    Which tcp/ip configuration parameter identifies the router that is used to reach hosts?
    4 months ago
  • on other networks The TCP/IP configuration parameter that identifies the router used to reach hosts on other networks is the Default Gateway.
    • Tiia
      Which tcp/ip configuration parameter identifies the router that is used to reach?
      6 months ago
    • remote networks The gateway IP address is the TCP/IP configuration parameter that identifies the router that is used to reach remote networks.
      • Omar
        Which tcp ip configuration parameter identifies the router?
        7 months ago
      • The router's IP address is the TCP/IP configuration parameter that identifies the router.

        Command and Parameter

        Description

        Router(config)#service dhcp

        Enables DHCP features on router; it is on by default.

        Router(config)#ip dhcp database url [timeout seconds| write-delay seconds]

        Configures the database agent and the interval between database updates and database transfers.

        Router(config)#no ip dhcp conflict logging

        Disables DHCP conflict logging. (Used if a DHCP database agent is not configured.)

        Router(config)#ip dhcp excluded-address low-

        address [high address]

        Specifies the IP address that the DHCP server should not assign to DHCP clients.

        Router(config)#ip dhcp pool name

        Creates a name for the DCHP server address pool and places you in DHCP pool configuration mode.

        Router(config-dhcp)#network network-number [mask|prefix-length]

        Specifies the subnet network number and mask of the DHCP address pool.

        Router(config-dhcp)#domain-name domain

        Specifies the domain name for the client.

        Router(config-dhcp)#dns-server address [address2...address8]

        Specifies the IP address of a Domain Name System (DNS) server that is available to a DHCP client. One is required, but up to eight can be specified.

        Router(config-dhcp)#netbios-name-server address

        [address2...address8]

        Same as DNS, but for Windows Internet Name Service (WINS).

        Router(config-dhcp)#default-router address [address2... address8]

        Specifies the IP address of the default router for a DHCP client.

        Router(config-dhcp)#lease {days [hours] [minutes] | infinite}

        Specifies the duration of the lease. The default is a one-day lease.

        Router(config-dhcp)#import all

        Used to import DHCP option parameters into the DHCP server database. Used for remote DHCP pools.

        Additional commands are available to customize manual bindings for individual clients, including MAC addresses. Additional options are also available with implementation of the DHCP relay agent function.

        5-72 Building Scalable Cisco Internetworks (BSCI) v3.0 © 2006 Cisco Systems, Inc.

        ipdhcp database ftp://user:[email protected].

        16.

        4.253/router-dhcp write-delay 120

        ip dhcp excluded-address

        172.16.1.100 172

        .16

        .1.103

        ip dhcp excluded-address

        172.16.2.100 172

        .16

        .2.103

        ip dhcp pool 0

        network 172.16.0.0/16

        domain-name global.com

        dns-server 172.16.1.102

        172.16.2.102

        netbios-name-server 172

        .16.2.103 172.16

        .2.

        103

        default-router 172.16.1

        . 100

        Before configuring the Cisco IOS DHCP Server feature, you should complete the following tasks:

        1. Identify an external FTP, TFTP, or Remote Copy Protocol (RCP) server that will be used to store the DHCP binding database.

        2. Identify the IP address range to be assigned by the DHCP server and the IP addresses to be excluded (default routers and other statically assigned addresses within a dynamically assigned range).

        3. Identify DHCP options for devices where necessary, including these:

        — Default boot image name

        — Default routers

        — DNS servers

        — Network BIOS (NetBIOS) name server

        — IP telephony options, such as option 150

        4. Decide on a DNS domain name.

        Cisco IOS devices can also be configured as DHCP clients and DHCP relay agents.

        © 2006 Cisco Systems, Inc. Manipulating Routing Updates 5-73

        In the following configuration example, two DHCP address pools are created, one for subnet 172.16.1.0 and one for subnet 172.16.2.0. The host will receive its address from the DHCP server on the closest device. The router determines how to provide the addresses based on the IP address on the router interface.

        ip dhcp pool 1

        network 172.16.1.0/24 domain-name global.com dns-server 172.16.1.102 netbios-name-server 172.16.1.103 default-router 172.16.1.100 172.16.1.101 lease 30

        ip dhcp pool 2

        network 172.16.2.0/24 domain-name global.com dns-server 172.16.2.102 netbios-name-server 172.16.2.103 default-router 172.16.2.100 172.16.2.101 lease 30

        5-74 Building Scalable Cisco Internetworks (BSCI) v3.0 © 2006 Cisco Systems, Inc.

        Remote Router

        PC/Client

        PC/Client

        Local DNS Server

        Central Router

        Central Router

        Remote Router

        In the past, Cisco IOS DHCP servers had to be configured on each device separately with all parameters and options specified in each case. Cisco IOS software has been revised to allow remote Cisco IOS DHCP servers to be configured to import option parameters from a centralized server.

        The following is an example of the partial command syntax for this feature:

        Central Router ip dhcp-excluded address 10.0.0.1 10.0.0.5

        ip dhcp pool central network 10.0.0.0 255.255.255.0

        default-router 10.0.0.1 10.0.0.5

        domain name central.com dns-server 10.0.0.2

        netbios-name-server 10.0.0.2

        interface fastethernet0/0

        ip address 10.0.0.1 255.255.255.0 Remote Router ip dhcp pool client network 20.0.0.0 255.255.255.0 ip dhcp-excluded address 20.0.0.2 default-router 20.0.0.2 import all interface fastethernet0/0 ip address dhcp

        © 2006 Cisco Systems, Inc.

        Manipulating Routing Updates 5-75

        Continue reading here: BGP connection is closed after being sent

        Was this article helpful?

        0 0