xkonekt
Language: EN
  • English
  • Türkçe
  • Español, Coming soon
  • Português, Coming soon
  • Deutsch, Coming soon
  • Français, Coming soon

Cisco IOS CLI · Introduction · Module 1

Getting around the IOS CLI: modes, help and saving

Show topologyHide topology
R2HQ routerR1office routerR3branch router10.0.12.0/2410.0.13.0/24Et0/0.2Et0/0.1Et0/1.1Et0/0.3

Interfaces and addresses · Et0/0 = Ethernet0/0; .1 = the last number of the address. R1’s Ethernet0/2 and Ethernet0/3 have no cable.

  • 10.0.12.0/24R1 Et0/0 10.0.12.1R2 Et0/0 10.0.12.2
  • 10.0.13.0/24R1 Et0/1 10.0.13.1R3 Et0/0 10.0.13.3R1’s end of this link starts with no address; this is the address it gets.
Topology · R1, the office router, has a link to R2 at HQ and a link to R3 at a branch.

Three routers in a column, joined by two cables. At the top R2, the HQ router: its Et0/0, address ending .2, is cabled straight down to R1, the office router in the middle, at its Et0/0, address ending .1, in the network 10.0.12.0/24, written beside that cable. R1’s Et0/1, address ending .1, is cabled down to R3, the branch router at the bottom, at its Et0/0, address ending .3, in the network 10.0.13.0/24, written beside it. The list under the drawing gives the full address at each end of each link.

What the CLI is

R1’s command line and its modes

Reading the prompt: where you are on R1

You connect to R1 and see this: R1>. What is R1> telling you?

R1> is the prompt, the text R1 prints when it is ready for a command. It names the router, and the characters after the name show the mode, the set of commands R1 takes at that moment. Read the prompt before you type.

You are typing in the CLI, or command-line interface, of IOS XE, the software R1 runs. You type a command, R1 prints any output, and it waits for the next. One way in is a terminal connected to the console port, here a laptop joined to R1’s console port by a cable (Figure 1.1). Once remote access is set up, the CLI can also be reached over the network.

R2HQ routerR1office routerR3branch routerYoulaptopconsole cableon screen: R1>
Figure 1.1 · You type on a laptop joined to R1’s console port; R1 answers with its prompt, R1>.

The three routers in a column, R2 at the top and R3 at the bottom dimmed, with their cables to R1, the office router in the middle. From R1 a dash-dot line, tagged “console cable”, runs down to the left to a laptop, “You, laptop”. Under the laptop, with no line to it, a highlighted chip “on screen: R1>”, the prompt as the laptop shows it.

So R1> means user EXEC mode, where a session normally begins, and it offers only a limited set of commands.

enable takes you from user EXEC into privileged EXEC mode, R1#, which takes more commands, including the ones that show R1’s configuration, its settings. disable takes you back.

From R1#, configure terminal takes you on to global configuration mode, R1(config)#, the first mode where the lines you type change R1’s configuration. end takes you back.

A configuration mode’s prompt adds a word in parentheses before the #, such as (config). R1# has none, so it is privileged EXEC, though it shares the # with R1(config)#.

The modes come in order, and each step in has a command that comes back out (Figure 1.2).

User EXECR1>Privileged EXECR1#Global configurationR1(config)#Interface configurationR1(config-if)#in: enableout: disablein: configure terminalout: endin: interface + nameout: exitend
Figure 1.2 · Each mode has its own prompt. enable and configure terminal go one step in; disable and end come back out.

Four boxes stacked from top to bottom, each with a mode and its prompt: User EXEC, R1>; Privileged EXEC, R1#, highlighted; Global configuration, R1(config)#; and, dimmed, Interface configuration, R1(config-if)#. Between each pair, a down arrow and an up arrow with two commands: “in: enable” and “out: disable”; “in: configure terminal” and “out: end”; dimmed, “in: interface + name” and “out: exit”. On the right, a bracket from the two configuration boxes leads back to the privileged EXEC box, labeled “end”.

R1 shows R1#. Can you type a line that changes its configuration here, such as an interface’s address?

Two configurations: running and startup

A line typed in configuration mode changes R1 at once. Will R1 still have it after a restart?

Only if saved. R1 keeps two copies of its configuration. The running-config is the current one, the copy R1 works from right now, and configuration modes change it line by line, as you press Enter.

The startup-config is the saved copy. It is kept across restarts, and it is the configuration the router uses when it starts, so each start fills running-config from it.

copy running-config startup-config saves a change (Figure 1.3).

end only takes you back to R1#, and the lines stay unsaved.

Step 1 of 6

