Chapter 26
| IP Interface Commands
IPv4 Interface
– 648 –
Related Commands
ip dhcp restart client (635)
ip default-gateway (648)
ipv6 address (657)
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 (646)ipv6 default-gateway (656)
show ip
default-gateway
This command shows the IPv4 default gateway configured for this device.
Default Setting
None
Command Mode
Privileged Exec