Skip to main content
Brent-BITSLLC
Explorer
Mar 9, 2023 7:03 PM UTC
Question

Cable Testing via FortiGate CLI

I know how to use the FortiGate GUI to run a Cable Test diagnostic on a given interface, but I need to know how to do the same thing via FortiGate CLI.  Does anyone know the command for this?

5 replies

abarushka
Staff
Staff
Mar 10, 2023 10:07 PM UTC

Hello,

 

Could you please elaborate whether you are referring to HQIP or some other test?

Translate
Brent-BITSLLC
Explorer
Mar 10, 2023 11:39 PM UTC

I'm referencing what the GUI calls a Cable Test under Diagnostics & Tools. Its the one that tests a given interface to see if there are wire pair issues or shorts on a line. 

Translate
Esteemed Contributor III
Mar 11, 2023 8:09 AM UTC

Hello@Brent-BITSLLC,

You can use the below CLI command, I believe this is what you're looking for.

execute switch-controller switch-action cable-diag <switch> portX
Ex: execute switch-controller switch-action cable-diag FSxxxxxxxxxx port1

Translate
AaronG_47
New Member
Feb 2, 2025 5:20 AM UTC

To perform this you should use the CLI command,

From FortiGate CLI

execute switch-controller switch-action cable-diag <switch> portx

 

on CLI, this would look like,

(example)

execute switch-controller switch-action cable-diag S148xxxxxxxxxx port7

 

port7: cable (4 pairs, length +/- 25 meters)
pair A Ok, length 52 meters
pair B Short, length 52 meters
pair C Ok, length 56 meters
pair D Ok, length 52 meters

 

best regards,

 

Aaron

Translate
fortineteng
New Member
Mar 8, 2025 4:25 PM UTC

How accurate is the cable test usually? I have some cables behind a wall that I need to measure and currently it shows the screenshot below. 10 meters +/- is quite a bit for me to accurately gauge this cable length. Thanks

 

Screenshot 2025-03-08 at 11.22.40 AM.png

Translate
Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024