Cisco switches use Ethernet autonegotiation by default to determine the speed and duplex setting for its switch port interfaces. If you wish to manually set these values you can do so with the duplex interface command or the speed interface command.
Switch ports can determine the speed of an interface dynamically through various methods. Networking devices are capable of sensing the speed of an interface by using the Fast Link Pulses (FLP) of the autonegotiation process.
If autonegotiation is turned off however, the switch can detect the interface speed based on the incoming electrical signal.
Links can begin generating errors or stop functioning if you manually set the speed of both sides to different values.
Switches are capable of detecting duplex by autonegotiation only, and only if both sides are set for autonegotiation.
If either port on each side of the connection has autonegotiation disabled and instead has a hard-coded duplex setting, the other side is forced to use the default duplex.
Cisco switches default to Half Duplex (HDX) for 10Mbps and 100 Mbps interfaces, they default to Full Duplex (FDX) only on 1000Mbps interfaces or higher.
To disable autonegotiation on a switch port all you do is manually set the value using the duplex interface command.