To diagnose the cable in D-Link switches, take the DES-3200 model as an example, just type:
cable_diag ports PORT_NUMBER
For example, perform the diagnostics of ports 1 through 5:
cable_diag ports 1-5
Via the web interface, this function can be found in the “Monitoring” -> “Cable Diagnostic“.
The test can show the distance at which the cable may be damaged.