R1office routerstartup-configkept at restartR1’s other linescopy at startrunning-configwiped at restartR1’s other lines

R1 starts, copies its startup-config into running-config and works from that copy.

Step 2 of 6

R1office routerstartup-configkept at restartR1’s other linescopy at startrunning-configwiped at restartR1’s other linesEt0/1 linesyou type

You type the lines for Ethernet0/1, one of R1’s interfaces. They go into running-config and work at once. Startup-config does not change.

Step 3 of 6

R1office routerrestartstartup-configkept at restartR1’s other linescopy at startrunning-configwiped at restartR1’s other linesEt0/1 linesyou type

R1 restarts now, before anyone has saved.

After the restart, what will R1’s running-config hold?

  • Only what was saved, so the typed Ethernet0/1 lines are gone (Correct): At a restart running-config is wiped and filled again from startup-config. The typed Ethernet0/1 lines were never copied there, so they do not come back.
  • The typed Ethernet0/1 lines too, since running-config is kept: On R1, the unsaved lines were gone after the restart.
  • Nothing at all, since R1 starts empty: Startup-config is still there, and the router uses it when it starts, so every saved line comes back.
  • Both copies, merged into one: There is nothing to merge with, because the old running-config does not survive the restart.

Step 4 of 6

R1office routerrestartstartup-configkept at restartR1’s other linescopy at startrunning-configwiped at restartR1’s other linesEt0/1 unsetyou type

Running-config holds only what came from startup-config. Ethernet0/1 has no address again and is turned off.

Step 5 of 6

R1office routerrestartstartup-configkept at restartR1’s other linesEt0/1 linescopy at startcopy running-configstartup-configrunning-configwiped at restartR1’s other linesEt0/1 linesyou type

Type the lines again, then copy running-config into startup-config. Now both copies hold them.

Step 6 of 6

R1office routerrestartstartup-configkept at restartR1’s other linesEt0/1 linescopy at startcopy running-configstartup-configrunning-configwiped at restartR1’s other linesEt0/1 linesyou type

After the next restart R1 copies startup-config again, and the Ethernet0/1 lines are back.

Step 1 of 6

At the top, R1. Under it, two boxes: “startup-config, kept at restart” above “running-config, wiped at restart”, each holding a chip “R1’s other lines”, and an arrow “copy at start” running down from startup-config to running-config. Later steps add a chip “you type” under running-config with an arrow up into it and an “Et0/1 lines” chip in running-config (step 2), a “restart” tag left of R1 (step 3), and an arrow “copy running-config startup-config” running up the other way with an “Et0/1 lines” chip in startup-config (step 5). Step 1: R1 starts and copies startup-config down. Step 2: you type the Ethernet0/1 lines into running-config. Step 3: R1 restarts before anyone saves. Step 4: running-config’s Ethernet0/1 place reads “Et0/1 unset”, so the typed lines are gone. Step 5: you type the lines again and copy them up into startup-config. Step 6: after the next restart both boxes hold them.

Figure 1.3 · Typed lines go into running-config; each start refills running-config from startup-config.R1 starts, copies its startup-config into running-config and works from that copy.You type the lines for Ethernet0/1, one of R1’s interfaces. They go into running-config and work at once. Startup-config does not change.R1 restarts now, before anyone has saved.Running-config holds only what came from startup-config. Ethernet0/1 has no address again and is turned off.Type the lines again, then copy running-config into startup-config. Now both copies hold them.After the next restart R1 copies startup-config again, and the Ethernet0/1 lines are back.

Key idea

Configuration changes go into running-config at once; only a copy into startup-config keeps them through a restart.

Which command makes a change survive a restart?

How it works

Moving, asking, mistyping

Moving between modes

Changing one interface takes a mode of its own. How do you get there, and back out?

Lines for one interface, such as its address, go in interface configuration mode, R1(config-if)#. You reach it from global configuration with interface and the interface’s name, made of its type and number, such as Ethernet0/1.

To come back, exit goes one step back, from interface to global configuration, and end goes straight back to privileged EXEC from any configuration mode.

On R1, from privileged EXEC: one step out and back in, then into configuration and out.

Output · IOS XE 17.18.2
1R1#disable2R1>show privilegeCurrent privilege level is 13R1>show running-config         ^% Invalid input detected at '^' marker. 4R1>enable5R1#show privilegeCurrent privilege level is 156R1#configure terminalEnter configuration commands, one per line.  End with CNTL/Z.7R1(config)#interface Ethernet0/18R1(config-if)#exit9R1(config)#endR1#
  1. disable Back to user EXEC. New prompt: R1>
  2. show privilege Privilege level 1, a number for how much this session may do.
  3. show running-config Refused: showing the configuration needs privileged EXEC.
  4. enable Privileged EXEC again. New prompt: R1#
  5. show privilege Level 15 here. These are the default levels of the two EXEC modes.
  6. configure terminal Global configuration. The line under the command is a reminder R1 prints on entry. New prompt: R1(config)#
  7. interface Ethernet0/1 Interface configuration for Ethernet0/1. Nothing is changed yet. New prompt: R1(config-if)#
  8. exit One step back. New prompt: R1(config)#
  9. end Straight back to privileged EXEC. New prompt: R1#
R1 shows R1(config-if)# and you type exit. What prompt comes next?

How R1 reads a line: help, Tab, short forms and the caret

You do not remember the exact command. How does R1 help, and what does it say when a word is wrong?

Both answers come from how R1 reads what you type. It reads the line from the left, one word at a time, and each word must fit after the words before it, in the mode you are in. Inside a word it reads letter by letter, up to the first character that fits nothing.

When a word does not fit, R1 usually prints an error marker, a caret (^) under the point where the line stopped fitting, and under it a line that starts with %. Nothing in the line runs.

You type show ip interface brif, with brief mistyped, and press Enter. Where does R1 put the caret?

R1 stopped inside brif (Figure 1.4).

showipinterfacebriffitsfitsfitsstops at fInvalid input: the caret marks the f.Nothing ran.
Figure 1.4 · R1 reads from the left and stops at the f of brif.

Four chips in a row: show, ip, interface and brif; brif is highlighted. Under the first three, the word “fits”. Under brif, a cross and “stops at f”, with a thin line down to a box that reads “Invalid input: the caret marks the f. Nothing ran.”

On R1, with brief mistyped:

Output · IOS XE 17.18.2
R1#show ip interface brif1                        ^2% Invalid input detected at '^' marker.
  1. The caret: bri still fits brief, f does not.
  2. The % line: the input did not fit.

When you see a caret, start with the word it points into, since everything left of it fitted. If that word is right, check the mode.

When you do not know a word, ask R1 with a ?, its context help. Typed straight after some letters, with no space, as in co?, it is word help, a list of the commands that start with those letters. Typed after a space, as in configure ?, it is syntax help, a list of the words that can come next. After the list, R1 prints the line again as you had typed it.

On R1, asking for help twice, then entering configuration:

Output · IOS XE 17.18.2
1R1#co?configure  connect  copy   2R1#configure ?  confirm            Confirm replacement of running-config with a new config file  memory             Configure from NV memory  network            Configure from a TFTP network host  overwrite-network  Overwrite NV memory from TFTP network host  replace            Replace the running-config with a new config file  revert             Parameters for reverting the configuration  terminal           Configure from the terminal  <cr>               <cr> 3R1#configure terminalEnter configuration commands, one per line.  End with CNTL/Z.4R1(config)#endR1#
  1. co? Word help: the commands that start with co. There are three, configure, connect and copy.
  2. configure ? R1 printed co again, and you typed the rest, nfigure ?. The list shows what can follow configure, among them terminal.
  3. configure terminal Built from the list, it enters global configuration. New prompt: R1(config)#
  4. end Back to R1#. New prompt: R1#

R1 can also finish a word for you, with tab completion. Press Tab after its first letters, and when only one word at that point in the line starts with them, R1 writes the rest (Figure 1.5).

shTabshowip intTabip interfacebrTabbriefR1#show ip interface brief
Figure 1.5 · From sh, ip int and br, three Tabs write the whole command.

Three rows, each with the letters typed, a Tab key and the word R1 wrote out: sh becomes show; ip int becomes ip interface; br becomes brief. Under them, highlighted, the whole line R1#show ip interface brief.

On R1, typed as sh, Tab, ip int, Tab, br, Tab, then Enter:

Output · IOS XE 17.18.2
1R1#sh2R1#show ip intR1#show ip interface br3R1#show ip interface brief … 6 more lines (see Full output)
  1. You typed sh and pressed Tab.
  2. After each Tab, R1 prints the line again with the word written out, and you type on.
  3. The whole command, ready for Enter.
Full output · 9 lines
R1#shR1#show ip intR1#show ip interface brR1#show ip interface brief Interface              IP-Address      OK? Method Status                ProtocolEthernet0/0            10.0.12.1       YES TFTP   up                    up      Ethernet0/1            unassigned      YES unset  administratively down down    Ethernet0/2            unassigned      YES unset  administratively down down    Ethernet0/3            unassigned      YES unset  administratively down down    R1#

