Qué vas a conseguir
Entrar en un switch Cisco Catalyst sin miedo a romper nada, leer qué hay conectado y dónde, guardar y copiar la configuración, y resolver los dos tickets de red que más llegan a soporte: un puerto que el switch ha apagado solo y un puesto que hay que poner en su VLAN.
Antes de empezar
- Un usuario en el switch (nominal por TACACS+ o RADIUS si existe; la cuenta local es solo para emergencias) y saber si tienes nivel 15 o tienes que pasar a
enable. - Para consola: un cable de consola RJ45 o USB y PuTTY o similar a 9600 baudios, 8 bits, sin paridad, 1 bit de parada y sin control de flujo.
- El plano básico de la sede: qué switch es qué armario, qué VLAN es de usuarios, de voz y de impresoras.
En modo show no cambias nada. Todo lo que empieza por configure terminal sí, y en un switch de producción va con un cambio aprobado o con permiso del responsable de red.
1. Entrar: consola o SSH
La consola es para un switch nuevo, uno sin IP o uno al que ya no llegas por red. Lo normal es SSH contra la IP de gestión:
ssh adm-soporte@10.10.0.21SW-P1-01>enablePassword:SW-P1-01#terminal length 0El símbolo > es modo usuario; # es modo privilegiado. terminal length 0 quita el --More-- para que las salidas largas salgan enteras y se puedan copiar al ticket.
2. Los seis comandos que responden casi cualquier ticket
show interfaces statusshow mac address-table interface Gi1/0/14show vlan briefshow cdp neighborsshow logging | include Gi1/0/14show running-config interface Gi1/0/14Port Name Status Vlan Duplex Speed TypeGi1/0/14 PUESTO 1.07 connected 20 a-full a-1000 10/100/1000BaseTX Mac Address TableVlan Mac Address Type Ports---- ----------- -------- ----- 20 00a0.c914.2b7e DYNAMIC Gi1/0/14show interfaces status: una línea por puerto con estado (connected, notconnect, err-disabled, disabled), VLAN y velocidad. Es el primer vistazo.show mac address-table: qué MAC ha aprendido el switch en cada puerto. Con la MAC del PC (ipconfig /all) sabes en qué puerto está, sin bajar al armario:show mac address-table address 00a0.c914.2b7e.show vlan brief: qué VLAN existen y qué puertos de acceso hay en cada una.show cdp neighbors: qué equipo Cisco hay al otro lado de cada enlace (otro switch, un teléfono, un punto de acceso).show logging: los mensajes del switch. Un puerto que sube y baja, o que se apaga, deja rastro aquí.show running-config interface: la configuración de ese puerto y nada más.
3. Guardar y sacar una copia de la configuración
El switch tiene dos configuraciones: la running (la que está funcionando, en memoria) y la startup (la que carga al arrancar). Un cambio que no se guarda se pierde en el siguiente reinicio.
copy running-config startup-configDestination filename [startup-config]?Building configuration...[OK]copy running-config scp://adm-soporte@10.10.0.50/backups/SW-P1-01-2026-10-30.cfgcopy running-config tftp://10.10.0.50/SW-P1-01-2026-10-30.cfgcopy running-config startup-config(o su forma cortawrite memory) guarda. Se hace después de cada cambio que funciona, no antes.- Para una copia fuera del equipo, SCP va cifrado y pide usuario; TFTP no pide nada y viaja en claro, así que solo dentro de la red de gestión. Antes de un cambio, una copia a mano adjunta al ticket.
4. El ticket: "el puesto 1.07 se ha quedado sin red"
show interfaces status err-disabledshow logging | include Gi1/0/14show port-security interface Gi1/0/14Port Name Status Reason Err-disabled VlansGi1/0/14 PUESTO 1.07 err-disabled psecure-violation%PORT_SECURITY-2-PSECURE_VIOLATION: Security violation occurred, caused by MAC address 3c52.82a1.0f44 on port GigabitEthernet1/0/14.%PM-4-ERR_DISABLE: psecure-violation error detected on Gi1/0/14, putting Gi1/0/14 in err-disable statePort Security : EnabledPort Status : Secure-shutdownViolation Mode : ShutdownMaximum MAC Addresses : 1Sticky MAC Addresses : 1Security Violation Count : 1err-disabled significa que el switch ha apagado el puerto a propósito, y la columna Reason dice por qué. Los dos motivos más habituales en un puerto de usuario:
| Motivo | Qué pasó | Qué haces |
|---|---|---|
| psecure-violation | Port-security solo admite una MAC (aquí sticky, la primera que aprendió) y ha aparecido otra: un portátil nuevo, un PC cambiado de mesa | Confirmas que el equipo nuevo es legítimo, borras la MAC aprendida y reactivas el puerto |
| bpduguard | Han conectado un switch pequeño o un equipo que habla spanning-tree en un puerto de usuario | Se retira el aparato y se reactiva el puerto. No se desactiva BPDU Guard |
Aquí han cambiado el PC del puesto. Con el visto bueno de que el equipo es corporativo:
clear port-security sticky interface Gi1/0/14configure terminalinterface Gi1/0/14 shutdown no shutdownendshow interfaces Gi1/0/14 statuscopy running-config startup-configshutdown y no shutdown sacan el puerto de err-disabled. El nuevo equipo será la nueva MAC sticky, y como la sticky se guarda en la configuración, hay que guardar para que no vuelva la antigua tras un reinicio.
Algunos switches tienen errdisable recovery: el puerto se reactiva solo pasado un tiempo (300 segundos por defecto) para los motivos activados. show errdisable recovery dice cuáles. Pero un puerto que se recupera y vuelve a caer cada cinco minutos esconde el problema.
5. Poner un puesto en su VLAN
Un puesto nuevo, o uno que ha cambiado de departamento, necesita su puerto en la VLAN correcta:
show vlan brief | include 20|30configure terminalinterface Gi1/0/22 description PUESTO 1.15 switchport mode access switchport access vlan 20 switchport voice vlan 30endshow interfaces Gi1/0/22 statuscopy running-config startup-config- La VLAN tiene que existir (
show vlan brief). Si no aparece, no la crees tú: avisa a red, porque además tiene que llegar por la troncal. - Comprueba en el PC que coge una IP del rango de esa VLAN (
ipconfig /all). Si sale una 169.254.x.x, el switch está bien y el problema es de DHCP.
6. Qué poner en el ticket
Switch y puerto, estado antes y después, el motivo del err-disabled sacado del log, qué se cambió y la confirmación de que la configuración está guardada.
Siguientes pasos
- La guía de Cisco: switches y routers del Nivel 4 sigue desde aquí: troncales sin cortar una planta, el router con circuito de respaldo y cambios en remoto con red de seguridad.
- La guía de Cisco: switches, routers y salas de comunicaciones de una sede lo aplica a una sede real con sala de comunicaciones.
- Si el puesto coge una IP 169.254.x.x, sigue en la guía de DNS y DHCP en Windows Server.
¿Falta algo o en tu entorno es distinto? Escríbeme y lo corrijo.
What you'll get
Getting into a Cisco Catalyst switch without fear of breaking anything, reading what is connected and where, saving and copying the configuration, and fixing the two network tickets that reach support most often: a port the switch has shut down on its own, and a desk that needs to go into its VLAN.
Before you start
- A user on the switch (named, through TACACS+ or RADIUS if available; the local account is for emergencies only) and knowing whether you get level 15 or have to go into
enable. - For console: an RJ45 or USB console cable and PuTTY or similar at 9600 baud, 8 data bits, no parity, 1 stop bit and no flow control.
- The site's basic map: which switch is in which cabinet, which VLAN is users, voice and printers.
In show mode you change nothing. Everything that starts with configure terminal does, and on a production switch it goes with an approved change or the network owner's OK.
1. Getting in: console or SSH
The console is for a new switch, one with no IP, or one you can no longer reach over the network. The normal way is SSH to the management IP:
ssh adm-support@10.10.0.21SW-P1-01>enablePassword:SW-P1-01#terminal length 0The > symbol is user mode; # is privileged mode. terminal length 0 removes the --More-- so long outputs come out whole and can be copied into the ticket.
2. The six commands that answer almost any ticket
show interfaces statusshow mac address-table interface Gi1/0/14show vlan briefshow cdp neighborsshow logging | include Gi1/0/14show running-config interface Gi1/0/14Port Name Status Vlan Duplex Speed TypeGi1/0/14 DESK 1.07 connected 20 a-full a-1000 10/100/1000BaseTX Mac Address TableVlan Mac Address Type Ports---- ----------- -------- ----- 20 00a0.c914.2b7e DYNAMIC Gi1/0/14show interfaces status: one line per port with status (connected, notconnect, err-disabled, disabled), VLAN and speed. It is the first look.show mac address-table: which MAC the switch has learned on each port. With the PC's MAC (ipconfig /all) you know which port it is on, without going down to the cabinet:show mac address-table address 00a0.c914.2b7e.show vlan brief: which VLANs exist and which access ports are in each.show cdp neighbors: which Cisco device sits at the other end of each link (another switch, a phone, an access point).show logging: the switch's messages. A port flapping, or being shut down, leaves a trace here.show running-config interface: that port's configuration and nothing else.
3. Saving and exporting the configuration
The switch has two configurations: the running one (what is working now, in memory) and the startup one (what it loads at boot). A change that is not saved is lost at the next reboot.
copy running-config startup-configDestination filename [startup-config]?Building configuration...[OK]copy running-config scp://adm-support@10.10.0.50/backups/SW-P1-01-2026-10-30.cfgcopy running-config tftp://10.10.0.50/SW-P1-01-2026-10-30.cfgcopy running-config startup-config(or its short formwrite memory) saves. It is done after every change that works, not before.- For a copy off the device, SCP is encrypted and asks for a user; TFTP asks for nothing and travels in clear text, so only inside the management network. Before a change, a manual copy attached to the ticket.
4. The ticket: "desk 1.07 has lost its network"
show interfaces status err-disabledshow logging | include Gi1/0/14show port-security interface Gi1/0/14Port Name Status Reason Err-disabled VlansGi1/0/14 DESK 1.07 err-disabled psecure-violation%PORT_SECURITY-2-PSECURE_VIOLATION: Security violation occurred, caused by MAC address 3c52.82a1.0f44 on port GigabitEthernet1/0/14.%PM-4-ERR_DISABLE: psecure-violation error detected on Gi1/0/14, putting Gi1/0/14 in err-disable statePort Security : EnabledPort Status : Secure-shutdownViolation Mode : ShutdownMaximum MAC Addresses : 1Sticky MAC Addresses : 1Security Violation Count : 1err-disabled means the switch shut the port down on purpose, and the Reason column says why. The two most common reasons on a user port:
| Reason | What happened | What you do |
|---|---|---|
| psecure-violation | Port-security allows only one MAC (here sticky, the first one it learned) and another has appeared: a new laptop, a PC moved to another desk | Confirm the new device is legitimate, clear the learned MAC and re-enable the port |
| bpduguard | Someone plugged a small switch or a device that speaks spanning-tree into a user port | Remove the device and re-enable the port. BPDU Guard stays on |
Here the desk's PC has been replaced. Once it is confirmed the device is corporate:
clear port-security sticky interface Gi1/0/14configure terminalinterface Gi1/0/14 shutdown no shutdownendshow interfaces Gi1/0/14 statuscopy running-config startup-configshutdown and no shutdown bring the port out of err-disabled. The new device becomes the new sticky MAC, and since sticky MACs are stored in the configuration, you have to save so the old one does not come back after a reboot.
Some switches have errdisable recovery: the port comes back by itself after a while (300 seconds by default) for the reasons enabled. show errdisable recovery says which. But a port that recovers and drops again every five minutes hides the problem.
5. Putting a desk into its VLAN
A new desk, or one that has changed department, needs its port in the right VLAN:
show vlan brief | include 20|30configure terminalinterface Gi1/0/22 description DESK 1.15 switchport mode access switchport access vlan 20 switchport voice vlan 30endshow interfaces Gi1/0/22 statuscopy running-config startup-config- The VLAN has to exist (
show vlan brief). If it is not there, don't create it yourself: tell the network team, because it also has to come through the trunk. - Check on the PC that it gets an IP from that VLAN's range (
ipconfig /all). If it shows a 169.254.x.x, the switch is fine and the problem is DHCP.
6. What to put in the ticket
Switch and port, status before and after, the err-disabled reason taken from the log, what was changed and confirmation that the configuration is saved.
Next steps
- The Level 4 guide Cisco switches and routers picks up from here: trunks without cutting off a floor, the router with a backup circuit and remote changes with a safety net.
- The guide Cisco - Switches, routers and comms rooms on a site applies it to a real site with a comms room.
- If the desk gets a 169.254.x.x address, carry on with the guide DNS and DHCP on Windows Server.
Is something missing, or different in your environment? Get in touch and I'll fix it.
Tech Career Lab · newsletter
¿Te ha servido? Cada dos semanas envío una idea práctica para perfiles IT: LinkedIn, proyectos, networking y procesos de selección.Found this useful? Every two weeks I send one practical idea for IT professionals: LinkedIn, projects, networking and hiring processes.
Apúntate y llévate las 33 ideasSign up and get the 33 ideas →