Connect
Connect
This chapter describes how to check switch port status and connectivity on the Catalyst 4500 series
switch.
This chapter includes the following major sections:
• Checking Module Status, page 5-1
• Checking Interfaces Status, page 5-2
• Checking MAC Addresses, page 5-3
• Using Telnet, page 5-3
• Changing the Logout Timer, page 5-4
• Monitoring User Sessions, page 5-4
• Using Ping, page 5-5
• Using IP Traceroute, page 5-7
• Using Layer 2 Traceroute, page 5-8
• Configuring ICMP, page 5-10
Note For complete syntax and usage information for the switch commands used in this chapter, look at the
Cisco Catalyst 4500 Series Switch Command Reference and related publications at this location:
http://www.cisco.com/en/US/products/hw/switches/ps4324/index.html
If the command is not found in the Catalyst 4500 Command Reference, it is located in the larger Cisco
IOS library. Refer to the Catalyst 4500 Series Switch Cisco IOS Command Reference and related
publications at this location:
http://www.cisco.com/en/US/products/ps6350/index.html
This example shows how to check module status for all modules on your switch:
Switch# show module all
Switch#
This example shows how to display the status of interfaces in error-disabled state:
Switch# show interfaces status err-disabled
Port Name Status Reason
Fa9/4 err-disabled link-flap
informational error message when the timer expires on a cause
--------------------------------------------------------------
5d04h:%PM-SP-4-ERR_RECOVER:Attempting to recover from link-flap err-disable state on Fa9/4
Switch#
This example shows how to display MAC address table information for a specific interface:
Switch# show mac-address-table interface gigabit 1/1
Multicast Entries
vlan mac address type ports
-------+---------------+-------+-------------------------------------------
1 ffff.ffff.ffff system Switch,Gi6/1,Gi6/2,Gi6/9,Gi1/1
Switch#
Using Telnet
You can access the switch command-line interface (CLI) using Telnet. In addition, you can use Telnet
from the switch to access other devices in the network. You can have up to eight simultaneous Telnet
sessions.
Before you can open a Telnet session to the switch, you must first set the IP address (and in some cases
the default gateway) for the switch. For information about setting the IP address and default gateway,
see Chapter 3, “Configuring the Switch for the First Time.”
Note To establish a Telnet connection to a host by using the hostname, configure and enable DNS.
To establish a Telnet connection to another device on the network from the switch, perform this task:
Command Purpose
Switch# telnet host [port] Opens a Telnet session to a remote host.
This example shows how to establish a Telnet connection from the switch to the remote host named
labsparc:
Switch# telnet labsparc
Trying 172.16.10.3...
Connected to labsparc.
Escape character is '^]'.
login:
Command Purpose
Switch# logoutwarning number Changes the logout timer value (a timeout value of 0 prevents idle
sessions from being disconnected automatically).
Use the no keyword to return to the default value.
Command Purpose
Switch# show users [all] Displays the currently active user sessions on the
switch.
This example shows the output of the show users command when local authentication is enabled for
console and Telnet sessions (the asterisk [*] indicates the current session):
Switch#show users
Line User Host(s) Idle Location
* 0 con 0 idle 00:00:00
Command Purpose
Switch# disconnect {console | ip_addr} Disconnects an active user session on the switch.
This example shows how to disconnect an active console port session and an active Telnet session:
Switch> disconnect console
Console session disconnected.
Console> (enable) disconnect tim-nt.bigcorp.com
Telnet session from tim-nt.bigcorp.com disconnected. (1)
Switch# show users
Session User Location
-------- ---------------- -------------------------
telnet jake jake-mac.bigcorp.com
* telnet suzy suzy-pc.bigcorp.com
Switch#
Using Ping
These sections describe how to use IP ping:
• Understanding How Ping Works, page 5-5
• Running Ping, page 5-6
The ping command is configurable from normal executive and privileged EXEC mode. Ping returns one
of the following responses:
• Normal response—The normal response (hostname is alive) occurs in 1 to 10 seconds, depending
on network traffic.
• Destination does not respond—If the host does not respond, a No Answer message is returned.
• Unknown host—If the host does not exist, an Unknown Host message is returned.
• Destination unreachable—If the default gateway cannot reach the specified network, a Destination
Unreachable message is returned.
• Network or host unreachable—If there is no entry in the route table for the host or network, a
Network or Host Unreachable message is returned.
To stop a ping in progress, press Ctrl-C.
Running Ping
To ping another device on the network from the switch, perform this task:
Command Purpose
Switch# ping host Checks connectivity to a remote host.
This example shows how to ping a remote host from normal executive mode:
Switch# ping labsparc
labsparc is alive
Switch> ping 72.16.10.3
12.16.10.3 is alive
Switch#
This example shows how to enter a ping command in privileged EXEC mode specifying the number of
packets, the packet size, and the timeout period:
Switch# ping
Target IP Address []: 12.20.5.19
Number of Packets [5]: 10
Datagram Size [56]: 100
Timeout in seconds [2]: 10
Source IP Address [12.20.2.18]: 12.20.2.18
!!!!!!!!!!
Using IP Traceroute
These sections describe how to use IP traceroute feature:
• Understanding How IP Traceroute Works, page 5-7
• Running IP Traceroute, page 5-7
Running IP Traceroute
To trace the path that packets take through the network, perform this task in EXEC or privileged EXEC
mode:
Command Purpose
Switch# trace [protocol] [destination] Runs IP traceroute to trace the path that packets
take through the network.
This example shows use the trace command to display the route a packet takes through the network to
reach its destination:
Switch# trace ip ABA.NYC.mil
Note For more information about enabling CDP, see Chapter 19, “Understanding and Configuring
CDP.”
• All switches in the physical path must have IP connectivity. When a switch is reachable from another
switch, you can test connectivity by using the ping command in privileged EXEC mode.
Command Purpose
Switch# traceroute mac {source-mac-address} Runs Layer 2 traceroute to trace the path that
{destination-mac-address} packets take through the network.
or
Command Purpose
Switch# traceroute mac ip {source-mac-address} Runs IP traceroute to trace the path that
{destination-mac-address} packets take through the network.
These examples show how to use the traceroute mac and traceroute mac ip commands to display the
physical path a packet takes through the network to reach its destination:
Switch# traceroute mac 0000.0201.0601 0000.0201.0201
Configuring ICMP
Internet Control Message Protocol (ICMP) provides many services that control and manage IP
connections. ICMP messages are sent by routers or access servers to hosts or other routers when a
problem is discovered with the Internet header. For detailed information on ICMP, refer to RFC 792.
Command Purpose
Switch (config-if)# [no] ip unreachables Enables ICMP destination unreachable messages.
Use the no keyword to disable the ICMP destination
unreachable messages.
To limit the rate that Internet Control Message Protocol (ICMP) destination unreachable messages are
generated, perform this task:
Command Purpose
Switch (config)# [no] ip icmp rate-limit Limits the rate that ICMP destination messages are
unreachable [df] milliseconds generated.
Use the no keyword to remove the rate limit and
reduce the CPU usage.
Command Purpose
Switch (config-if)# [no] ip redirects Enables ICMP Redirect messages.
Use the no keyword to disable the ICMP Redirect
messages and reduce CPU usage.
To have the Cisco IOS software respond to ICMP mask requests by sending ICMP Mask Reply
messages, perform this task:
Command Purpose
Switch (config-if)# [no] ip mask-reply Enables response to ICMP destination mask requests.
Use the no keyword to disable this functionality.