Cisco
Cisco CLI Cheat Sheet
Die wichtigsten Cisco IOS CLI-Befehle für Switches und Router
Modi der Cisco CLI
| Modus |
Prompt |
Zweck |
| User EXEC |
> |
Anzeigen, einfache Befehle |
| Privileged EXEC |
# |
Verwaltung & Diagnose |
| Global Config |
(config)# |
Gerätekonfiguration |
| Interface Config |
(config-if)# |
Port-/Interface-Konfiguration |
| Line Config |
(config-line)# |
Console/VTY konfigurieren |
Navigation
| Befehl |
Beschreibung |
enable |
In den Privileged-Modus wechseln |
disable |
Zurück in User-Modus |
configure terminal |
Konfigurationsmodus öffnen |
exit |
Eine Ebene zurück |
end |
Direkt in Privileged EXEC |
hostname NAME |
Gerätenamen setzen |
Konfiguration speichern
| Befehl |
Beschreibung |
copy running-config startup-config |
Konfiguration speichern |
write memory |
Kurzform zum Speichern |
show running-config |
Aktive Konfiguration anzeigen |
show startup-config |
Gespeicherte Konfiguration anzeigen |
Interface konfigurieren
interface GigabitEthernet0/1
description Uplink
ip address 192.168.1.1 255.255.255.0
no shutdown
| Befehl |
Beschreibung |
interface g0/1 |
Interface auswählen |
description TEXT |
Beschreibung setzen |
ip address IP MASK |
IP-Adresse vergeben |
shutdown |
Interface deaktivieren |
no shutdown |
Interface aktivieren |
VLANs (Switch)
VLAN erstellen
vlan 10
name SALES
Access-Port
interface g0/2
switchport mode access
switchport access vlan 10
Trunk-Port
interface g0/1
switchport mode trunk
switchport trunk allowed vlan 10,20,30
Routing
Statische Route
ip route 0.0.0.0 0.0.0.0 192.168.1.254
Routing-Tabelle anzeigen
show ip route
DHCP
DHCP Pool
ip dhcp pool OFFICE
network 192.168.10.0 255.255.255.0
default-router 192.168.10.1
dns-server 8.8.8.8
Adressen ausschließen
ip dhcp excluded-address 192.168.10.1 192.168.10.20
SSH konfigurieren
hostname R1
ip domain-name lab.local
crypto key generate rsa
username admin secret Cisco123
line vty 0 4
login local
transport input ssh
Passwörter
Enable Secret
enable secret MeinPasswort
Console
line console 0
password Cisco
login
VTY
line vty 0 4
password Cisco
login
Wichtige Show-Befehle
| Befehl |
Funktion |
show version |
IOS-Version & Hardware |
show interfaces |
Alle Interfaces |
show ip interface brief |
Kurzüberblick Interfaces |
show vlan brief |
VLAN-Übersicht |
show mac address-table |
MAC-Tabelle |
show cdp neighbors |
Cisco-Nachbarn |
show arp |
ARP-Tabelle |
show ip route |
Routing-Tabelle |
show running-config |
Aktive Konfiguration |
Diagnose
| Befehl |
Funktion |
ping IP |
Erreichbarkeit testen |
traceroute IP |
Pfad verfolgen |
show logging |
Logeinträge |
reload |
Gerät neu starten |
CDP & LLDP
CDP
show cdp neighbors
show cdp neighbors detail
LLDP
show lldp neighbors
Nützliche Kurzbefehle
| Kurz |
Vollständig |
conf t |
configure terminal |
int g0/1 |
interface GigabitEthernet0/1 |
sh run |
show running-config |
sh ip int br |
show ip interface brief |
wr |
write memory |
copy run start |
copy running-config startup-config |
Interfaces benennen
| Typ |
Beispiel |
| FastEthernet |
fa0/1 |
| GigabitEthernet |
g0/1 |
| TenGigabit |
te1/0/1 |
| Serial |
s0/0/0 |
| Loopback |
lo0 |
Konfiguration zurücksetzen
write erase
reload
Löscht die Startup-Konfiguration und startet das Gerät neu.
No Comments