ip default-gateway

This topic explains the command that sets the default gateway IPv4 address of the switch.

Syntax

ip default-gateway a.b.c.d

Parameter

a.b.c.d: Specify the default gateway IPv4 address for the switch. The IP address is represented by a.b.c.d.

Default

The default IP address of the default gateway is 192.168.0.254.

Mode

Global Configuration

Usage

Use this command to set the default gateway address.

Example

This example shows how to modify the default gateway address of the switch:

CODE
Switch(config)# ip default-gateway 192.168.0.100

This example shows how to show the current default gateway address of the switch:

CODE
Switch# show ip
###### Config ######
IP Address: 192.168.0.239
Subnet Netmask: 255.255.255.0
Default Gateway: 192.168.0.100

###### Status ######
IP Address: 192.168.0.239
Subnet Netmask: 255.255.255.0
Default Gateway: 192.168.0.100