0% found this document useful (0 votes)
81 views

Computer Networking IP Address: Client-Server

The Dynamic Host Configuration Protocol (DHCP) is a networking protocol that automates the assignment of IP addresses and other network configuration parameters to client devices on a TCP/IP network. A DHCP client requests an IP address and related networking information from a DHCP server, which maintains a pool of IP addresses and configuration details. The DHCP server assigns an IP address and other parameters like default gateway and DNS servers to the client from its pool for a lease period before the address can be reclaimed and reassigned.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
81 views

Computer Networking IP Address: Client-Server

The Dynamic Host Configuration Protocol (DHCP) is a networking protocol that automates the assignment of IP addresses and other network configuration parameters to client devices on a TCP/IP network. A DHCP client requests an IP address and related networking information from a DHCP server, which maintains a pool of IP addresses and configuration details. The DHCP server assigns an IP address and other parameters like default gateway and DNS servers to the client from its pool for a lease period before the address can be reclaimed and reassigned.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

The 

Dynamic Host Configuration Protocol (DHCP) is a computer networking protocol used


by hosts (DHCP clients) to retrieve IP address assignments and other configuration information.

DHCP uses a client-server architecture. The client sends a broadcast request for configuration
information. The DHCP server receives the request and responds with configuration information
from its configuration database.

In the absence of DHCP, all hosts on a network must be manually configured individually - a
time-consuming and often error-prone undertaking.

Technical overview

Dynamic Host Configuration Protocol automates network-parameter assignment to network


devices from one or more fault-tolerant DHCP servers. Even in small networks, DHCP is useful
because it can make it easy to add new machines to the network.

When a DHCP-configured client (a computer or any other network-aware device) connects to a


network, the DHCP client sends a broadcast query requesting necessary information from a
DHCP server. The DHCP server manages a pool of IP addresses and information about client
configuration parameters such as default gateway, domain name, the DNS servers, other servers
such as time servers, and so forth. On receiving a valid request, the server assigns the computer
an IP address, a lease (length of time the allocation is valid), and other IP configuration
parameters, such as the subnet mask and the default gateway. The query is typically initiated
immediately after booting, and must complete before the client can initiate IP-based
communication with other hosts.

Depending on implementation, the DHCP server may have three methods of allocating IP-
addresses:

 dynamic allocation: A network administrator assigns a range of IP addresses to DHCP,


and each client computer on the LAN has its IP software configured to request an IP address
from the DHCP server during network initialization. The request-and-grant process uses a
lease concept with a controllable time period, allowing the DHCP server to reclaim (and then
reallocate) IP addresses that are not renewed (dynamic re-use of IP addresses).
 automatic allocation: The DHCP server permanently assigns a free IP address to a
requesting client from the range defined by the administrator. This is like dynamic allocation,
but the DHCP server keeps a table of past IP address assignments, so that it can preferentially
assign to a client the same IP address that the client previously had.
 static allocation: The DHCP server allocates an IP address based on a table with MAC
address/IP address pairs, which are manually filled in (perhaps by a network administrator).
Only requesting clients with a MAC address listed in this table will be allocated an IP
address. This feature (which is not supported by all devices) is variously called Static DHCP
Assignment(by DD-WRT), fixed-address (by the dhcpd documentation), DHCP
reservation or Static DHCP (by Cisco/Linksys), and IP reservation or MAC/IP binding (by
various other router manufacturers).

Getting started
Let's look at how to configure basic DHCP on an IOS-based router. For this example, we'll start
off with the default configuration on a Cisco 2611 router running IOS 12.2. (The configuration
should be the same—or very similar—on all IOS-based routers).
To begin, connect the router's Ethernet port to a switch, and connect the switch to a laptop, which
will serve as the DHCP client.
To configure Cisco IOS DHCP, follow these steps, which include sample commands:
1. Configure an IP address on the router's Ethernet port, and bring up the interface. (On an
existing router, you would have already done this.)
Router(config)# interface ethernet0/0

Router(config-if)#ip address 1.1.1.1 255.0.0.0

Router(config-if)# no shutdown
2. Create a DHCP IP address pool for the IP addresses you want to use.
Router(config)# ip dhcp pool mypool
3. Specify the network and subnet for the addresses you want to use from the pool.
Router(dhcp-config)# network 1.1.1.0 /8  
4. Specify the DNS domain name for the clients.
Router(dhcp-config)#domain-name mydomain.com
5. Specify the primary and secondary DNS servers.
Router(dhcp-config)#dns-server 1.1.1.10 1.1.1.11
6. Specify the default router (i.e., default gateway).
Router(dhcp-config)#default-router 1.1.1.1
7. Specify the lease duration for the addresses you're using from the pool.
Router(dhcp-config)#lease 7
8. Exit Pool Configuration Mode.
Router(dhcp-config)#exit
This takes you back to the global configuration prompt. Next, exclude any addresses in the pool
range that you don't want to hand out.
For example, let's say that you've decided that all IP addresses up to .100 will be for static IP
devices such as servers and printers. All IP addresses above .100 will be available in the pool for
DHCP clients.
Here's an example of how to exclude IP addresses .100 and below:
Router(config)#ip dhcp excluded-address 1.1.1.0 1.1.1.100
Next, enter the ipconfig /renew command on the laptop to receive an IP address. After you have
the IP address, enter the ipconfig /all command. Listing A shows sample output from this
command.
Using DHCP commands
After configuring DHCP on the router, you can use DHCP show commands to see what's going
on. For example, you can use one of the most common DHCP commands to view which DHCP
IP addresses currently have leases: show ip dhcp bindings.
Listing B shows sample output from this command. From this output, you can see that my PC
received the IP address of 1.1.1.101 (the first address after 100) and its MAC address.
Keep in mind that DHCP configuration can be very complex on Cisco routers. You can
configure backup servers, settings to prevent conflicts, secure DHCP, and many other options.
For more information, check out Cisco's Configuring DHCP documentation.
David Davis has worked in the IT industry for 12 years and holds several certifications,
including CCIE, MCSE+I, CISSP, CCNA, CCDA, and CCNP. He currently manages a group of
systems/network administrators for a privately owned retail company and performs
networking/systems consulting on a part-time basis.

You might also like