System information
System Information Guide 19
2 From the Privileged Exec mode, type show ip redirects to display the assigned
gateway IP address, and then press <Enter>.
The following example displays IP settings assigned by bootp or dhcp using the CLI.
Before you can assign a static IP address to the switch, you must obtain the following
information from your network administrator:
• IP address for the switch
• Default gateway for the network
• Network mask for the network
To assign a static IP address to the switch:
1 From the Privileged Exec level global configuration mode prompt, type interface
vlan 1
to access the interface-configuration mode, and then press <Enter>.
2 Ty p e ip address ip-address netmask, where ip-address is the switch IP
address and
netmask is the network mask for the network.
3 Ty p e exit to return to the global configuration mode prompt and press <Enter>.
4 To set the IP address of the default gateway for the network to which the switch
belongs, type
ip default-gateway gateway, where gateway is the IP address of the
default gateway, and then press <Enter>.
5 To save your configuration changes, type copy running-config startup-config
and press <Enter>.
NOTICE: Only one VLAN can be assigned an IP address. If you assign an address to any other
VLAN, the new address overrides the original IP address.
Console#show ip interface
IP address and netmask: 10.1.0.1 255.255.252.0 on VLAN 1,
and address mode: User specified.
Console# show ip redirects
ip default gateway 10.1.0.254
Console#