IP Addressing Commands 495
• The IPv4 address of a default gateway. If the device learns different default
gateways on different interfaces, the system uses the first default gateway
learned. The system installs a default route in the routing table, with the
default gateway’s address as the next hop address. This default route has a
preference of 254.
• The IPv4 address of a DNS server. The DNS client stores each DNS server
address in its server list.
• A domain name. The DNS client stores each domain name in its domain
name list.
Examples
To enable DHCPv4 on vlan 2:
console#config
console(config)#interface vlan 2
console(config-if-vlan2)#ip address dhcp
ip default-gateway
Use the ip default-gateway command in Global Configuration mode to
configure a default gateway (router).
Syntax
ip default-gateway
ip-address
no ip default-gateway
ip-address
Parameter Description
Default Configuration
No default gateway is defined.
Parameter Description
ip-address
Valid IPv4 address of an attached router.
2CSPC4.X8100-SWUM102.book Page 495 Friday, March 15, 2013 8:56 AM