Configuring DHCP

Configuration Examples

Manual Bindings Configuration Example

The following example creates a manual binding for a client named Mars.cisco.com. The MAC address of the client is 02c7.f800.0422 and the IP address of the client is 172.16.2.254.

ip dhcp pool Mars host 172.16.2.254

hardware-address 02c7.f800.0422 ieee802 client-name Mars

Because attributes are inherited, the previous configuration is equivalent to the following:

ip dhcp pool Mars

host 172.16.2.254 mask 255.255.255.0 hardware-address 02c7.f800.0422 ieee802 client-name Mars

default-router 172.16.2.100 172.16.2.101 domain-name cisco.com

dns-server 172.16.1.102 172.16.2.102 netbios-name-server 172.16.1.103 172.16.2.103 netbios-node-type h-node

Cisco IOS DHCP Client Example

Figure 15 shows a simple network diagram of a DHCP client on an Ethernet LAN.

Figure 15 Topology Showing DHCP Client with Ethernet Interface

Cisco IOS

DHCP client

10.1.1.1

E2ethernet

Cisco IOS

DHCP server

E1

42327

 

 

On the DHCP Server, the configuration is as follows:

ip dhcp pool 1

network 10.1.1.0 255.255.255.0 lease 1 6

On the DHCP client, the configuration is as follows on interface E2:

interface Ethernet2 ip address dhcp

This configuration allows the DHCP client to aquire an IP address from the DHCP Server through an Ethernet interface.

Cisco IOS IP Configuration Guide

IPC-78

Page 124
Image 124
Cisco Systems 78-11741-02 manual Manual Bindings Configuration Example, Cisco IOS Dhcp Client Example, IPC-78