08-20-2024 01:13 PM
Someone I'm working with has a new Catalyst 9500 switch. On it he has the following config:
boot system bootflash:packages.conf
boot system usbflash0:cat9k_iosxe.17.09.05.SPA.bin
!
ip dhcp-server 10.0.40.9
ip dhcp-server 10.10.6.211
ip dhcp relay information trust-all
!
What the heck is the "ip dhcp-server x.x.x.x" command? I know what a dchp helper IP does, but that's configured under an interface. He has no other DCHP configuration on his switch and his problem is that nothing on this switch can get a DHCP IP address from a Windows server that's also connected to the switch. Portfast is configured on all of the access ports. I've googled and searched through the catalyst commend reference for this "ip dhcp-server x.x.x.x" command and I can't find any info on it. Does anyone know what it is or what it does? Thank you!
Solved! Go to Solution.
08-20-2024 01:25 PM - edited 08-20-2024 01:26 PM
Hello @modular182
The command `ip dhcp-server x.x.x.x` on your catalyst 9500 is used to configure the switch as a DHCP client rather than a relay or server. This command specifies the IP address of a DHCP server that the switch itself should use to obtain an IP address for its interfaces or management purposes. This is not related to the traditional `ip helper-address` command that forwards DHCP requests from clients on the switch to a remote DHCP server; instead, it instructs the switch to query the specified DHCP servers to obtain its own IP configuration.
Given that this switch is likely intended to function as a DHCP relay agent, the absence of `ip helper-address` commands on the relevant interfaces could be the reason why clients connected to the switch are not receiving DHCP leases from the Windows server.
The correct approach would be to remove the `ip dhcp-server` command if it’s not needed and instead configure the appropriate `ip helper-address` under the interfaces where DHCP clients reside. This will forward the DHCP requests from clients to the Windows DHCP servers, allowing them to obtain IP addresses correctly.
08-20-2024 01:25 PM - edited 08-20-2024 01:26 PM
Hello @modular182
The command `ip dhcp-server x.x.x.x` on your catalyst 9500 is used to configure the switch as a DHCP client rather than a relay or server. This command specifies the IP address of a DHCP server that the switch itself should use to obtain an IP address for its interfaces or management purposes. This is not related to the traditional `ip helper-address` command that forwards DHCP requests from clients on the switch to a remote DHCP server; instead, it instructs the switch to query the specified DHCP servers to obtain its own IP configuration.
Given that this switch is likely intended to function as a DHCP relay agent, the absence of `ip helper-address` commands on the relevant interfaces could be the reason why clients connected to the switch are not receiving DHCP leases from the Windows server.
The correct approach would be to remove the `ip dhcp-server` command if it’s not needed and instead configure the appropriate `ip helper-address` under the interfaces where DHCP clients reside. This will forward the DHCP requests from clients to the Windows DHCP servers, allowing them to obtain IP addresses correctly.
08-20-2024 01:28 PM
Great info. Thank you for the help!
08-20-2024 01:44 PM - edited 08-20-2024 01:45 PM
The ip dhcp-server vrf command form can be used only when the device is used as an
Intelligent Services Gateway (ISG) for sending lease queries. For basic DHCP client
configuration (enabled using the command ip address dhcp), the vrf keyword is not needed.
that correct answer, when SW interface need to IP we can config ip add dhcp under interface and hence this interface become SW dhcp client
ip dhcp-server is used for ISG
MHM
08-20-2024 01:38 PM
Friend are you sure this is answer ?
can you share doc about this
thanks
MHM
08-20-2024 02:38 PM
You're right, very little to no information to be found on use of this command.
Is your Windows DHCP server one of the IPs listed?
From a Cisco router"
nserthostname-here(config)#ip dhcp-server ?
Hostname or A.B.C.D IP address or Name of DHCP server
Which, with a Name option, would seem to imply an external DHCP server.
Yes, I've found several example of setting up an internal DHCP server with a step like:
In the above, also find:
Verifying Internal DHCP Configuration
To verify client binding, use the following command:
Device# show ip dhcp binding
Bindings from all pools not associated with VRF:
IP address Client-ID/ Lease expiration Type State Interface
Hardware address/
User name
192.168.32.3 0130.b49e.491a.53 Mar 23 2018 06:42 PM Automatic Active Loopback0
To verify the DHCP relay statistics for a wireless client, use the following command:
Device# show wireless dhcp relay statistics
DHCP Relay Statistics
---------------------
DHCP Server IP : 10.10.10.1
Message Count
--------------------------
DHCPDISCOVER : 1
BOOTP FORWARD : 137
BOOTP REPLY : 0
DHCPOFFER : 0
DHCPREQUEST : 54
DHCPACK : 0
DHCPNAK : 0
DHCPDECLINE : 0
DHCPRELEASE : 0
DHCPINFORM : 82
Tx/Rx Time :
------------
LastTxTime : 18:42:18
LastRxTime : 00:00:00
Drop Counter :
-------------
TxDropCount : 0
Where the IP address does appear to be "external".
So, possibly this command determines what, and/or modified, DHCP packets are allowed to flow between DHCP clients and the external DHCP server.
Possibly somewhat similar to the additional configuration commands, like your global IP dhcp relay information that modify the default actions of the interface IP helper-address command.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide