Cisco CLI Commands Fundamentals
Cisco CLI Commands Fundamentals
FUNDAMENTALS
BASIC CLI COMMANDS
Unmanaged switches are designed to just plug in and run, with no settings to configure.
These are fine to use in small networks with only basic needs. Managed switches, however, are
fully configurable, are customizable, and provide a range of data on performance. Those
attributes make them more suitable for larger networks and networks supporting critical
activities.
Capabilities: Unmanaged switches immediately start forwarding traffic once users have plugged
them in. They have no features besides what they need to negotiate transfer speeds and to
determine each link's duplexing type. Managed switches can offer a huge number of features that
can be configured by IT professionals, thus permitting a diverse array of deployment
possibilities. These capabilities allow for optimization of network performance and availability.
Security: Network security includes protection from and detection of threats to data and
operability. Managed switches provide security settings that can be configured to protect the
network and to help identify threats. Unmanaged switches do not offer security capabilities.
Cost: For some users, cost is a significant choice driver. Unmanaged switches are cheap, as well
as very simple to run. Managed switches, with all their additional capabilities, cost more than
unmanaged switches. They also require more expertise to provision and manage, meaning added
costs for staff with the skills to maintain the network
How should I choose between managed and
unmanaged switches?
Unmanaged switches are most often seen in very small, uncomplicated networks with only a
dozen or so devices connected and without critical requirements for security and availability.
Managed switches, with the flexibility and control they provide, are a must for networks where
reliability and security are critical. Typically, such networks power enterprise-level businesses,
government agencies, universities, and healthcare organizations.
While managed switches cost more than unmanaged switches, the range of models available
mean that there are different levels of complexity and cost for businesses of all sizes.
A third type of switches, called smart managed switches, offers a compromise between cost
and features. These switches are suited for small businesses that have limited budgets but need
better security protection and want to improve their networks' performance.
https://www.cisco.com/c/en/us/products/switches/what-is-a-managed-switch.html
CLI Command Modes
Command
Mode Access Method Prompt Exit or Access Next Mode
User EXEC This is the first Switch> Enter the logout command.
level of access.
To enter privileged EXEC mode,
(For the switch) enter the enable command.
Change terminal
settings, perform
basic tasks, and
list system
information.
Privileged From user EXEC Switch# To exit to user EXEC mode, enter
EXEC mode, enter the the disable command.
enable
command. To enter global configuration
mode, enter the configure
command.
Global From privileged Switch(config)# To exit to privileged EXEC
configuration EXEC mode, mode, enter the exit or end
enter the command, or press Ctrl-Z.
configure
command. To enter interface configuration
mode, enter the interface
configuration command.
Interface From global Switch(config-if)# To exit to privileged EXEC
configuration configuration mode, enter the end command, or
mode, specify an press Ctrl-Z.
interface by
entering the To exit to global configuration
interface mode, enter the exit command.
command
followed by an
interface
identification.
Fundamentals – Basic Configuration
Command Description
show version Display information about IOS and router
show ip interface brief Displays a summary of the status for each interface
show ip interface <type number> Displays the usability status of the protocols for the interfaces
copy running-config startup-config Saves the current (running) configuration in the startup
configuration into the NVRAM. The command saves the
configuration so when the device reloads, it loads the latest
configuration file
erase nvram Delete the current startup configuration files. The command
returns the device to its factory default.
reload Reboot the device. The NVRAM will take the latest configuration
Network Access
Command Description
cdp run / no cdp run Display information about IOS and router
show mac address-table Display all the MAC address entries in a table
show vlan Lists each VLAN and all interfaces assigned to that VLAN
show interfaces switchport Display configuration settings about all the switch port
interfaces
show interfaces trunk Display information about the operational trunks along with
their VLANs
vlan <1-4094> Enter VLAN configuration mode and create a VLAN with an
associated number ID
name <name> Within the VLAN configuration mode, assign a name to the
VLAN
switchport mode access In the interface configuration mode, the command assigns the
interface link type as an access link.
interface range < > Access interface range configuration mode from Interface
Configuration.
no switchport access vlan <> Remove VLAN assignment from interface. It returns to default
VLAN 1
switchport mode trunk An interface configuration mode. Set the interface link type as a
trunk link.
Command Description
ip default-gateway <ip_address> Set the default gateway for the router
ip dhcp excluded-address The DHCP server should not assign to the DHCP client
<first-ip-address> <last-ip-address>
ip dhcp pool <name> Enters the DHCP pool configuration mode and creates a new
DHCP pool
network <network ID> <mask> Inside the DHCP configuration mode. Define the address pool
for the DHCP server
default-router <IP address> Set the default gateway IP address for the DHCP clients
dns-server <IP address> Set the DNS server IP address for the DHCP clients.
ip helper-address <ip address> Turns an interface into a DHCP bridge. The interface redirects
DHCP broadcast packets to a specific IP
show ip dhcp binding Display information about all the current DHCP bindings
show logging Shows the state logging (syslog). Shows the errors, events, and
host addresses. It also shows SNMP configuration and activity
terminal monitor Enables debug and system’s error messages for the current
terminal
Security
Command Description
enable secret <password> Set an “enable” secret password. Enable secret passwords are
hashed via the MD5 algorithm.
password <password> Once in line mode, set a password for those remote sessions
with the “password” command
service password-encryption Makes the device encrypt all passwords saved on the
configuration file
switchport port-security Specify the max no. of secure MAC on the specific interface
mac-address sticky
Sample Cisco Switch Baseline
configure terminal
! HOSTNAME CONFIGURATION
hostname CICT_SWITCH
! ENCRYPT PASSWORD
service password-encryption
! CREATING A BANNER
no banner motd
banner motd ^
********************************** SWITCH *********************************
****************************************************************************
^C
line con 0
login local
exit
line vty 0 4
login local
exit
end
configure terminal
! HOSTNAME CONFIGURATION
hostname CICT_ROUTER
! ENCRYPT PASSWORD
service password-encryption
! CREATING A BANNER
no banner motd
banner motd ^
********************************** ROUTER *********************************
****************************************************************************
^C
line con 0
login local
exit
! REMOTE MANAGEMENT CONFIGURATION (VTY)
line vty 0 4
login local
exit
end
configure terminal
! DHCP CONFIGURATION
! IP RANGE EXCLUSION
ip dhcp excluded-address 192.168.1.1 192.168.1.20
exit
configure terminal
switchport port-security
exit
Wireless Router Configuration
In the Wireless Devices – Choose WRT300N Wireless Router
Go to Config
Select Basic Wireless Settings and Input your preferred SSID Name
For Basic Wireless Setup leave all selection in default and Save Settings
Fill up the details highlighted below and input the passphrase and Save Settings