Buffl

Day 4 Intro to the CLI

as
von abdullah S.

CLI Modes (Important!)


There are three main modes, each with different capabilities:

User EXEC Mode Router>

  • Most limited access

  • Can view some information only

  • Indicated by > symbol

  • Enter with: Just connect to device

CLI exec mode (also called user EXEC mode) is the basic command-line interface level in network devices like Cisco routers and switches. It's indicated by the ">" prompt and provides access to basic monitoring commands with limited privileges.

Key points about exec mode:

  1. Default mode when first logging into a device

  2. Limited to basic show commands and connectivity tests

  3. Cannot make configuration changes

  4. Common commands available include:

    • ping

    • show version

    • show ip interface brief

    • traceroute

    • telnet


Privileged EXEC Mode Router#

  • Full access to view configurations

  • Can restart device, save configs

  • Indicated by # symbol

  • Enter with: enable command

Privileged EXEC mode (indicated by the "#" prompt) is the elevated access level in network devices that allows administrators to view and modify device configurations. It's accessed using the "enable" command from user EXEC mode.

Key features of Privileged EXEC mode:

  1. Access to ALL show commands

  2. Ability to:

    • Debug

    • Reset/reload device

    • Enter configuration mode

    • Manage system files

    • Test network connectivity


Global Configuration Mode Router(config)#

  • Where you make configuration changes

  • Indicated by (config)#

  • Enter with: configure terminal or conf t

Privileged EXEC mode (indicated by the "#" prompt) is the elevated access level in network devices that allows administrators to view and modify device configurations. It's accessed using the "enable" command from user EXEC mode.

Key features of Privileged EXEC mode:

  1. Access to ALL show commands

  2. Ability to:

    • Debug

    • Reset/reload device

    • Enter configuration mode

    • Manage system files

    • Test network connectivity



no Command


Purpose: Removes or negates a previously configured command

Example 1 - Removing a password:

Router(config)# enable password [REDACTED:PASSWORD] ← Set password

Router(config)# do show run | include enable

enable password [REDACTED:PASSWORD] ← Password exists


Router(config)# no enable password [REDACTED:PASSWORD] ← Remove it

Router(config)# do show run | include enable

← Password gone!


Explanation of show run | include enable

This is a Cisco IOS command used on network devices (routers/switches).

Breaking it down:

Part

Meaning

show run

Short for show running-config - displays the current active configuration

`

`

include

Filter that shows only lines containing the specified keyword

enable

The keyword you're searching for

What it does:

It filters the running configuration and displays only lines that contain the word "enable".

Example Output:

Router# show run | include enable enable secret 5 $1$abc$XYZ123hashedpassword enable password [REDACTED:PASSWORD]

Common Use Cases:

  • Check if an enable password or enable secret is configured

  • Quickly find enable-related settings without scrolling through the entire config

Other useful pipe options:

  • | exclude - shows lines without the keyword

  • | begin - starts output from the first match

  • | section - shows entire config sections containing the keyword

In short: It's a quick way to find enable password configurations on your device.



Example 2 - Disabling encryption:

Router(config)# service password-encryption ← Enable encryption

Router(config)# no service password-encryption ← Disable encryption


Example 3 - Removing enable secret:

Router(config)# enable secret Cisco123

Router(config)# no enable secret ← Remove the secret password


Important: Already encrypted passwords stay encrypted even after no service password-encryption


Author

abdullah S.

Informationen

Zuletzt geändert