Aller au contenu

Cisco devices configuration

This chapter describes the basic commands for configuring and managing Cisco routers and/or switches.

Configuration modes

Cisco Devnet

Figure 1: Cisco Configuration modes

Useful Commands

Commands Descriptions
#show running-config displays the current config in memory
#show interface summary displays the interface state
#show protocols displays the active routing protocols
#copy running-config startup-config save the current config into the NVRAM
#erase startup-config erase the config present in the NVRAM
Router(config)\#hostname <name> sets the hostname
Router(config)\#service password-encryption Encrypt all passwords present in the config

Configuration copy and restoration

The easiest way to have a copy of the configuration of a Cisco device locally on a machine is to use the command show running-configuration and copy and paste of the display in a text editor.

Restoring a configuration on a “blank” device will be done as follows the following way:

  • Open the config file with a text editor
  • Select all the command and do a copy
  • On the Device Console, switch to the config mode:
    router# configure terminal
    
  • paste the clipboard to the console

Working Environment

Sample base config to simplify your engineer life:

SW1(config)# no ip domain-lookup
SW1(config)# line vty 0 4
SW1(config-line)# history size 15
SW1(config-line)# exec-timeout 10 30
SW1(config-line)# logging synchronous

Port mirroring

Configuration of mirroring of a port on a Switch:

SWn(config)#monitor session 1 source interface FastEthernet 0/x both
SWn(config)#monitor session 1 destination interface FastEthernet 0/x encapsulation replicate


Dernière mise à jour: 9 February 2023