59-3
Catalyst 4500 Series Switch, Cisco IOS Software Configuration Guide - Cisco IOS XE 3.9.xE and IOS 15.2(5)Ex
Chapter 59 Configuring the Cisco IOS DHCP Server
Information About Cisco IOS DHCP Server
DHCP Server Address Allocation Using Option 82
The Cisco IOS DHCP server can allocate dynamic IP addresses based on the relay information option
(option 82) sent by the relay agent.
DHCP provides a framework for passing configuration information to hosts on a TCP/IP network.
Configuration parameters and other control information are carried in tagged data items that are stored
in the options field of the DHCP message. The data items are also called options. Option 82 is organized
as a single DHCP option that contains information known by the relay agent.
Automatic DHCP address allocation is based on an IP address. This IP address can either be the gateway
address (giaddr field of the DHCP packet) or the IP address of an incoming interface. In some networks,
it is necessary to use additional information to further determine which IP addresses to allocate. By using
option 82, the Cisco IOS DHCP relay agent can include additional information about itself when
forwarding client-originated DHCP packets to a DHCP server. The Cisco IOS DHCP server can also use
option 82 to provide additional information to properly allocate IP addresses to DHCP clients. The
information sent via option 82 is used to identify the port where the DHCP request arrives. Automatic
DHCP address allocation does not parse out the individual suboptions contained in option 82. Rather,
the address allocation is done by matching a configured pattern byte by byte.
This feature introduces a new DHCP class capability, which is a method to group DHCP clients based
on some shared characteristics other than the subnet in which the clients reside.
For example, DHCP clients are connected to two ports of a single switch. Each port can be configured
to be a part of two VLANs: VLAN1 and VLAN2. DHCP clients belong to either VLAN1 or VLAN2 and
the switch can differentiate the VLAN that a particular DHCP Discover message belongs to (possibly
through Layer 2 encapsulation). Each VLAN has its own subnet and all DHCP messages from the same
VLAN (same switch) have the giaddr field set to the same value indicating the subnet of the VLAN.
Problems can occur while allocating IP addresses to DHCP clients that are connected to different ports
of the same VLAN. These IP addresses must be part of the same subnet but the range of IP addresses
must be different. In the preceding example, when a DHCP client that is connected to a port of VLAN1
must be allocated an IP address from a range of IP addresses within the VLAN’s subnet, whereas a
DHCP client connecting to port 2 of VLAN1 must be allocated an IP address from another range of IP
addresses. The two range of IP addresses are part of the same subnet (and have the same subnet mask).
Generally, during DHCP address allocation, the DHCP server refers only to the giaddr field and is unable
to differentiate between the two ranges.
To solve this problem, a relay agent residing at the switch inserts the relay information option (option
82), which carries information specific to the port, and the DHCP server inspects both the giaddr field
and the inserted option 82 during the address selection process.
When you enable option 82 on a device, the following sequence of events occurs:
1.
The host (DHCP client) generates a DHCP request and broadcasts it on the network.
2.
When the device receives the DHCP request, it adds the option 82 information in the packet. The
option 82 information contains the device MAC address (the remote ID suboption) and the port
identifier, vlan-mod-port, from which the packet is received (the circuit ID suboption).
3.
The device adds the IP address of the relay agent to the DHCP packet.
4.
The device forwards the DHCP request that includes the option 82 field to the DHCP server.
5.
The DHCP server receives the packet. If the server is option 82 capable, it uses the remote ID, the
circuit ID, or both to assign IP addresses and implement policies, such as restricting the number of
IP addresses that can be assigned to a single remote ID or circuit ID. The DHCP server echoes the
option 82 field in the DHCP reply.
Summary of Contents for Catalyst 4500 Series
Page 2: ......
Page 4: ......
Page 2086: ...Index IN 46 Software Configuration Guide Release IOS XE 3 9 0E and IOS 15 2 5 E ...