Example
The following example acquires an IP address on an Ethernet interface from DHCP.
Console (config)# interface ethernet g8
Console (config-if)# ip address dhcp
ip default-gateway
The ip default-gateway global configuration command defines a default gateway (router). To
remove the default gateway use the no form of this command.
Syntax
ip default-gateway ip-address
no ip default-gateway
•
ip-address — Valid IP address that specifies the IP address of the default gateway.
Default Configuration
No default gateway is defined.
Command Mode
Interface Configuration (Out-of-Band Ethernet)
User Guidelines
The setting of the default gateway on the out-of-band port must not precede the assignment of the
IP address. Always assign the IP address to the out-of-band port first, and then set the default
gateway.
Example
The following example defines ip default gateway 192.6.32.17.
Console (config)# interface out-of-band-eth 1
Console (config-oob)# ip address 192.168.1.23
Console (config-oob)# ip default-gateway 192.168.1.1
show ip interface
The show ip interface user EXEC command displays the usability status of interfaces configured
for IP.
IP Addressing Commands
161