ip default-gateway

Configures the default gateway for a Layer 2 switch.
Syntax
ip default-gateway ip-address
no ip default-gateway ip-address
Command Default

Default gateway is not configured.

Parameters
ip-address
Specifies the IP address of the default gateway.
Modes

Global configuration mode

Usage Guidelines

The no form of the command removes the configured default gateway.

Examples

The following example configures the default gateway.

device(config)# ip default-gateway 10.30.5.1