Can you skip Tab and stop early? Yes. An abbreviation is a short form of a word, and R1 takes it when no other word at that point in the line starts the same way, so sh ip int br is show ip interface brief. IOS XE commands are generally not case-sensitive, and most are written in lowercase.

On R1, the short form:

R1 prints a table of its interfaces, one row each.

Output · IOS XE 17.18.2
R1#sh ip int brInterface Ethernet0/0IP-Address 10.0.12.1OK? YESMethod TFTPStatus upProtocol upInterface Ethernet0/1IP-Address unassignedOK? YESMethod unsetStatus administratively downProtocol downInterface Ethernet0/2IP-Address unassignedOK? YESMethod unsetStatus administratively downProtocol downInterface Ethernet0/3IP-Address unassignedOK? YESMethod unsetStatus administratively downProtocol down
Full output · 5 lines
R1#sh ip int brInterface              IP-Address      OK? Method Status                ProtocolEthernet0/0            10.0.12.1       YES TFTP   up                    up      Ethernet0/1            unassigned      YES unset  administratively down down    Ethernet0/2            unassigned      YES unset  administratively down down    Ethernet0/3            unassigned      YES unset  administratively down down    

A short command still gets the full answer, because R1 expands a short form before it runs it.

What if a short form fits more than one word? R1 refuses it.

On R1, with only co typed:

Output · IOS XE 17.18.2
R1#co1% Ambiguous command:  "co"
  1. % Ambiguous command: the short form matches more than one command.

On R1, with the interface’s name left out:

Output · IOS XE 17.18.2
R1#show running-config interface1% Incomplete command.
  1. % Incomplete command: the words so far fit, but more is needed.

Use the rule: word by word from the left, and the caret where reading stops.

You type show ip interfce brief, with interface mistyped. Where does the caret go, and what runs?

Key idea

The prompt shows the mode. enable, configure terminal and interface go one step in, exit one step out, end straight to R1#. R1 reads a line word by word: ? lists what fits, Tab finishes a word, a unique short form works like the full one, and a caret marks where reading stopped in a line that does not run.

Configure

Set up a link and save it

R1’s cable to R3 is in place, but R1’s end, Ethernet0/1, has no address and is turned off. What does it take to make the link work?

Two lines in Ethernet0/1’s interface configuration mode make it work, the address with its mask and no shutdown to turn the interface on. A third, a description, tells people what the link is for.

On R1, in privileged EXEC:

Output · IOS XE 17.18.2
1R1#configure terminalEnter configuration commands, one per line.  End with CNTL/Z.2R1(config)#interface Ethernet0/13R1(config-if)#description Link to R34R1(config-if)#ip address 10.0.13.1 255.255.255.05R1(config-if)#no shutdown6R1(config-if)#end
  1. configure terminal Global configuration. New prompt: R1(config)#
  2. interface Ethernet0/1 Interface configuration for Ethernet0/1. New prompt: R1(config-if)#
  3. description Link to R3 The description, a note for people: here, where the link leads.
  4. ip address 10.0.13.1 255.255.255.0 R1’s address on the link, 10.0.13.1, with the mask 255.255.255.0 (/24), so the first three numbers name the network.
  5. no shutdown Turns the interface on. The no form of a command generally undoes what the command does, and shutdown turns an interface off.
  6. end Back to R1#. Nothing is saved yet. New prompt: R1#

Impact These lines change only Ethernet0/1. The link to R2 is not touched.

Nothing has been saved. Will R1 reach R3 now?

ping answers that question from R1. It sends test packets to an address and shows which come back, and here it sent five of them to R3. Each ! is a reply, and each . is a packet with no reply in time.

Right after, on R1, a test of R3’s end of the link, 10.0.13.3:

Output · IOS XE 17.18.2
R1#ping 10.0.13.3Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.0.13.3, timeout is 2 seconds:!!!!!1Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
  1. Success rate is 100 percent: all five answered.

R3 answered before anything was saved.

The new lines are in running-config, and show running-config interface Ethernet0/1 shows only that interface’s part of the configuration.

On R1, right after these lines were typed:

Ethernet0/1’s shutdown line is gone, the line that had kept it turned off. Running-config shows a turned-on interface this way, so the no shutdown you typed is not a line of its own.

Output · IOS XE 17.18.2
R1#show running-config interface Ethernet0/1… 4 more lines (see Full output)interface Ethernet0/11 description Link to R32 ip address 10.0.13.1 255.255.255.0end
  1. The note typed with description.
  2. The address and the mask, as typed.
Full output · 8 lines
R1#show running-config interface Ethernet0/1Building configuration... Current configuration : 89 bytes!interface Ethernet0/1 description Link to R3 ip address 10.0.13.1 255.255.255.0end

