2.1.11. ip default-gateway

Syntax

ip default-gateway A.B.C.D

no ip default-gateway

Parameter


A.B.C.D Specify default gateway IPv4 address for switch


Default

Default IP address of default gateway is 192.168.1.254.

Mode

Global Configuration

Usage

Use ip default-gateway command to modify default gateway address. And use “no ip default-gateway” to restore default gateway address to factory default.

Example

This example shows how to modify the ipv4 address of the switch.

Switch(config)# ip default-gateway 192.168.1.100

This example shows how to show current ipv4 default gateway of the switch.

Switch# show ip
IP Address: 192.168.1.1
Subnet Netmask: 255.255.255.0
Default Gateway: 192.168.1.100