The IP address for this switch is assigned via Dynamic Host Configuration Protocol
(DHCP) by default. This address may be used for management access over your
network. If this address is not compatible with your network, you can manually
configure a new address You may also need to a establish a default gateway between
this device and management stations that exist on another network segment.
Use this command to set the IP address for this device. Use the no form to restore the default IP address.
Syntax
ip address {ip-address netmask | bootp | dhcp}
no ip address
- ip-address - IP address
- netmask - Network mask for the associated IP subnet. This mask identifies the host address bits used for routing to specific subnets.
- bootp - Obtains IP address from Boot Protocol (BOOTP).
- dhcp - Obtains IP address from DHCP.
Default Setting
DHCP
Command Mode
Interface Configuration (VLAN)
Command Usage
NOTE: Only one VLAN can be assigned an IP address. When you assign an address to any VLAN, the original IP address is immediately disabled, and the new address takes effect. |
Example
In the following example, the device is assigned an address in VLAN 1.
(config)#interface vlan 1
(config-if)#ip address 192.168.1.5 255.255.255.0
(config-if)#
Related Commands
Use this command to submit a BOOTP or DCHP client request.
Default Setting
None
Command Mode
Privileged Exec
Command Usage
Example
In the following example, the device is reassigned the same address.
(config)#interface vlan 1
(config-if)#ip address dhcp
(config-if)#exit
#ip dhcp restart
#show ip interface
IP interface vlan
IP address and netmask: 10.1.0.54 255.255.255.0 on VLAN 1,
and address mode: Dhcp.
#
Related Commands
Use this command to a establish a static route between this device and management stations that exist on another network segment. Use the no form to remove the static route.
Syntax
ip default-gateway gateway
no ip default-gateway
gateway - IP address of the default gateway.
Default Setting
No static route is established.
Command Mode
Global Configuration
Command Usage
A gateway must be defined if the management station is located in a different IP segment.
Example
The following example defines a default gateway for this device:
(config)#ip default-gateway 10.1.0.254
(config)#
Related Commands
Use this command to display the settings of an IP interface.
Syntax
show ip interface
Default Setting
All interfaces
Command Mode
Privileged Exec
Command Usage
This switch can only be assigned one IP address. This address is used for managing the switch.
Example
#show ip interface
IP address and netmask: 10.1.0.54 255.255.255.0 on VLAN 1,
and address mode: User specified.
#
Related Commands
Use this command to show the default gateway configured for this device.
Default Setting
None
Command Mode
Privileged Exec
Example
#show ip redirects
ip default gateway 10.1.0.254
#
Related Commands
Use this command to send Internet Control Message Protocol (ICMP) echo request packets to another node on the network.
Syntax
ping host [count count][size size]
- host - IP address of the host.
- count - Number of packets to send. (Range: 1-16, default: 5)
- size - Number of bytes in a packet. (Range: 32-512)
The actual packet size will be eight bytes larger than the size specified because the switch adds header information.
Default Setting
This command has no default for the host.
Command Mode
Normal Exec, Privileged Exec
Command Usage
Example
#ping 10.1.0.19
Type ESC to abort.
PING to 10.1.0.19, by 5 32-byte payload ICMP packets, timeout is 5 seconds
response time: 0 ms
response time: 10 ms
response time: 10 ms
response time: 10 ms
response time: 10 ms
Ping statistics for 10.1.0.19:
5 packets transmitted, 5 packets received (100%), 0 packets lost (0%)
Approximate round trip times:
Minimum = 0 ms, Maximum = 10 ms, Average = 8 ms
#