# Cisco

# CLI - show running-config

Ein Beispiel von einem Cisco Switch:

```
switchdaf8a4#show running-config
config-file-header
switchdaf8a4
v3.2.1.1 / RCBS3.2hotfix_950_377_136
CLI v1.0
file SSD indicator encrypted
@
ssd-control-start
ssd config
ssd file passphrase control unrestricted
no ssd file integrity control
ssd-control-end cb0a3fdb1f3a1af4e4430033719968c0
!
!
unit-type-control-start
unit-type unit 1 network gi uplink te
unit-type unit 2 network gi uplink te
unit-type unit 3 network gi uplink te
unit-type unit 4 network gi uplink te
unit-type-control-end
!
voice vlan oui-table add 0001e3 Siemens_AG_phone
voice vlan oui-table add 00036b Cisco_phone
voice vlan oui-table add 00096e Avaya
voice vlan oui-table add 000fe2 H3C_Aolynk
voice vlan oui-table add 0060b9 Philips_and_NEC_AG_phone
voice vlan oui-table add 00d01e Pingtel_phone
voice vlan oui-table add 00e075 Polycom/Veritel_phone
voice vlan oui-table add 00e0bb 3Com_phone
errdisable recovery cause loopback-detection
errdisable recovery cause port-security
errdisable recovery cause dot1x-src-address
errdisable recovery cause acl-deny
errdisable recovery cause stp-bpdu-guard
errdisable recovery cause stp-loopback-guard
errdisable recovery cause udld
errdisable recovery cause storm-control
no eee enable
no bonjour enable
bonjour interface range vlan 1
hostname switchdaf8a4
line console
exec-timeout 0
exit
line ssh
exec-timeout 0
exit
logging buffered debugging
logging file debugging
logging aggregation on
logging aggregation aging-time 15
username CISCO_LOGIN_USSER password encrypted $15$AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== privilege 15
ip ssh server
snmp-server server
no ip http server
ip http timeout-policy 1800 https-only
!
switchdaf8a4# 
```

### 1. Config-File-Header

- Gerätenamen und Firmware-Version:  
    ```
    switchdaf8a4#show running-config
    config-file-header
    switchdaf8a4  # Gerätename des Switches
    v3.2.1.1 / RCBS3.2hotfix_950_377_136  #  Die Firmware- bzw. Softwareversion inklusive eines Hotfixes
    CLI v1.0   # Die Version der Kommandozeilenschnittstelle
    
    ```
    
    Diese Zeilen geben den Namen des Switches, die installierte Firmware/Softwareversion (inklusive eines Hotfixes) und die Version der Kommandozeilenschnittstelle an.
- Verschlüsselte Konfigurationselemente:  
    ```
    file SSD indicator encrypted  # Weist darauf hin, dass bestimmte Konfigurationsbestandteile verschlüsselt gespeichert sein können
    ```
    
    Hier wird signalisiert, dass bestimmte Konfigurationsbestandteile verschlüsselt gespeichert sein können.
- Header-Abschluss:  
    ```
    @ # Das „@“ markiert hier das Ende des Headers.
    ```
    
     Das „@“ markiert das Ende des Headers.

### 2. SSD-Control Block  


### 3. Unit-Type-Control Block  


### 4. Voice VLAN OUI Table  


### 5. Fehlerbehandlung (Errdisable Recovery)

### 6. Energiemanagement und Bonjour  


### 7. Hostname und Zugangskonfiguration  


### 8. Logging  


### 9. Benutzer und Authentifizierung  


### 10. Netzwerkdienste

# CLI - Start

## Frischen Cisco Switch über CLI Configurieren  


### 1. Anmelden

Default Login:  
**User: cisco**  
**Passwd: cisco**

Danach will er direkt, das du dem Switch einen neuen User und ein neues Passwort gibst.

```bash
Detected speed: 9600


User Name:cisco
Password:*****

Please change device default username AND password.
Change of credentials is required for better protection of your network.
Please note that the new password must comply to the following password complexity rules:
        1. The password must be at least 8 characters long.
        2. Password must contain at least 3 of the following types: lowercase letters, uppercase letters, numeric digits or special characters.
        3. A character can not be repeated consecutively more than 3 times.
        4. The password cannot contain more than 2 sequential characters or numbers, or the reverse value of these sequences.
        5. The password cannot contain the username or a reversed form of username.
        6. The password cannot contain the manufacturer or product name or a reversed form of such.
        7. The password cannot contain a password that is part of a predefined list of breached or dictionary based passwords.
Enter new username: Pluto10982
Enter new password: ******************************************************************
Confirm new password: ******************************************************************
Username and password were successfully updated.
switchdaf8a4#

```

### 2. Config anzeigen lassen

Mit `show running-config` kannst du dir die laufende Konfig anzeigen lassen

