Switch Management Commands 1954User GuidelinesThis command only applies to routing interfaces. When DHCP is enabled ona routing interface, the system automatically deletes all manually configuredIPv4 addresses on the interface.• The command no ip address removes the interface’s primary address(Manual/DHCP) including the secondary addresses, if configured, and setsthe Interface method to None.• The command no ip address dhcp removes the interface’s primary addressonly if configured through DHCP and sets the interface method to None.It does not remove a manually configured address.In addition to leasing an IP address and subnet mask, the DHCP client maylearn the following parameters from a DHCP server:• The IPv4 address of a default gateway. If the device learns different defaultgateways on different interfaces, the system uses the first default gatewaylearned. The system installs a default route in the routing table, with thedefault gateway’s address as the next hop address. This default route has apreference of 254.• The IPv4 address of a DNS server. The DNS client stores each DNS serveraddress in its server list.• A domain name. The DNS client stores each domain name in its domainname list.ExamplesTo enable DHCPv4 on vlan 2:console#configconsole(config)#interface vlan 2console(config-if-vlan2)#ip address dhcpip default-gatewayUse the ip default-gateway command to configure a default gateway (router).Syntaxip default-gateway ip-addressno ip default-gateway ip-address