Each controller connects to the first and last disk shelf in each stack in the system through the controller SAS ports. The controller SAS A and C ports connect to the first disk shelf square ports. The controller SAS B and D ports connect to the last disk shelf circle ports. These controller SAS ports can be on a SAS HBA in a physical PCI slot (slot 1-N) or on the base controller.
The A and C ports on controller 1/A connect to IOM A. The A and C ports on controller 2/B connect to IOM B.
For example, the following illustration shows how controller ports A and C are connected to disk shelves that have the IOMs arranged side by side, similar to how a EXN3500 disk shelf is oriented:

For example, the following illustration shows how controller ports A and C are connected to disk shelves that have the IOMs arranged one above the other, similar to how a EXN3000 disk shelf is oriented:

For example, a controller with slots 1, 2, and 3 occupied with quad-port SAS HBAs is cabled in order of slots and ports 1a, 2a, 3a, 1c, 2c, 3c:

For example, a controller with slots 0, 1, and 2 occupied (slot 0 being an onboard port and slot 1 and slot 2 being quad-port SAS HBAs) is cabled in order of slots and ports 0a, 1a, 2a, 1c, 2c:

The B and D ports on controller 1/A connect to IOM B. The B and D ports on controller 2/B connect to IOM A.
For example, the following illustration shows how controller ports B and D are connected to disk shelves that have the IOMs arranged side by side, similar to how a EXN3500 disk shelf is oriented:

For example, the following illustration shows how controller ports B and D are connected to disk shelves that have the IOMs arranged one above the other, similar to how a EXN3000 disk shelf is oriented:

The cabling offset ensures system resiliency.
For example, a controller with three quad-port SAS HBAs in slots 1, 2, and 3 is cabled in order of slots and ports 2b, 3b, 1d, 2d, 3d, 1b:

For example, a controller with slots 0, 1, and 2 occupied (slot 0 being an onboard port and slot 1 and 2 being quad-port SAS HBAs) is cabled in order of slots and ports 1b, 2b, 1d, 2d, 0b:

A controller with one quad-port HBA is cabled in order of port 1d and then 1b:

Controllers are cabled to the stacks according to the sequence of the stacks, such as stack 1, stack 2, stack 3, and so on.
For single-controller N3400 configurations, the controller is in Slot B (the bottom slot); therefore, the controller is cabled as if it were controller 2/B. If a second controller is added to make this an HA pair configuration, the new controller is cabled as controller 1/A.