```bash
switchdaf8a4#show running-config 
config-file-header
switchdaf8a4
v3.2.1.1 / RCBS3.2hotfix_950_377_136
CLI v1.0
file SSD indicator encrypted
@
ssd-control-start
ssd config
ssd file passphrase control unrestricted
no ssd file integrity control
ssd-control-end cb0a3fdb1f3a1af4e4430033719968c0
!
!
unit-type-control-start
unit-type unit 1 network gi uplink te
unit-type unit 2 network gi uplink te
unit-type unit 3 network gi uplink te
unit-type unit 4 network gi uplink te
unit-type-control-end
!
voice vlan oui-table add 0001e3 Siemens_AG_phone
voice vlan oui-table add 00036b Cisco_phone
voice vlan oui-table add 00096e Avaya                 
voice vlan oui-table add 000fe2 H3C_Aolynk
voice vlan oui-table add 0060b9 Philips_and_NEC_AG_phone
voice vlan oui-table add 00d01e Pingtel_phone
voice vlan oui-table add 00e075 Polycom/Veritel_phone
voice vlan oui-table add 00e0bb 3Com_phone
bonjour interface range vlan 1
hostname switchdaf8a4
username Pluto10982 password encrypted $**********************************************== privilege 15
!
switchdaf8a4#

```

# CLI - Cheat Sheet

<div id="bkmrk-" style="font-family:'system-ui', sans-serif;line-height:1.45;"></div>## System- und Hardware-Information

```
show system unit 1
show system id
show inventory
show hardware version
```

<div id="bkmrk--1" style="font-family:'system-ui', sans-serif;line-height:1.45;"></div>## 3 | Reload-Varianten

<div id="bkmrk-zweck-befehl%C2%A0%28enable" style="font-family:'system-ui', sans-serif;line-height:1.45;"><table style="border-collapse:collapse;width:100%;"><thead><tr><th style="border:1px solid #ccc;padding:0.4em;text-align:left;">Zweck</th><th style="border:1px solid #ccc;padding:0.4em;text-align:left;">Befehl (Enable-Modus)</th><th style="border:1px solid #ccc;padding:0.4em;text-align:left;">Erläuterung</th></tr></thead><tbody><tr><td style="border:1px solid #ccc;padding:0.4em;">Sofort neu starten</td><td style="border:1px solid #ccc;padding:0.4em;">`reload`</td><td style="border:1px solid #ccc;padding:0.4em;">Nachfrage mit <kbd>Enter</kbd> oder <kbd>yes</kbd> bestätigen.</td></tr><tr><td style="border:1px solid #ccc;padding:0.4em;">Neu starten mit Kommentar</td><td style="border:1px solid #ccc;padding:0.4em;">`reload reason "Firmware-Upgrade"`</td><td style="border:1px solid #ccc;padding:0.4em;">Kommentar landet im Syslog/Crashinfo.</td></tr><tr><td style="border:1px solid #ccc;padding:0.4em;">Geplanten Neustart ansetzen</td><td style="border:1px solid #ccc;padding:0.4em;">`reload in 10`  
`reload at 02:00 29 Apr 2025`</td><td style="border:1px solid #ccc;padding:0.4em;">Minuten-Timer oder exakte Uhrzeit (lokale Clock).</td></tr><tr><td style="border:1px solid #ccc;padding:0.4em;">Geplanten Neustart abbrechen</td><td style="border:1px solid #ccc;padding:0.4em;">`reload cancel`</td><td style="border:1px solid #ccc;padding:0.4em;">Hebt einen gesetzten Timer wieder auf.</td></tr><tr><td style="border:1px solid #ccc;padding:0.4em;">Nur Standby-Stack-Mitglied neu starten</td><td style="border:1px solid #ccc;padding:0.4em;">`remote command switch 2 reload`</td><td style="border:1px solid #ccc;padding:0.4em;">Beispiel für Mitglied 2 in einem Stack.</td></tr></tbody></table>

</div>

# Cisco - Web - SNMP Aktivieren und einrichten



# Cisco - GUI - SSH Aktivieren

