| IP Interface Commands
C
45
HAPTER
IPv4 Interface
ip default-gateway
show 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.
S
YNTAX
ip default-gateway gateway
no ip default-gateway
gateway - IP address of the default gateway
D
S
EFAULT
ETTING
No default gateway is established.
C
M
OMMAND
ODE
Global Configuration
C
U
OMMAND
SAGE
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.
E
XAMPLE
The following example defines a default gateway for this device:
Console(config)#ip default-gateway 10.1.1.254
Console(config)#
R
C
ELATED
OMMANDS
ip address (1396)
ipv6 default-gateway (1405)
This command shows the IPv4 default gateway configured for this device.
D
S
EFAULT
ETTING
None
C
M
OMMAND
ODE
Privileged Exec
E
XAMPLE
Console#show ip default-gateway
IP default gateway 10.1.0.254
Console#
– 1398 –