show startup-config prints the saved copy, and | section interface Ethernet0/1 after it is an output filter that keeps only that interface’s lines.

Saving: running-config into startup-config

copy running-config startup-config

After the save, startup-config holds the same Ethernet0/1 lines as running-config.

Before

Before saving, on R1:

Output · IOS XE 17.18.2
R1#show startup-config | section interface Ethernet0/1interface Ethernet0/11 no ip address1 shutdown
  1. no ip address and shutdown: Ethernet0/1 as it was before the change.

The save, on R1:

Output · IOS XE 17.18.2
R1#copy running-config startup-config1Destination filename [startup-config]? Building configuration...2[OK]
  1. R1 asks where to copy to. Enter accepts the name in brackets, startup-config.
  2. [OK]: the copy is done.

After

After saving, on R1, the same command:

Output · IOS XE 17.18.2
R1#show startup-config | section interface Ethernet0/1interface Ethernet0/11 description Link to R32 ip address 10.0.13.1 255.255.255.0
  1. The note, now in the saved copy too.
  2. The address and the mask. No shutdown line follows, so the saved copy has Ethernet0/1 turned on.

How it works: Typed lines reach startup-config only when you save.

Trade-off: Save only what you have checked, because whatever runs at the moment you save is what R1 will start with after a restart.

Verify

Read the running configuration

R1’s whole configuration runs to many lines. Where are the lines for the link you just set up?

In Ethernet0/1’s own block (Figure 1.6). show running-config prints all of running-config. Each interface has a block, a line interface with its name, then indented lines with its settings, such as the description you typed.

R2HQ routerR1office routerR3branch routerEt0/0Et0/1Et0/2, Et0/3no cable
Figure 1.6 · R1 has four interfaces, so its configuration has four interface blocks; two are cabled and set up.

The three routers in a column: R2 at the top, R1 in the middle, R3 at the bottom, with a cable from R2 down to R1 and one from R1 down to R3. At R1’s end the cable to R2 is tagged Et0/0, the cable to R3 Et0/1; both tags sit left of the cable. Left of R1, level with it and with no line, a note: “Et0/2, Et0/3” over “no cable”.

On R1, after saving, the interface part:

Tap a line, or “Not in the output”, then submit.

Find the line that says where Ethernet0/1 leads.

Output · IOS XE 17.18.2
R1#show running-config… 112 more lines (see Full output)… 29 more lines (see Full output)

Ethernet0/0 and Ethernet0/1 are set up.

  1. A block starts: the lines under it belong to Ethernet0/0.
  2. Ethernet0/1’s note.