1. Melde ich am Switch an:  
    [![1.png](https://mach7.space/uploads/images/gallery/2026-01/scaled-1680-/nEWNpbQkuINIfJHQ-1.png)](https://mach7.space/uploads/images/gallery/2026-01/nEWNpbQkuINIfJHQ-1.png)
2. Stelle die Seite oben links von "Basic" auf "Advanced" um:  
    [![2_e.png](https://mach7.space/uploads/images/gallery/2026-01/scaled-1680-/dvwD0bOm2O3d3JKs-2-e.png)](https://mach7.space/uploads/images/gallery/2026-01/dvwD0bOm2O3d3JKs-2-e.png)
3. Gehe links in der Leiste zu "Security -&gt; TCP/UDP Services":  
    [![3_e.png](https://mach7.space/uploads/images/gallery/2026-01/scaled-1680-/BaVZSsKFXcLLZUOf-3-e.png)](https://mach7.space/uploads/images/gallery/2026-01/BaVZSsKFXcLLZUOf-3-e.png)
    
    Dort aktivierst du dann "SSH Service" (in blau umrandet) und klickst danach oben rechts in der Ecke auf "Apply".
4. Danach gehst du links in der Leiste zu "Security -&gt; SSH Server -&gt; SSH User Authentication":  
    [![4_e.png](https://mach7.space/uploads/images/gallery/2026-01/scaled-1680-/WmZLMAlfN4vCJdYw-4-e.png)](https://mach7.space/uploads/images/gallery/2026-01/WmZLMAlfN4vCJdYw-4-e.png)
    
    Dort aktivierst du "SSH Session Loggin" und "SSH User Authentication by Public Key" (in blau umrandet).  
    Danach klickst du auf das + Zeichen in "SSH User Authentication Table (by Public Key)" (in pink umrandet).
5. Nun sollte dir ein "Add SSH User" Fenster auf gehen:  
    [![5_e.png](https://mach7.space/uploads/images/gallery/2026-01/scaled-1680-/VgdWMnfZ83DQb1Tn-5-e.png)](https://mach7.space/uploads/images/gallery/2026-01/VgdWMnfZ83DQb1Tn-5-e.png)
6. Bevor wir weiter machen, musst du die SSH-Keys erzeugen, ich habe das ganze unter Linux so gemacht:  
    [![6.png](https://mach7.space/uploads/images/gallery/2026-01/scaled-1680-/py3kpr56wYmeULNm-6.png)](https://mach7.space/uploads/images/gallery/2026-01/py3kpr56wYmeULNm-6.png)
    
      
    Der Befehl lautet:  
    `ssh-keygen -t rsa -b 2048 -f ./$Device -C "$Device -> $Standort_Switch-XXX"`Damit kannst du alte RSA Keys für die Cisco Switche erzeugen.  
    $Device ist dein Client, damit man später besser erkennen kann, für das der SSH-Key ist.
7. Danach musst du dir noch den Public Key ausgeben lassen:  
    [![7.png](https://mach7.space/uploads/images/gallery/2026-01/scaled-1680-/NtovkvE0gzeEdPeG-7.png)](https://mach7.space/uploads/images/gallery/2026-01/NtovkvE0gzeEdPeG-7.png)
    
      
    Wichtig für dich, in den Cisco Switch darfst du nur die Passprase eingeben, also ohne "ssh-rsa... " am Anfang und ohne "  
    "$Device -&gt; $Standort\_Switch-XXX" am Ende, sprich nur den  
    "AAAAB3..........WMr/frV/8NlfQQb7" kram.
8. Den fügst du dann wie hier im Bild ein:  
    [![8_e.png](https://mach7.space/uploads/images/gallery/2026-01/scaled-1680-/snHmwZI0QSvfObJs-8-e.png)](https://mach7.space/uploads/images/gallery/2026-01/snHmwZI0QSvfObJs-8-e.png)
    
    Hier ist auch wiederum wichtig, das du bei "SSH User Name" entweder einen richtigen User ein trägst oder das was du anstelle von $Device genommen hast, denn dieser Name wird nachher beim Login benötigt (ssh -i ./rsa\_\_secret\_5 rsa\_\_secret\_5@XXX.XXX.XXX.XXX) hätte ich hier anstelle des <span style="color:rgb(53,152,219);">Namens</span> "<span style="color:rgb(53,152,219);">rsa\_\_secret\_5</span>" lieber "<span style="color:rgb(53,152,219);">Max</span>" genommen, würde sich der Login ändern (ssh -i ./rsa\_\_secret\_5 <span style="color:rgb(53,152,219);">Max</span>@XXX.XXX.XXX.XXX)  
      
    Zudem wähle lieber "RSA" aus, da wir hier ein RSA Key erstellt haben und DSA alt ist.
9. Danach sollte das ganze so in etwa aussehen:  
    [![kcvnYBh3xyOwqFHY-9-e.png](https://mach7.space/uploads/images/gallery/2026-01/scaled-1680-/CqO6FS0i1JcOW7Hw-kcvnybh3xyowqfhy-9-e.png)](https://mach7.space/uploads/images/gallery/2026-01/CqO6FS0i1JcOW7Hw-kcvnybh3xyowqfhy-9-e.png)
    
    Danach klickst du oben rechts einmal auf "Apply"  
    Oben rechts in der Ecke solltest du zudem eine rote Diskette blinken sehen (in pink umrandet), wenn du die Drückst, speicherst du alles, so das die Einstellungen nach einem Reboot nicht weg sind.
10. Ziel ist es, das es am Ende so aussieht:  
    [![10_e.png](https://mach7.space/uploads/images/gallery/2026-01/scaled-1680-/lou9QvQniiBRVcFG-10-e.png)](https://mach7.space/uploads/images/gallery/2026-01/lou9QvQniiBRVcFG-10-e.png)
    
    Dann hat man Backup RSA Keys, falls man nicht anders auf den Switch raufkommt.