Command Reference Guide
IP Routing Commands
CLI Command Reference
September 2014 Page 510
HP Moonshot Switch Module CLI Command Reference
ip address dhcp
This command enables the DHCPv4 client on an in-band interface so that it can acquire network information,
such as the IP address, subnet mask, and default gateway, from a network DHCP server. When DHCP is enabled
on the interface, the system automatically deletes all manually configured IPv4 addresses on the interface.
To enable the DHCPv4 client on an in-band interface and send DHCP client messages with the client identifier
option, use the ip address dhcp client-id configuration command in interface configuration mode.
Example: In the following example, DHCPv4 is enabled on interface 0/4/1.
(router1) #config
(router1) (Config)#interface 0/4/1
(router1) (Interface 0/4/1)#ip address dhcp
no ip address dhcp
The no ip address dhcp command releases a leased address and disables DHCPv4 on an interface. The no form
of the ip address dhcp client-id command removes the client-id option and also disables the DHCP client on
the in-band interface.
ip default-gateway
This command manually configures a default gateway for the switch. Only one default gateway can be
configured. If you invoke this command multiple times, each command replaces the previous value.
When the system does not have a more specific route to a packet’s destination, it sends the packet to the
default gateway. The system installs a default IPv4 route with the gateway address as the next hop address. The
route preference is 253. A default gateway configured with this command is more preferred than a default
gateway learned from a DHCP server.
Default disabled
Format
ip address dhcp [client-id]
Mode Interface Config
Format
no ip address dhcp [client-id]
Mode Interface Config
Format
ip default-gateway ipaddr
Mode Global Config
Parameter Description
ipaddr The IPv4 address of an attached router.