Results 1 to 4 of 4

Thread: How to configure a DHCP server on a router

  1. #1
    Join Date
    Jan 2006
    Posts
    154

    How to configure a DHCP server on a router

    Please let me have a clear procedure on configuring a DHCP server on a router. Thank you in advance.
    I feel sad for people with good imagination.

  2. #2
    Join Date
    Jan 2006
    Posts
    605

    Re: How to configure a DHCP server on a router

    What is the make/model of your router? Can you be more specific? But anyways here is a way to configure DHCP on a Cisco Router:

    When would you need this: When using the router as a DHCP server to provide IP addresses and related information to DHCP clients.

    Specials Requirements: DHCP server software is supported for these series; 800, 1000, 1400, 1600, 1700 series (support for the Cisco 1700 series was added in Cisco IOS Release 12.0[2]T), 2500, 2600, 3600, 3800, MC3810, 4000, AS5100, AS5200, AS5300, 7000, 7100, 7200, MGX 8800 with an installed Route Processor Module, 12000, uBR900, uBR7200, Catalyst 5000 family switches with an installed Route Switch Module, Catalyst 6000 family switches with an installed MultiLayer Switch Feature Card, and Catalyst 8500.

    1. Define the DHCP address pool,

    Router(config)#ip dhcp pool POOLNAME

    Router(dhcp-config)#network XXX.XXX.XXX.XXX YYY.YYY.YYY.YYY

    where,

    XXX.XXX.XXX.XXX is the network address to be used by the DHCP pool

    YYY.YYY.YYY.YYY is the subnet mask for the network.

    You can replace the subnet mask by a (/PREFIX) to provide the subnet mask.

    2. Configure the parameters to be sent to the client,

    Router(dhcp-config)#dns-server XXX.XXX.XXX.XXX

    To provide the DNS server IP address

    Router(dhcp-config)#default-router XXX.XXX.XXX.XXX

    To provide the IP address of the default gateway

    Router(dhcp-config)#domain-name NAME

    To provide the name of the domain of the network (if in a domain environment)

    Router(dhcp-config)#netbios-name-server XXX.XXX.XXX.XXX

    To provide the IP address of the NetBIOS name server

    Router(dhcp-config)#lease DAYS HOURS MINUTES

    To define the lease time of the addresses given to the client. You can make it infinite by using this command instead; lease infinite

    There is a large group of settings that you can configure to be sent to the clients, and I have only mentioned the most frequently used.

    3. Configure the IP addresses to be excluded from the pool. This is usually done to avoid the conflicts caused by the DHCP with servers and printers. Remember to give ALL servers and network printers static IP addresses in the same range of the DHCP pool. And then exclude these addresses from the pool to avoid conflicts.

    Router(config)#ip dhcp excluded-address XXX.XXX.XXX.XXX

    Use the command in the previous form to excluded a single address. You can repeat it as much as you see fit for the IP addresses you want to exclude. Or,

    Router(config)#ip dhcp excluded-address YYY.YYY.YYY.YYY ZZZ.ZZZ.ZZZ.ZZZ

    where,

    YYY.YYY.YYY.YYY is the start of the range to be excluded from the pool

    ZZZ.ZZZ.ZZZ.ZZZ is the end of the range

    This way you can exclude a range or ranges of IP addresses and reserve them for static addresses use.

    4. Enable the DHCP service in the router

    Router(config)#service dhcp

    To disable it use

    Router(config)#no service dhcp

    Usually the DHCP service is enabled by default on your router.

    5. Use the following commands to check the DHCP operation on the router:

    Router#show ip dhcp binding

    This command shows the current bindings of addresses given to clients

    Router#show ip dhcp server statistics

    This command show the DHCP server statistics.

    Router#debug ip dhcp server

    This debug command is used to troubleshoot DHCP issues.

    Implementation notes:

    1. If you have a DHCP server other than the router, and you would like to let the router to forward the DHCP requests from a certain LAN to the DHCP server laying outside that LAN, go to the Ethernet interface that does not have the DHCP server and type the following command:

    Router(config-if)#ip helper-address XXX.XXX.XXX.XXX

    where XXX.XXX.XXX.XXX is the IP address of the server laying outside this LAN.

    2. You can create a DHCP database agent that stores the DHCP binding database. A DHCP database agent is any host, for example, an FTP, TFTP, or RCP server that stores the DHCP bindings database. You can configure multiple DHCP database agents and you can configure the interval between database updates and transfers for each agent. To configure a database agent and database agent parameters, use the following command in global configuration mode:

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

    An example url is this

    ftp://user:password @ 192.168.0.3/router-dhcp (remove the spaces before implementing)

    If you choose not to configure a DHCP database agent, disable the recording of DHCP address conflicts on the DHCP server. To disable DHCP address conflict logging, use the following command in global configuration mode:

    Router(config)#no ip dhcp conflict logging

    3. DHCP service uses port 67 and 68. So, if you are using a firewall, remember to open these ports.

    4. To clear DHCP server variables, use the following commands as needed:

    Router#clear ip dhcp binding *

    If you want to clear a certain binding not all of them, replace the * in the previous command with the IP address to be cleared.

    Router#clear ip dhcp server statistics

    Source: routergeek.net

  3. #3
    Join Date
    Jan 2006
    Posts
    3,792

    Re: How to configure a DHCP server on a router

    basic suggestion,

    get a switch. If you can afford it, get 2 Cisco 2900 [2950/24] [2950/24 with uplink ports is even better but more cost].

    All servers and printers get static addresses and are reserved in DHCP.

    Get rid of routing functions on any of the servers [and 2 NIC configurations]

    I'd dump the linksys router and get a SonicWall TZ 170 or a Cisco 800 series [f you know Cisco IOS. If you don't,get a SonicWall and then get a Wireless AP]

    Once you have everything on a switch, if you ever reboot the router, the only thing that happens is no internet connectivity until the router comes up.

  4. #4
    Join Date
    Jan 2006
    Posts
    4,221

    Re: How to configure a DHCP server on a router

    In your router that joins the 3 networks (I am assuming they are VLANed apart) put in a "DHCP helper-address" command that points to your DHCP server. Then put in the appropriate ranges into your DHCP server.

Similar Threads

  1. How to Install and Configure DHCP Server in Ubuntu Server
    By Anirvinya in forum Operating Systems
    Replies: 5
    Last Post: 10-02-2010, 04:29 AM
  2. How to Configure LAN without DHCP server
    By Caiden in forum Networking & Security
    Replies: 4
    Last Post: 30-01-2010, 04:54 AM
  3. Replies: 3
    Last Post: 11-09-2009, 10:24 AM
  4. how to migrate DHCP settings from server 2003 to server 2008
    By Imran in forum Windows Server Help
    Replies: 3
    Last Post: 01-09-2009, 12:57 AM
  5. Server 2003. Problem: How to configure DHCP and PXE
    By Matias Hohl in forum Windows Server Help
    Replies: 5
    Last Post: 04-02-2008, 06:58 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,690,385.35198 seconds with 17 queries