* Conoscenza del computer >> Reti informatiche >  >> Reti locali (LAN)

Modificare Impostazione Duplex e Velocità su Switch Cisco Catalyst 3550/2960/3560/3750/3850/9000

La negoziazione automatica (Auto-Negotiation, IEEE 802.3u Clause 28) funziona bene nella maggior parte dei casi. Tuttavia, **mismatch duplex/speed** (es. lato switch Auto, lato device forzato 100/Full) causa **collisioni late, CRC errors, runts, throughput crollato, disconnessioni**. Forzare speed/duplex su **entrambe** le estremità risolve il problema.

Quando Forzare Speed/Duplex

  • Device legacy / industriali / embedded senza Auto-Negotiation (vecchie stampanti, PLC, server vecchi, NIC server forced).
  • Cavi lunghi (>90m) / qualità bassa / patch cord danneggiati → negoziazione fallisce o instabile.
  • Interoperabilità vendor diversi (raro oggi, standardizzato).
  • Troubleshooting: Isolare variabile per test.

Procedura via CLI (Console/SSH)

  1. Connettersi: Console (cavo rollover RJ45-DB9/USB) → PuTTY/Terminale → Serial (9600 8N1) **OPPURE** SSH `ssh admin@switch-ip`.
  2. `enable` → Password enable.
  3. `configure terminal`.
  4. Selezionare interfaccia/e:
    • Singola: `interface GigabitEthernet1/0/1` (o `FastEthernet0/1` su 3550/2960 legacy).
    • Range: `interface range GigabitEthernet1/0/1 - 24`.
  5. Impostare Velocità (Speed) PRIMA del Duplex:
    speed 100      ! 10, 100, 1000, auto, nonegotiate (per fibra/SFP)
    ! Su porte 10/100/1000 (RJ45): 10, 100, 1000, auto
    ! Su porte SFP/SFP+: nonegotiate (obbligatorio per moduli ottici), speed non applicabile
    
  6. Impostare Duplex:
    duplex full    ! full, half, auto
    ! half SOLO se speed 10 o 100. Gigabit (1000) **richiede** full duplex (standard).
    ! Se speed auto → duplex auto (obbligatorio).
    
  7. `exit` (esce da interface config).
  8. Ripetere per altre interfacce/range.
  9. `end` → `write memory` / `copy run start`.

Esempio Completo: Porta Gi1/0/5 → Forzata 100 Mbps Full Duplex (Per Device Legacy)

enable
configure terminal
interface GigabitEthernet1/0/5
 speed 100
 duplex full
 description Legacy_Printer_Forced_100F
 spanning-tree portfast
 spanning-tree bpduguard enable
 exit
end
write memory

Verifica e Troubleshooting

  • `show interfaces GigabitEthernet1/0/5 status` → `Speed: 100`, `Duplex: Full`, `Status: connected`.
  • `show interfaces Gi1/0/5 counters errors` → `CRC`, `Runts`, `Collisions`, `Late Collisions`. **Devono essere 0 o non incrementare**.
  • `show interfaces Gi1/0/5` → `Auto-negotiation: Disabled` (se forced).
  • Se errori persistono: **Verificare lato device** (stesso speed/duplex forced), **cavo** (sostituire CAT5e/6, test certificazione), **porta switch** (spostare su altra porta).

Best Practice

  • Default: `speed auto` `duplex auto` su **tutte** le porte. Funziona 99.9% casi moderni.
  • Forzare **SOLO** se necessario documentato. **Documentare** in description (`Forced_100F_Legacy_Printer_SN12345`).
  • Mai forzare un lato solo. Entrambi i lati forced identici, OPPURE entrambi auto.
  • Porte **SFP/SFP+ (Fibra/DAC/AOC)**: `speed nonegotiate` (obbligatorio). Nessun comando `duplex` (sempre full).
  • Multi-Gig (2.5G/5G/10G BASE-T): `speed auto` (negozia 100/1000/2500/5000/10000). Forzare `speed 2500` `duplex full` se necessario.

Reti locali (LAN)