CLI Reference Guide-R05

Table Of Contents
Chapter 28
| IP Interface Commands
IPv4 Interface
– 816 –
Related Commands
ip dhcp restart client (803)
ip default-gateway (816)
ipv6 address (825)
ip default-gateway This command specifies the default gateway through which this switch can reach
other subnetworks. Use the no form to remove a default gateway.
Syntax
ip default-gateway gateway
no ip default-gateway
gateway - IP address of the default gateway
Default Setting
No default gateway is established.
Command Mode
Global Configuration
Command Usage
A default gateway can only be successfully set when a network interface that
directly connects to the gateway has been configured on the switch.
A gateway must be defined if the management station is located in a different
IP segment.
Example
The following example defines a default gateway for this device:
Console(config)#ip default-gateway 10.1.1.254
Console(config)#
Related Commands
ip address (814)
ipv6 default-gateway (824)
show ip
default-gateway
This command shows the IPv4 default gateway configured for this device.
Default Setting
None
Command Mode
Privileged Exec