Full output · 156 lines
R1#show running-configBuilding configuration... Current configuration : 3277 bytes!! Last configuration change at 21:35:16 UTC Wed Nov 25 2026!version 17.18service timestamps debug datetime msecservice timestamps log datetime msec!hostname R1!boot-start-markerboot-end-marker!!logging buffered 64000 informationalno logging consoleno aaa new-model!!!!!!!!!!!!!no ip domain lookupip ceflogin on-success logno ipv6 cef!!!!!!!!!!crypto pki trustpoint TP-self-signed-2041867 enrollment selfsigned subject-name cn=IOS-Self-Signed-Certificate-2041867 revocation-check none rsakeypair TP-self-signed-2041867 hash sha512!!crypto pki certificate chain TP-self-signed-2041867 certificate self-signed 01  3082032A 30820212 A0030201 02020101 300D0609 2A864886 F70D0101 0D050030   2E312C30 2A060355 04030C23 494F532D 53656C66 2D536967 6E65642D 43657274   69666963 6174652D 32303431 38363730 1E170D32 36313132 35323133 3431365A   170D3336 31313234 32313334 31365A30 2E312C30 2A060355 04030C23 494F532D   53656C66 2D536967 6E65642D 43657274 69666963 6174652D 32303431 38363730   82012230 0D06092A 864886F7 0D010101 05000382 010F0030 82010A02 82010100   B70D88A7 36519795 FB0C27A9 ABF198CF D53B900C D18330D6 7B7F0F9A 961B67ED   73FA4907 CA2FAABF 28D85218 E4F5FD29 C48E53D1 36A08A12 05BF5E03 D20143EC   6B4CE44A 49155B30 2B35A420 539D8A13 AE8C6374 F1C89C46 536E9B3E 9A4CF4E2   8BC63904 909658A5 CC177C37 752DAFB7 7C078997 C1B227F4 D9C3C7F6 001C2715   E25A5EFD F25CD2A3 6BC86437 75004869 A56D7FB8 19A70AD5 AF158900 7A468623   947F357B 8C40BC98 B7E914A9 D69A29EC 47C9C52D 55DEAB15 73910048 639AAE6F   30590634 5E0F119E 82927B83 646F536F 261CA6BA 8CF3C66E B8096567 AE488C5B   0DC7418B 39F03645 0D376F0D 715F9536 A53EBA7F 0009F07D F2204078 1E34E809   02030100 01A35330 51301D06 03551D0E 04160414 BA2549CE DE0E8549 B9DF46B1   9343C420 CCE77728 301F0603 551D2304 18301680 14BA2549 CEDE0E85 49B9DF46   B19343C4 20CCE777 28300F06 03551D13 0101FF04 05300301 01FF300D 06092A86   4886F70D 01010D05 00038201 01006849 35ADFF0C 609D7EC9 6B59BC65 40EE542F   2CB33C3B 67CC9101 7D12B784 697AAA86 802D68B2 F37380B7 4EE8580D 02B5CCC9   255066CB 11D630E9 5EF5660A 609B17CB 1B6994E9 EE21775B 2CC27932 334C60C0   0592B248 BDB49FC8 ADF91B41 D431C35B B1BC0AB0 E87C8345 1E38485B 31C3F73B   9955CFEE 1F96CE1A 5C441972 F21EE75C 143F211E BDEE4363 C8A50127 03A504AA   E0F3EC02 DFF5B785 9C440B3C B4757160 834F1B6B 613C1D3F 717ABB80 6C3FB85C   C2C8B683 E1F377D6 4E98F878 E8851A25 6C44ECD6 DF54943C 55BD6271 DC269B90   DE4C59B2 C77E543F 60D92017 48628358 76734965 C09FF96E B445CFEE A17A8D8A   4D92BABB BD33DFAD CEB319B0 E2E8  	quit!!memory free low-watermark processor 79866!!spanning-tree mode rapid-pvst!!!!!!!! !!!!!!!!!!!!!!!interface Ethernet0/0 description Link to R2 ip address 10.0.12.1 255.255.255.0!interface Ethernet0/1 description Link to R3 ip address 10.0.13.1 255.255.255.0!interface Ethernet0/2 no ip address shutdown!interface Ethernet0/3 no ip address shutdown!ip forward-protocol nd!!ip http serverip http secure-serverip ssh bulk-mode 131072no logging btrace!!!control-plane!!!line con 0 activation-character 13 logging synchronousline aux 0 activation-character 13line vty 0 4 activation-character 13 login transport input ssh!!!!end

Key idea

show running-config shows what R1 runs now, which can differ from what is saved.

In that output, is Ethernet0/2 turned on?

Troubleshoot

Refused commands, lost changes

Why does R1 refuse a command you know is right, and why is a change that worked gone the next morning?

