- Finding Feature Information
- Restrictions for DHCP Server Port-Based Address Allocation
- Information About DHCP Server Port-Based Address Allocation
- How to Configure DHCP Server Port-Based Address Allocation
- Configuration Examples for DHCP Server Port-Based Address Allocation
- Additional References
- Feature Information for DHCP Server Port-Based Address Allocation
DHCP Server Port-Based Address Allocation
First Published: June 4, 2010
Last Updated: Sept 9, 2010
The DHCP Server Port-Based Address Allocation feature provides port-based address allocation support on the Cisco IOS Dynamic Host Configuration Protocol (DHCP) server for the Ethernet platform. The DHCP server provides address assignment support based on the point of attachment of the client network.
- Finding Feature Information
- Restrictions for DHCP Server Port-Based Address Allocation
- Information About DHCP Server Port-Based Address Allocation
- How to Configure DHCP Server Port-Based Address Allocation
- Configuration Examples for DHCP Server Port-Based Address Allocation
- Additional References
- Feature Information for DHCP Server Port-Based Address Allocation
Finding Feature Information
Your software release may not support all the features documented in this module. For the latest feature information and caveats, see the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the Feature Information Table at the end of this document.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
Restrictions for DHCP Server Port-Based Address Allocation
The DHCP Server Port-Based Address Allocation feature does not support Virtual routing and forwarding (VRF) and virtual private network (VPNs).
Information About DHCP Server Port-Based Address Allocation
DHCP Server Port-Based Address Allocation Feature Design
When Cisco industrial Ethernet switches are deployed on the factory floor, they offer connectivity to the directly connected manufacturing devices. A failure manufacturing device must be repaired immediately in the existing network or replaced by a new device. The DHCP protocol recognizes DHCP clients by the client identifier (ID) option in the DHCP packet. Clients who do not include the client ID option are identified by the client hardware address. The DHCP Server Port-Based Address Allocation feature introduces the capability to ensure that the same IP address is always offered to the replacement device as the device being replaced. This IP address is always offered to the same connected port even as the client ID or client hardware address (chaddr) changes in the DHCP messages received on that port.
If this feature is configured, the port name of the interface overrides the information the client sends and the actual point of connection. Then a port on the switch becomes the client ID.
In all cases, if you connect the Ethernet cable to the same port, the same IP address is allocated through the DHCP to the attached device. The figure below shows an industrial Ethernet switch using DHCP to assign one IP address per port to directly connected manufacturing devices.
Figure 1 | DHCP Server Port-Based Address Assignment to Directly Connected Manufacturing Devices |
How to Configure DHCP Server Port-Based Address Allocation
- Automatically Generating a Subscriber Identifier for a DHCP Message Received on a Port
- Preassigning IP Addresses and Associating Them to a Client
- Preassigning IP Addresses and Associating Them to a Client
Automatically Generating a Subscriber Identifier for a DHCP Message Received on a Port
Perform this task to automatically generate a unique ID, called a subscriber ID for a DHCP message received on a port.
If the DHCP Server Port-Based Address Allocation feature is configured, the subscriber ID value is used in place of the client ID to provide stable IP address assignment. The subscriber ID value is based on the short name of the port to which the directly connected device is attached. If this device is removed and replaced with a new device, the new device maintains the same subscriber ID.
The subscriber ID is used at the same point where the client ID or the client MAC address is currently captured during the DHCP IP address assignment process.
DETAILED STEPS
Troubleshooting Tips
Use the following command to debug any errors that you may encounter when you configure DHCP to automatically generate a unique ID:
- debug ip dhcp server packets
Preassigning IP Addresses and Associating Them to a Client
Perform this task to preassign an IP address and associate it to a client identified by a client ID or MAC address.
For port-based address assignment, you must perform the task in the Automatically Generating a Subscriber Identifier for a DHCP Message Received on a Port task to associate the client ID with the subscriber ID. The subscriber ID value is based on the short name of the port to which the directly connected device is attached.
Configure a normal DHCP pool by supplying any DHCP options and lease time. Preassigned addresses are automatically excluded from normal dynamic IP address assignment. Preassigned addresses cannot be used in host pools, but there can be multiple preassigned addresses per DHCP address pool.
Note |
|
DETAILED STEPS
Preassigning IP Addresses and Associating Them to a Client
Note |
Perform this task to restrict address assignments from the DHCP address pool only to preconfigured reservations. When the DHCP Server Port-Based Address Allocation feature is configured on multiple switches, devices connected to one switch may also receive an IP address assignment from the neighboring switches rather than the local DHCP address pool switch. If you want the switch to serve only the client directly connected to the switch, you can configure a group of switches with pools that share a common IP subnet and ignore the requests from other clients (not connected to this switch). > |
DETAILED STEPS
Configuration Examples for DHCP Server Port-Based Address Allocation
DHCP Server Port-Based Address Allocation Example
In the following example, a subscriber ID will be automatically generated based on the short name of the interface (port) specified by the address client-id command. The DHCP server will ignore any client ID fields in the DHCP messages and use this subscriber ID as the client ID. The DHCP client is preassigned IP address 10.1.1.7.
! ip dhcp use subscriber-id client-id ip dhcp subscriber-id interface-name ip dhcp excluded-address 10.1.1.1 10.1.1.3 ! ip dhcp pool dhcppool network 10.1.1.0 255.255.255.0 address 10.1.1.7 client-id Et1/0 ascii
The following example shows that the preassigned address was correctly reserved in the DHCP pool:
Router# show ip dhcp pool dhcppool
Pool test :
Current index IP address range Leased/Total
10.1.1.1 10.1.1.1 - 10.1.1.254 0 / 254
3 reserved addresses are currently in the pool :
Address Client
10.1.1.07 Et1/0
10.1.1.20 xyz
10.1.1.30 aabb.cc00.1501
Additional References
Related Documents
Related Topic |
Document Title |
---|---|
DHCP commands: complete command syntax, command mode, command history, defaults, usage guidelines, and examples |
Cisco IOS IP Addressing Services Command Reference |
Standards
Standard |
Title |
---|---|
No new or modified standards are supported by this feature and support for existing standards has not been modified by this feature. |
-- |
MIBs
MIB |
MIBs Link |
---|---|
No new or modified standards are supported by this feature and support for existing standards has not been modified by this feature. |
To locate and download MIBs for selected platforms, Cisco software releases, and feature sets, use Cisco MIB Locator found at the following URL: |
RFCs
RFC |
Title |
---|---|
No new or modified RFCs are supported by this feature. |
-- |
Technical Assistance
Description |
Link |
---|---|
The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. |
Feature Information for DHCP Server Port-Based Address Allocation
The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
Table 1 | Feature Information for DHCP Port-Based Address Allocation |
Feature Name |
Releases |
Feature Information |
---|---|---|
DHCP Server Port-Based Address Allocation |
12.2(33)SXI4 Cisco IOS XE 3.1.0SG |
The DHCP Server Port-Based Address Allocation feature provides port-based address allocation support on the Cisco IOS DHCP server for the industrial Ethernet platform. The DHCP server provides address assignment support based on the point of attachment of the client to the network. The following commands were introduced or modified: address client-id, address hardware-address, ip dhcp server use subscriber-id client-id, ip dhcp subscriber-id interface-name, ip dhcp use subscriber-id client-id, reserved-only, and show ip dhcp pool. |
Cisco and the Cisco Logo are trademarks of Cisco Systems, Inc. and/or its affiliates in the U.S. and other countries. A listing of Cisco's trademarks can be found at www.cisco.com/go/trademarks. Third party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1005R)
Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional and coincidental.