Cisco Commands: Difference between revisions

From Lucca's Wiki
Jump to navigationJump to search
No edit summary
No edit summary
 
(15 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<hr>These are commands for cisco IOS devices (switches, routers, etc)<hr>
<hr>These are commands for cisco IOS devices (switches, routers, etc)<hr>
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
List files in current directory
Line 13: Line 15:
  enable
  enable


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


Line 27: Line 29:
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.
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
  service password-encryption
Show IP Address assigned to each interface
show ip interface brief
Show all routes
show ip route


<hr>Global configuration commands<hr>
<hr>Global configuration commands<hr>
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)
Change the machine's hostname (does not require a reboot)
  hostname
  hostname


Configure the vlan 1 interface
Configure the console port (0)
line con 0
 
Configure the interface "vlan 1"
  interface vlan 1
  interface vlan 1
Configure vty interfaces 0 through 15
line vty 0 15
<hr>Console or VTY line configuration commands<hr>
Add a password to console port access
password itsasecret
Force users to enter the password to login
login


<hr>Interface configuration commands<hr>
<hr>Interface configuration commands<hr>
Set an IPv4 address on the interface
  ip address 192.168.0.1 255.255.255.0
  ip address 192.168.0.1 255.255.255.0
Set an IPv6 address on the interface
ipv6 address 2001:DB8:CAFE:1::1/64


Change interface state to "up"
Change interface state to "up"
  no shutdown
  no shutdown

Latest revision as of 21:26, 7 October 2025


These are 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 IP Address assigned to each interface

show ip 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

Interface configuration commands


Set an IPv4 address on the interface

ip address 192.168.0.1 255.255.255.0

Set an IPv6 address on the interface

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

Change interface state to "up"

no shutdown