- Configuring the Cisco IOS DHCP Server
- DHCP Client Option 12
- IPv6 Access Services: DHCPv6 Prefix Delegation
- IPv6 Access Services: DHCPv6 Relay Agent
- DHCP Client
- DHCPv6 Server Stateless Autoconfiguration
- DHCPv6 Server Timer Options
- DHCPv6 Individual Address Assignment
- DHCPv6 Ethernet Remote ID Option
- DHCPv6 Relay—Reload Persistent Interface ID Option
- DHCP Server Port-Based Address Allocation
- DHCP Relay Agent Support for Unnumbered Interfaces
- DHCPv6 Repackaging
- DHCP—DHCPv6 Guard
- Index
- 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
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 caveats and feature information, see Bug Search Tool and 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.
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.
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.
1.
enable
2.
configure
terminal
3.
ip
dhcp
use
subscriber-id
client-id
4.
interface
type
number
5.
ip
dhcp
server
use
subscriber-id
client-id
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 |
|
1.
enable
2.
configure
terminal
3.
ip
dhcp
pool
name
4.
network
network-number
[mask | / prefix-length]
5.
address
ip-address
client-id
string
[ascii]
6.
address
ip-address
hardware-address
mac-address
[hardware-number]
7.
end
8.
show
ip
dhcp
pool
[name]
9.
show
ip
dhcp
binding
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). > |
1.
enable
2.
configure
terminal
3.
ip
dhcp
pool
name
4.
reserved-only
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.
Feature Name |
Releases |
Feature Information |
---|---|---|
DHCP Server Port-Based Address Allocation |
Cisco IOS XE Release 3.2SE |
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. |