How to Copper Test a Port on a Switch through the Command Line Interface (CLI)
PDF(397.9 KB) View with Adobe Reader on a variety of devices
ePub(503.1 KB) View in various apps on iPhone, iPad, Android, Sony Reader, or Windows Phone
Mobi (Kindle)(274.5 KB) View on Kindle device or Kindle app on multiple devices
Updated:December 12, 2018
This article explains the performance of the copper ports test done by the Virtual Cable Tester (VCT) on Gigabit Ethernet (GE) ports through the Command Line Interface (CLI) of your switch.
The Copper Test feature of the switch tests whether a port can link up or not through a RJ45 connector and also helps to determine the cable performance with the use of the VCT. If an interface has problems, you can perform a diagnostic test on the cable that is plugged on that interface to see its status. With this information in hand, you can make better decisions when you troubleshoot an interface.
Through the CLI of your switch, you can use the Time Domain Reflectometry (TDR) technology to test the quality and characteristics of a copper cable attached to a port. Cables of up to 140 meters long can be tested.
Note: To learn how to copper test a port through the web-based utility of the switch, click here.
1.4.7.05 - Sx300, Sx500
220.127.116.11 - Sx350, SG350X, Sx550X
Copper Test a Port on a Switch through the CLI
Preconditions to Running the Copper Port Test
Before running the test, do the following:
Use a CAT6a data cable when testing cables.
(Mandatory) Disable Short Reach mode. Basic cable test results are accurate if Short Reach is disabled.
(Optional) Disable Energy Efficient Ethernet (EEE). The advanced cable test results are accurate if EEE is disabled on the port that you are going to test.
Note: To learn how to configure the Short Reach and EEE settings on the ports of your switch through the CLI, click here for instructions.
Important: When a port is tested, it is set to the Down state and communications are interrupted. After the test, the port returns to the Up state.
Run the Copper Port Test
Step 1. Log in to the switch console. The default username and password is cisco/cisco. If you have configured a new username or password, enter the credentials instead.
Note: The available commands or options may vary depending on the exact model of your device. In this example, the SG350X switch is accessed through Telnet.
Step 2. In the Privileged EXEC mode of the switch, run the port test by entering either of the following command:
interface-id — (Optional) Specifies an Ethernet port ID.
Note: In this example, GE1/0/2 is used as the specific interface to copper test.
The test above shows that the cable on the tested port has short circuit at 0 meter. This indicates that the cable used on the specific port could be damaged.
Step 3. (Optional) Replace the damaged cable on the port and then run the port test again on the same interface.
The test above shows that the cable on the tested port is good after the cable has been changed.
Step 4. (Optional) Repeat Step 2 to the remaining ports on your switch that you want to test.
Note: Copper port test does not work on fiber ports. If the port that you are going to test is a part of a combination port with fiber port active, it does not need to be shut down because the test does not work on fiber ports.
You have now successfully run the copper port test on the specific port on your switch through the CLI.
View the Copper Port Test Results
In the event of an open or shorted cable, the accuracy of length of where the cable is open or shorted is -/+ 2 meters. Follow these steps to show the copper port test results on your switch through the CLI:
Step 1. In the Privileged EXEC mode of the switch, show the results of the copper test performed to all ports or to a specific port by entering the following:
interface interface-id — (Optional) Specifies an Ethernet port ID.
Note: In this example, show cable-diagnostics cable-length command is entered.
The Cable Diagnostics Cable Length table shows the following information:
Port — The name of the interface.
Length — The cable length in meters.
The table above shows that Gigabit Ethernet ports 1, 2, 3, 5, 6, 7, and 9 have less than 50 meters cable attached, while the rest are not active. All Ten Gigabit Ethernet ports are fiber ports, therefore, the Copper port test does not work on them.
You have now successfully viewed the results of copper tests that were conducted on the ports of your switch.