Set the Switch IP Address
To display the current IP address settings, enter the following commands:
# show ip interface brief
Vlan Address Method Status
---- -------------------- -------- ------
1 192.0.2.1/22 Manual UP
#
To set up the switch with a static IP address, enter the following commands. This example sets the switch
IP address to 192.0.2.1 with a subnet mask of 255.255.252.0:
# config term
(config)# interface vlan 1
(config-vlan)# ip address 192.0.2.1 255.255.252.0
(config-vlan)# exit
(config)# exit
To set up the switch to acquire an IP address using DHCP with a fallback address, enter the following
commands. This example sets the switch to acquire an IP address using DHCP, and if unsuccessful, will
set the IP address to 192.0.2.1 with a subnet mask of 255.255.252.0:
# config term
(config)# interface vlan 1
(config-vlan)# ip address dhcp fallback 192.0.2.1 255.255.252.0
(config-vlan)# exit
(config)# exit
To save these settings, enter the following command:
# copy running-config startup-config
Ping a Network Device
IP Ping <ip_target>
where <ip_target> is the IP address or quoted host name (Like 'google.com')