speed [10|100|1000|auto]
Sets the speed of a Cisco switch or router interface to a specific value or auto-negotiation.
Definition: speed [10|100|1000|auto] is a Cisco IOS interface config command. Sets the speed of a Cisco switch or router interface to a specific value or auto-negotiation.
Overview
The `speed` command in Cisco IOS is used to manually set the data rate of a switch or router interface to a specific value (10, 100, or 1000 Mbps) or to enable auto-negotiation. This command is critical for ensuring proper link establishment and performance between network devices. In Ethernet networking, speed and duplex settings must match on both ends of a link for reliable communication.
Auto-negotiation (the default) allows devices to automatically select the highest common speed and duplex mode. However, in some scenarios—such as connecting to older equipment, troubleshooting link issues, or enforcing a specific speed for policy reasons—you may need to manually set the speed. The command is typically used in conjunction with the `duplex` command, as speed and duplex are closely related.
When you manually set speed, you should also manually set duplex to avoid mismatches. The `speed` command is available in interface configuration mode and requires privileged EXEC access (enable mode). Changes take effect immediately and are written to the running configuration; they persist after reload only if saved to startup configuration.
A common pitfall is forgetting that on some platforms (e.g., certain Cisco switches), setting speed to a non-auto value forces the interface to use half-duplex if not explicitly set, leading to performance issues. The command is essential for network engineers when deploying new links, migrating to higher speeds, or troubleshooting flapping interfaces. It fits into the broader configuration workflow after basic interface configuration (IP address, description) and before verifying with `show interfaces` or `show interfaces status`.
Understanding the `speed` command is foundational for CCNA and CCNP candidates, as it appears in exam topics related to interface configuration and troubleshooting.
speed [10|100|1000|auto]When to Use This Command
- Manually setting a switch port to 100 Mbps full duplex to match an older device that doesn't support auto-negotiation.
- Forcing a router WAN interface to 1000 Mbps to ensure maximum throughput on a known gigabit link.
- Setting a port to 10 Mbps to intentionally limit bandwidth for traffic shaping or testing.
- Configuring auto-negotiation on a port to allow the device to automatically select the best speed with the connected device.
Parameters
| Parameter | Syntax | Description |
|---|---|---|
| speed-value | 10 | 100 | 1000 | auto | Specifies the interface speed in Mbps. Use `10` for 10 Mbps, `100` for 100 Mbps, `1000` for 1 Gbps, or `auto` to enable auto-negotiation. Not all speeds are supported on all interface types; for example, 1000 Mbps is only valid on Gigabit Ethernet interfaces. A common mistake is setting speed to 1000 on a Fast Ethernet interface, which will be rejected. |
Command Examples
Setting interface speed to 100 Mbps
speed 100Switch(config-if)# speed 100 Switch(config-if)#
The command sets the interface speed to 100 Mbps. No output is shown if successful; the prompt returns.
Setting interface speed to auto-negotiate
speed autoSwitch(config-if)# speed auto Switch(config-if)#
The command enables auto-negotiation on the interface. The device will automatically negotiate speed with the connected device.
Understanding the Output
The 'speed' command does not produce any output on its own; it simply configures the interface. To verify the speed setting, use 'show interfaces [interface]' or 'show interfaces status'. In 'show interfaces', look for the line 'BW 100000 Kbit' for 100 Mbps or 'BW 1000000 Kbit' for 1000 Mbps.
In 'show interfaces status', the 'Speed' column shows the configured or negotiated speed. A mismatch between the configured speed and the actual link speed indicates a problem, often due to duplex mismatch or faulty cabling.
Configuration Scenarios
Manually set speed to 100 Mbps on a switch port connecting to a legacy device
A legacy printer with a 10/100 Ethernet card is connected to a Cisco switch port. The printer does not support auto-negotiation and requires a fixed speed of 100 Mbps. Manually setting the speed ensures a stable link.
Topology
Switch(Gi0/1)---PrinterSteps
- 1.Step 1: Enter global configuration mode: Switch> enable
- 2.Step 2: Enter interface configuration mode: Switch# configure terminal
- 3.Step 3: Select the interface: Switch(config)# interface GigabitEthernet0/1
- 4.Step 4: Set the speed to 100 Mbps: Switch(config-if)# speed 100
- 5.Step 5: Set duplex to full (recommended when manually setting speed): Switch(config-if)# duplex full
- 6.Step 6: Exit and verify: Switch(config-if)# end
- 7.Step 7: Check interface status: Switch# show interfaces GigabitEthernet0/1
! interface GigabitEthernet0/1 speed 100 duplex full !
Verify: Use `show interfaces GigabitEthernet0/1` and look for '100Mb/s' in the output. Also check 'Full-duplex' and 'Link status is up'.
Watch out: If you set speed manually without also setting duplex, the switch may default to half-duplex, causing a duplex mismatch if the printer is set to full-duplex.
Enable auto-negotiation on a router interface to allow dynamic speed adjustment
A router connects to an ISP modem that supports various speeds. To ensure the highest possible speed is negotiated automatically, the interface should use auto-negotiation.
Topology
Router(Gi0/0)---ISP ModemSteps
- 1.Step 1: Enter privileged EXEC mode: Router> enable
- 2.Step 2: Enter global configuration mode: Router# configure terminal
- 3.Step 3: Select the interface: Router(config)# interface GigabitEthernet0/0
- 4.Step 4: Set speed to auto: Router(config-if)# speed auto
- 5.Step 5: Set duplex to auto (recommended): Router(config-if)# duplex auto
- 6.Step 6: Exit and verify: Router(config-if)# end
- 7.Step 7: Check negotiated speed: Router# show interfaces GigabitEthernet0/0
! interface GigabitEthernet0/0 speed auto duplex auto !
Verify: Use `show interfaces GigabitEthernet0/0` and look for 'Auto-negotiation' and the negotiated speed (e.g., '1000Mb/s').
Watch out: If the remote device does not support auto-negotiation, the link may not come up or may negotiate to a lower speed. Always verify compatibility.
Troubleshooting with This Command
When troubleshooting interface speed issues, the `speed` command is often used in conjunction with `show interfaces` and `show interfaces status`. A healthy interface should show the expected speed and duplex, with no errors or drops. Problem indicators include: 'speed not set' (if auto-negotiation fails), 'speed mismatch' (if one side is manual and the other auto), or 'duplex mismatch' (common when speed is set manually without duplex).
Key fields to focus on in `show interfaces` output are 'Speed', 'Duplex', 'Auto-negotiation', and 'Input/Output errors'. Common symptoms that the `speed` command helps diagnose include: interface flapping (up/down), slow performance, or no link. A typical diagnostic flow: 1) Check interface status with `show interfaces`; if speed is 'unknown' or 'auto-negotiation failed', proceed. 2) Verify the cable and remote device. 3) Try setting speed manually to a known good value (e.g., 100) and duplex full. 4) If link comes up, the issue was auto-negotiation. 5) If not, check for hardware faults.
Correlate `show interfaces` with `show interfaces status` (which shows speed/duplex in a table) and `show controllers` (for physical layer details). On switches, `show interfaces trunk` can reveal speed issues on trunk links. Always ensure both ends match; mismatched speed/duplex cause CRC errors and collisions.
Use `debug interface` with caution in production. For persistent issues, consider replacing cables or SFPs. The `speed` command is a first-line troubleshooting tool for physical layer problems.
CCNA Exam Tips
Remember that on Cisco switches, the 'speed' command is available in interface configuration mode, and the default is 'auto'.
Know that if you set speed manually, you should also set duplex manually to avoid mismatch; auto-negotiation handles both.
The CCNA exam may test that 'speed 1000' is only valid on Gigabit Ethernet interfaces; 10/100 ports cannot be set to 1000.
Be aware that 'speed auto' is the default and is recommended for most scenarios to avoid configuration errors.
Common Mistakes
Setting speed to 1000 on a FastEthernet (10/100) port, which will be rejected with an error.
Forgetting to set duplex when manually setting speed, leading to duplex mismatch and poor performance.
Assuming 'speed auto' will always result in the highest speed; it depends on the capabilities of both devices.
speed [10|100|1000|auto] vs duplex [full|half|auto]
The speed and duplex commands are often paired because they both control physical layer interface parameters and are typically configured together to match the settings of the connected device. Misconfigurations can lead to interface errors or link failures.
| Aspect | speed [10|100|1000|auto] | duplex [full|half|auto] |
|---|---|---|
| Scope | Sets link speed (10/100/1000 Mbps or auto) | Sets half/full duplex or auto |
| Configuration mode | Interface configuration mode | Interface configuration mode |
| Persistence | Persistent in running config; saved on write memory | Persistent in running config; saved on write memory |
| Precedence | Manual speed overrides auto-negotiation | Manual duplex overrides auto-negotiation |
| Interdependence | Manual speed disables auto-negotiation; duplex should be set manually | Manual duplex disables auto-negotiation; speed should be set manually |
| Typical use | Fix speed mismatches or force a specific speed | Resolve duplex mismatches or force full duplex |
Use speed [10|100|1000|auto] when you need to fix speed mismatches, force a specific speed for compatibility, or when auto-negotiation is unreliable on the connected device.
Use duplex [full|half|auto] when you need to resolve duplex mismatches, force full duplex for performance, or when the connected device does not support auto-negotiation.
Platform Notes
In IOS-XE (e.g., Catalyst 9000 series), the `speed` command syntax is identical to classic IOS, but output formatting may differ slightly (e.g., `show interfaces` includes more details). On NX-OS (e.g., Nexus switches), the equivalent command is `speed` in interface configuration mode, but NX-OS also supports `speed 1000` on 10G interfaces (which may be rejected on classic IOS). For ASA firewalls, the `speed` command is available under interface configuration, but ASA uses `duplex` similarly.
In IOS-XR (e.g., ASR 9000), the command is `speed` under interface configuration, but XR requires a commit after changes. Older IOS versions (12.x) may not support `speed 1000` on all interfaces; 15.x and 16.x have broader support. Always check platform documentation for exact syntax and supported speeds.
Related Commands
duplex [full|half|auto]
Sets the duplex mode on a switch or router interface to full, half, or auto-negotiation.
show interfaces
Displays detailed Layer 1 and Layer 2 statistics for all interfaces or a specific interface: line protocol state, hardware type, MAC address, MTU, bandwidth, duplex, speed, input/output rates, error counters, and queue statistics.
show interfaces status
Displays a summary of all switch interfaces including their status, VLAN, duplex, speed, and type, used to quickly verify interface connectivity and configuration.
Practice for the CCNA 200-301
Test your knowledge with practice questions covering all CCNA 200-301 exam domains.
Practice CCNA 200-301 Questions