↑ Top
Kaai24
dev studios
| Sign in | DE EN

Cisco IOS

Internetwork Operating System

Some basic Cisco IOS commands. Everything does not need to be fully written. The beginning of the words are enough.

Basics
----------

Switch from user to privilege mode (admin)

enable #or en

Config mode via terminal (from priv. mode)

configure terminal #or conf t

Set password for enable

enable password abcd1234

Save new config

copy running-config startup-config

Show interface status

show interface status
show ip interface brief
show interface summary

Working with MAC addresses

show mac address-table
show arp

Show current configuration (2. begin with interface Gi0/1, 3. include only lines with "dns")

show running-config
sh run | begin Gi0/1
sh run | include dns

Show connected devices

show cdp neighbors
show lldp neighbors (needs to be enabled with "lldp run")

Leave an elevated mode

exit

Configure and enable an interface
----------

eg. first FastEthernet (every option is optional)

interface FastEthernet0/0 #or int fa0/0
duplex full
ip address 192.168.0.1 255.255.255.0
switchport access vlan 1
spanning-tree portfast
no shutdown

Or configure multiple interfaces at once with

int range fa0/0 - 4

Disable a command by writing "no" in front of it.

Routing
----------

Set a static route

#ip route network mask gateway
ip route 0.0.0.0 0.0.0.0 192.168.0.1

Show routing

show ip route

SNMP
----------

Enable snmp protocol

snmp-server community public RO
snmp-server community private RW

Test if it is enabled

show snmp

0 SNMP packets input
    0 Bad SNMP version errors
    0 Unknown community name
    0 Illegal operation for community name supplied
    0 Encoding errors
    0 Number of requested variables
    0 Number of altered variables
    0 Get-request PDUs
    0 Get-next PDUs
    0 Set-request PDUs
    0 Input queue packet drops (Maximum queue size 1000)
0 SNMP packets output
    0 Too big errors (Maximum packet size 1500)
    0 No such name errors
    0 Bad values errors
    0 General errors
    0 Response PDUs
    0 Trap PDUs
SNMP global trap: disabled

If it is disabled it will show

%SNMP agent not enabled

Get help
----------

General help

?

Command specific help (eg. for command show)

show ?

Example switch config (incomplete)
----------

hostname cisco1
spanning-tree mode mst
spanning-tree portfast bpduguard default
enable password abc123
banner motd #Property of ME. Authorised access only!#

# Enable HTTPS only WebUI
no ip http server
ip http secure-server
ip http authentication local

# SSH
ip domain-name cisco.local
ip ssh version 2
crypto key generate rsa modulus 2048
username root privilege 15 secret abc123
line vty 0 15
	transport input ssh
	transport preferred none
aaa new-model

# SNMP
snmp-server community public RO 
snmp-server community private RW

# Management interface
interface vlan 1
	Description Management
	ip address 192.168.1.2 255.255.255.0
	no shutdown
ip default-gateway 192.168.1.1
ip name-server 1.1.1.1

More
----------

(Edited 28-03-19)

Comments