Case 1 of 2.R1 refuses a show command in configuration mode

  1. Case 1 · Symptom

    You are setting up R1 and want to check its interfaces. R1 answers with a caret.

  2. Case 1 · Command

    Read the line you typed, prompt included.

  3. Case 1 · Output

    On R1:

    Output · IOS XE 17.18.2
    R1#configure terminalEnter configuration commands, one per line.  End with CNTL/Z.1R1(config)#show ip interface brief2             ^% Invalid input detected at '^' marker. R1(config)#
    1. Key line The prompt is R1(config)#, global configuration.
    2. The caret is under the o of show, because in this mode no command starts with sho. The rest of the line was never read.
  4. Case 1 · How far it reaches

    Does R1 still take configuration lines here?

    On R1, still in global configuration:

    Output · IOS XE 17.18.2
    R1(config)#interface Ethernet0/11R1(config-if)#exitR1(config)#
    1. R1(config-if)#: yes. Configuration lines still work; only the show command was refused.
  5. Case 1 · What it means

    Privileged EXECR1#Global configurationR1(config)#you are hereshow ip interface briefrefusedworks here
    Figure 1.7 · Case 1 · At R1(config)# the show command was refused; at R1# it runs.

    A box “Privileged EXEC, R1#” above a box “Global configuration, R1(config)#”, with a highlighted tag “you are here” under the second box. Below them on the right, a chip “show ip interface brief” with two arrows out of it: one up into the global configuration box, crossed on its shaft and labeled “refused”, and one to the privileged EXEC box, labeled “works here” beside its head.

    • A show command belongs to the EXEC modes, and R1 refused it in global configuration.
    • The caret says that R1 did not know show here, not that the rest of the line is wrong.
  6. Case 1 · Fix

    With do in front, a command of the EXEC modes runs from any configuration mode.

    On R1, still in global configuration:

    Output · IOS XE 17.18.2
    1R1(config)#do show ip interface briefInterface              IP-Address      OK? Method Status                Protocol… 1 more line (see Full output)Ethernet0/1            10.0.13.1       YES NVRAM  up                    up      … 2 more lines (see Full output)2R1(config)#
    1. The show command ran, typed at R1(config)#.
    2. Still R1(config)#: do does not change the mode.
    Full output · 6 lines
    R1(config)#do show ip interface briefInterface              IP-Address      OK? Method Status                ProtocolEthernet0/0            10.0.12.1       YES NVRAM  up                    up      Ethernet0/1            10.0.13.1       YES NVRAM  up                    up      Ethernet0/2            unassigned      YES NVRAM  administratively down down    Ethernet0/3            unassigned      YES NVRAM  administratively down down    R1(config)#

    Or leave configuration mode:

    Output · IOS XE 17.18.2
    R1(config)#end1R1#
    1. R1# after end: privileged EXEC.
  7. Case 1 · Proof

    The same command, typed at R1#:

    Output · IOS XE 17.18.2
    R1#show ip interface briefInterface Ethernet0/0IP-Address 10.0.12.1OK? YESMethod NVRAMStatus upProtocol up1Interface Ethernet0/1IP-Address 10.0.13.1OK? YESMethod NVRAMStatus upProtocol upInterface Ethernet0/2IP-Address unassignedOK? YESMethod NVRAMStatus administratively downProtocol downInterface Ethernet0/3IP-Address unassignedOK? YESMethod NVRAMStatus administratively downProtocol down
    1. The Ethernet0/1 row, with 10.0.13.1: the command ran.
    Full output · 5 lines
    R1#show ip interface briefInterface              IP-Address      OK? Method Status                ProtocolEthernet0/0            10.0.12.1       YES NVRAM  up                    up      Ethernet0/1            10.0.13.1       YES NVRAM  up                    up      Ethernet0/2            unassigned      YES NVRAM  administratively down down    Ethernet0/3            unassigned      YES NVRAM  administratively down down    

End of case 1. Solved: Back at R1#, show works.

Case 2 of 2.The link to R3 is gone after a restart

  1. Case 2 · Symptom

    Yesterday someone set up Ethernet0/1 for the link to R3, but did not save. Overnight someone restarted R1 with reload. This morning R1 cannot reach R3.

    Output · IOS XE 17.18.2
    R1#ping 10.0.13.3Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.0.13.3, timeout is 2 seconds:1.....2Success rate is 0 percent (0/5)
    1. Five dots: no answer came back in time.
    2. Success rate is 0 percent: R3 does not answer.
  2. Case 2 · Command

    Read the saved copy, the one R1 started from.

  3. Case 2 · Output

    On R1:

    Output · IOS XE 17.18.2
    R1#show startup-config | section interface Ethernet0/1interface Ethernet0/11 no ip address1 shutdown
    1. Key line no ip address and shutdown under Ethernet0/1. The saved copy never had yesterday’s lines.
  4. Case 2 · How far it reaches

    Read what R1 runs now for Ethernet0/1, and test the link to R2.

    On R1, its running-config for Ethernet0/1:

    Output · IOS XE 17.18.2
    R1#show running-config interface Ethernet0/1… 4 more lines (see Full output)interface Ethernet0/11 no ip address1 shutdownend
    1. no ip address and shutdown: R1 runs Ethernet0/1 as the saved copy has it, with no address and turned off.
    Full output · 8 lines
    R1#show running-config interface Ethernet0/1Building configuration... Current configuration : 54 bytes!interface Ethernet0/1 no ip address shutdownend

    On R1, a test of R2, 10.0.12.2:

    Output · IOS XE 17.18.2
    R1#ping 10.0.12.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.0.12.2, timeout is 2 seconds:!!!!!1Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
    1. Success rate is 100 percent: R2 answers. The saved settings came back; only the unsaved lines are lost.
  5. Case 2 · What it means

    startup-configkept at restartR1’s other linesEt0/1 unsetcopy at startrestartrunning-configwiped at restartR1’s other linesEt0/1 unsettyped Et0/1 linesgone at restart
    Figure 1.8 · Case 2 · The typed Ethernet0/1 lines were never copied into startup-config, so the restart did not bring them back.

    A box “startup-config, kept at restart” holding “R1’s other lines” and “Et0/1 unset”. An arrow “copy at start” runs down from it, with a highlighted tag “restart” beside the arrow, to a box “running-config, wiped at restart” holding “R1’s other lines”, “Et0/1 unset” and, dimmed with a dashed outline, “typed Et0/1 lines”, with a cross and “gone at restart” left of it.

    • At the restart R1 filled running-config from startup-config, which never held them.
    • R1 asked whether to save the changed configuration, and no one did.
  6. Case 2 · Fix

    Type the lines again and save them.

    On R1, the lines for Ethernet0/1 again:

    Output · IOS XE 17.18.2
    R1#configure terminalEnter configuration commands, one per line.  End with CNTL/Z.R1(config)#interface Ethernet0/1R1(config-if)#description Link to R31R1(config-if)#ip address 10.0.13.1 255.255.255.0R1(config-if)#no shutdownR1(config-if)#end
    1. R1’s address on the link to R3, 10.0.13.1.

    Impact These lines change only Ethernet0/1. The link to R2 is not touched.

    Then the save:

    Output · IOS XE 17.18.2
    R1#copy running-config startup-configDestination filename [startup-config]? Building configuration...1[OK]
    1. [OK]: startup-config now holds the lines.
  7. Case 2 · Proof

    R1 restarts again; this time it does not ask about saving, because nothing is unsaved. Afterwards:

    Output · IOS XE 17.18.2
    R1#ping 10.0.13.3Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.0.13.3, timeout is 2 seconds:!!!!!1Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
    1. Success rate is 100 percent: the link to R3 survived the restart.

