Cisco Commands

From Lucca's Wiki
Revision as of 00:07, 5 November 2025 by 170.55.73.212 (talk)
Jump to navigationJump to search

Commands for cisco IOS devices (switches, routers, etc)


Show the entire mac address table (Lets you figure out what device is plugged into each switch port)

show mac address-table

List files in current directory

dir

List files in nvram

dir nvram:

Copy command destinatons (we use running-config as an example source file)

copy running-config cisco copy destinations

Elevate to root user

enable

Enter global configuration mode (You can use the do prefix to run regular commands from the config mode if you don't feel like running exit first)

configure terminal

Show startup config (the one stored in nvram for next boot)

show startup-config

Show running config (the one stored in ram and is currently in use)

show running-config

Copy the in-use config to the startup config so that it will be used on the next boot

copy running-config startup-config

Apply weak encryption to all unencrypted passwords. This only changes what is displayed in the config file, any password typed through a network cable is still transmitted in plain text.

service password-encryption

Show IPv4 IP Address assigned to each interface

show ip interface brief 

Show IPv6 IP Address assigned to each interface

show ipv6 interface brief 

Show all routes

show ip route

Global configuration commands


Set a banner message

banner motd MESSAGEHERE

Assign a default gateway

ip default-gateway 192.168.10.1

Change the machine's hostname (does not require a reboot)

hostname

Configure the console port (0)

line con 0

Configure the interface "vlan 1"

interface vlan 1

Configure vty interfaces 0 through 15

line vty 0 15

Console or VTY line configuration commands

Add a password to console port access

password itsasecret

Force users to enter the password to login

login
Enable ipv6 routing
ipv6 unicast-routing



Interface configuration commands


Set an IPv4 address on the interface

ip address 192.168.0.1 255.255.255.0

Change interface state to "up"

no shutdown

Ipv6 Interface Commands

Set an IPv6 address on the interface

ipv6 address 2001:DB8:CAFE:1::1/64

Set a link-local address on the interface

 ipv6 addr fe80::1 link-local