The factory default configuration is set to use DHCP for VLAN 1, with address
0.0.0.0 and subnet mask 255.0.0.0. The address obtained from the DHCP server
may be used for management access over your network. If necessary, 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 BOOTP.
dhcp - Obtains IP address from DHCP.
Default Setting
None
Command Mode
Interface Configuration (VLAN)
Command Usage
You must assign an IP address to this device to gain management access over
the network. You can manually configure a specific IP address, or direct the
device to obtain an address from a BOOTP or DHCP server. Valid IP addresses
consist of four decimal numbers, 0 to 255, separated by periods. Anything
outside this format will not be accepted by the configuration program.
If you select the bootp or dhcp option, IP is enabled but
will not function until a BOOTP or DHCP reply has been received. Requests
will be broadcast periodically by this device in an effort to learn its IP
address. (BOOTP and DHCP values can include the IP address, default gateway,
and subnet mask).
You can start broadcasting BOOTP or DHCP requests by entering an ip dhcp
restart command, or by rebooting the switch.
NOTE: Only one VLAN interface can be assigned an IP address (the
default is VLAN 1). This defines the management VLAN, the only VLAN through
which you can gain management access to the switch. If you assign an IP
address to any other VLAN, the new IP address overrides the original IP
address and this becomes the new management VLAN.
Example
In the following example, the device is assigned an address in VLAN 1.
Use this command to submit a BOOTP or DCHP client request.
Default Setting
None
Command Mode
Privileged Exec
Command Usage
DHCP requires the server to reassign the client's last address if available.
If the BOOTP or DHCP server has been moved to a different domain, the network
portion of the address provided to the client will be based on this new domain.
Example
In the following example, the device is reassigned the same address.
Console(config)#interface vlan
1
Console(config-if)#ip address dhcp
Console(config-if)#exit
Console#ip dhcp restart
Console#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.
Console#
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-gatewaygateway 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:
Use this command to send ICMP echo request packets to another node on the network.
Syntax
pinghost [count count][sizesize]
host - IP address or IP alias 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
Use the ping command to see if another site on the network can be reached.
Following are some results of the ping command:
Normal response -The normal response occurs in one to ten seconds,
depending on network traffic.
Destination does not respond - If the host does not respond,
the switch displays "timeout."
Destination unreachable - The gateway for this destination indicates
that the destination is unreachable.
Network or host unreachable - The gateway found no corresponding
entry in the route table.
Press <Esc> to stop pinging.
Example
Console#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
Console#