• If a switch port is connected to a DHCP client, configure a port as untrusted by entering the no ip dhcp snooping trust interface configuration command. • You can display DHCP snooping statistics by entering the show ip dhcp snooping statistics user EXEC command, and you can clear the snooping statistics counters by entering the clear ip dhcp snooping statistics privileged EXEC command. DHCP Server and Switch Stacks The DHCP binding database is managed on the active switch. When a new active switch is assigned, the new active switch downloads the saved binding database from the TFTP server.
When a switch changeover happens, the new active switch will use its database file that has been synced from the old active switch using the SSO function. The IP addresses associated with the lost bindings are released. You should configure an automatic backup by using the ip dhcp database url [ timeout seconds | write-delay seconds ] global configuration command. DHCP Server Port-Based Address Allocation DHCP server port-based address allocation is a feature that enables DHCP to maintain the same IP address on an Ethernet switch port regardless of the attached device client identifier or client hardware address.
When Ethernet switches are deployed in the network, they offer connectivity to the directly connected devices. In some environments, such as on a factory floor, if a device fails, the replacement device must be working immediately in the existing network. With the current DHCP implementation, there is no guarantee that DHCP would offer the same IP address to the replacement device. Control, monitoring, and other software expect a stable IP address associated with each device. If a device is replaced, the address assignment should remain stable even though the DHCP client has changed.
When configured, the DHCP server port-based address allocation feature ensures that the same IP address is always offered to the same connected port even as the client identifier or client hardware address changes in the DHCP messages received on that port. The DHCP protocol recognizes DHCP clients by the client identifier option in the DHCP packet. Clients that do not include the client identifier option are identified by the client hardware address. When you configure this feature, the port name of the interface overrides the client identifier or hardware address and the actual point of connection, the switch port, becomes the client identifier.
In all cases, by connecting the Ethernet cable to the same port, the same IP address is allocated through DHCP to the attached device. The DHCP server port-based address allocation feature is only supported on a Cisco IOS DHCP server and not a third-party server. Default Port-Based Address Allocation Configuration By default, DHCP server port-based address allocation is disabled. Port-Based Address Allocation Configuration Guidelines • By default, DHCP server port-based address allocation is disabled.
• To restrict assignments from the DHCP pool to preconfigured reservations (unreserved addresses are not offered to the client and other clients are not served by the pool), you can enter the reserved-only DHCP pool configuration command. Configuring DHCP DHCP Server and Switch Stacks Configuring DHCP 10