A SERVICE OF

logo

IP Addressing Commands 359
Example
The following example sets VLAN 5 as management VLAN.
console(config)#ip address vlan 5
ip default-gateway
Use the ip default-gateway command in Global Configuration mode to
define a default gateway (router).
Syntax
ip default-gateway
ip-address
ip-address
— Valid IP address that specifies the IP address of the default
gateway.
Default Configuration
No default gateway is defined.
Command Mode
Global Configuration mode
User Guidelines
A static IP address must be configured using the ip address command before
setting the default gateway. The default gateway should reside on the subnet
defined by the ip address command.
NOTE: For management traffic forwarding decisions, a default-route configured on
the switch (CLI, Web, SNMP, or learned via routing protocol such as OSPF), takes
precedence over the ip default-gateway setting.
Example
The following example defines ip default-gateway as 10.240.4.1.
console(config)#ip default-gateway 10.240.4.1