End of case 2. Solved: Saved; the link survives a restart.

Both cases

Key idea

When R1 refuses a command, read the prompt first: the mode decides what R1 takes. When a change is gone after a restart, read startup-config: only what is saved comes back.

You change Ethernet0/0’s description, type end, and do not save. R1 restarts. What happens to the link to R2?

Check

R1 shows R1(config-if)#. Which mode is it in, and which one command takes it straight back to R1#?
You type sh ip int br at R1#. What does R1 print?

On R1, before Ethernet0/1 was set up; the part with the interfaces:

Tap a line, or “Not in the output”, then submit.

Find the line that says where Ethernet0/1 leads.

Output · IOS XE 17.18.2
R1#show running-config… 77 more lines (see Full output)… 29 more lines (see Full output)
Full output · 121 lines
R1#show running-configBuilding configuration... Current configuration : 1111 bytes!! Last configuration change at 21:32:40 UTC Wed Nov 25 2026! NVRAM config last updated at 21:32:52 UTC Wed Nov 25 2026!version 17.18service timestamps debug datetime msecservice timestamps log datetime msec!hostname R1!boot-start-markerboot-end-marker!!logging buffered 64000 informationalno logging consoleno aaa new-model!!!!!!!!!!!!!no ip domain lookupip ceflogin on-success logno ipv6 cef!!!!!!!!!!!!!memory free low-watermark processor 79866!!spanning-tree mode rapid-pvst!!!!!!!! !!!!!!!!!!!!!!!interface Ethernet0/0 description Link to R2 ip address 10.0.12.1 255.255.255.0!interface Ethernet0/1 no ip address shutdown!interface Ethernet0/2 no ip address shutdown!interface Ethernet0/3 no ip address shutdown!ip forward-protocol nd!!ip http serverip http secure-serverip ssh bulk-mode 131072no logging btrace!!!control-plane!!!line con 0 activation-character 13 logging synchronousline aux 0 activation-character 13line vty 0 4 activation-character 13 login transport input ssh!!!!end
At R1(config-if)# for Ethernet0/1 you type ip adress 10.0.13.1 255.255.255.0, with address mistyped. Where does the caret go, and does the line change anything?
You add a description to Ethernet0/2, type end, and R1 restarts before anything else. Is the description there afterwards?

Summary

R1office routerrestartstartup-configkept at restartR1’s other linesEt0/1 linescopy at startcopy running-configstartup-configrunning-configwiped at restartR1’s other linesEt0/1 linesyou type
Figure 1.3, recap · After the next restart R1 copies startup-config again, and the Ethernet0/1 lines are back.

R1 with a “restart” tag. Under it, startup-config and running-config both hold “R1’s other lines” and “Et0/1 lines”, and the arrow “copy at start” runs from startup-config down to running-config: the saved lines came back after the restart.

  • The prompt names the mode: R1> user EXEC, R1# privileged EXEC, (config) and (config-if) the configuration modes.
  • Configuration lines change running-config at once; startup-config is what R1 starts from.
  • ? lists what fits, Tab finishes a word, a unique short form works like the full one, and a caret marks where R1 stopped reading the line; a line with a caret runs nothing.
  • copy running-config startup-config saves the change for the next restart.
  • show running-config shows one block per interface; the indented lines belong to the interface above them.
  • A refused command often means the wrong mode; a change lost at a restart was never saved.