Cisco Commands: Difference between revisions

From Lucca's Wiki
Jump to navigationJump to search
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
<hr>====These are commands for cisco IOS devices (switches, routers, etc)====<hr>
<hr>
====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 the entire mac address table (Lets you figure out what device is plugged into each switch port)
  show mac address-table
  show mac address-table
Line 30: Line 32:
  service password-encryption
  service password-encryption


Show IP Address assigned to each interface
Show IPv4 IP Address assigned to each interface
  show ip interface brief  
  show ip interface brief  
Show IPv6 IP Address assigned to each interface
show ipv6 interface brief


Show all routes
Show all routes
Line 56: Line 61:
  line vty 0 15
  line vty 0 15


<hr>Console or VTY line configuration commands<hr>
====Console or VTY line configuration commands====
Add a password to console port access
Add a password to console port access
  password itsasecret
  password itsasecret
Line 63: Line 68:
  login
  login


====Enable ipv6 routing====
=====Enable ipv6 routing=====
  ipv6 unicast-routing
  ipv6 unicast-routing


Line 84: Line 89:
Set a link-local address on the interface
Set a link-local address on the interface
   ipv6 addr fe80::1 link-local
   ipv6 addr fe80::1 link-local
Remove an IPv6 address on the interface
no ipv6 address 2001:DB8:CAFE:1::1/64
Remove all IPv6 addresses on the interface
no ipv6 address

Latest revision as of 00:34, 5 November 2025


Commands for cisco IOS devices (switches, routers, etc)[edit]


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[edit]


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[edit]

Add a password to console port access

password itsasecret

Force users to enter the password to login

login
Enable ipv6 routing[edit]
ipv6 unicast-routing



Interface configuration commands[edit]


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[edit]

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

Remove an IPv6 address on the interface

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

Remove all IPv6 addresses on the interface

no ipv6 address