Configure and verify DHCP (IOS router)

chapter 5:IP service

    Configure and verify DHCP (IOS router)

  • Introduction to DHCP

    DHCP (Dynamic Host Configuration Protocol) is the protocol used by network devices that automatically get correct network parameters from devices ,so they can access network and Internet resources.

    The configuration groups most of the parameters into a new configuration area, one per subnet, called a DHCP pool. The only DHCP command that sits outside the pool is the command that defines the list of addresses excluded from being leased by DHCP.

    The Cisco IOS DHCP server configuration steps are as follows:

    Step 1. Exclude addresses from being assigned by DHCP: ip dhcp excluded-address first last

    Step 2. Create a DHCP pool and go to pool configuration mode: ip dhcp pool name

    Define subnet that the DHCP server should support: network subnet-ID mask or network subnet-ID prefix-length

    Define default router IP address(es) in that subnet: default-router address1 address2...

    Define list of DNS server IP addresses: dns-server address1 address2...

    Define length of lease, in days, hours, and minutes: lease days hours minutes

    Define the DNS domain name: domain-name name

    A Cisco IOS device can be configured to act as:

    •a DHCP server – by providing IP addresses when requested to do so

    •a DHCP client – when it requests an IP address

    •a DHCP relay agent – when it captures IP requests from clients, adds extra information to the request for user identification purposes, and forwards the request to the DHCP server

     

    1.Create a DHCP IP address pool for the IP addresses you want to use.

    Router(config)# ip dhcp pool mypool

    2.Specify the network and subnet for the addresses you want to use from the pool.

    Router(dhcp-config)# network 1.1.1.0 /8   

    3.Specify the DNS domain name for the clients.

    Router(dhcp-config)#domain-name mydomain.com

    4.Specify the primary and secondary DNS servers.

    Router(dhcp-config)#dns-server 1.1.1.10 1.1.1.11

    5.Specify the default router (i.e., default gateway).

    Router(dhcp-config)#default-router 1.1.1.1

    6.Specify the lease duration for the addresses you're using from the pool.

    Router(dhcp-config)#lease 7

    7.Exit Pool Configuration Mode.

    Router(dhcp-config)#exit

    1.The client sends a DHCP Discover message to locate a DHCP server – this is a broadcast message

    2.The DHCP server responds with a DHCP Offer unicast message – this message includes the IP address offered to the client, default gateway address and lease time for the IP address offered; it may also include DNS servers, TFTP server, and other information

    3.The client responds with a DHCP Request message which is a formal request for the IP address offered by the server – this is again a broadcast message

    4.Finally the server responds with a DHCP Ack unicast message confirming that the IP address has been leased to the client

     

© 2015 by Learncertification All Rights Reserved. The certification names are the trademarks of their respective owners. Terms & Privacy Policy