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 2

Reading your first show commands: status, addresses and counters

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.3
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 a show command is

Four commands, four views

R1’s link to R3 is set up and saved. How do you check that it works, without changing anything?

You ask R1 with a show command, an EXEC command that prints part of a router’s state or its configuration, as it is at that moment.

A show command only reads and changes no configuration, so you can run it as often as you like. You type it at R1#, in privileged EXEC.

Typing on a live router can feel risky, but changes come from other commands, such as no shutdown.

Each show command answers its own question about R1, from its software to its counters (Figure 2.1).

R1office routershow versionR1’s software and how long it has runshow ip interface briefone line per interface, up or downshow interfacesone interface in detail, with countersshow running-configthe configuration R1 runs now
Figure 2.1 · Four show commands, four views of R1.

R1 at the top left. Just under it, apart from it, a thin gray line starts and runs down, branching into four cards, one under the other. Each card names a command and what it shows: show version, R1’s software and how long it has run; show ip interface brief, highlighted, one line per interface, up or down; show interfaces, one interface in detail, with counters; show running-config, the configuration R1 runs now.

Key idea

Pick a show command by the question you have. Each one reads R1 as it is at that moment and changes no configuration.

You want one line per interface, with its address and whether it is up. Which command?

How it works

Filters keep the lines you need

show running-config prints the whole configuration, and you need one line of it. How do you get only that line?

You add an output filter after a show command, starting with a |, called a pipe. Then come a keyword and the text to look for. R1 tests each output line against it and prints only the lines it keeps.

Which lines stay depends on the keyword. include keeps every line that holds the text you type after it, wherever the text stands in the line. begin starts at the first line that holds the text and prints that line and every line after it.

section keeps a line that holds the text together with the lines that belong to it. In a configuration those are the indented lines under it, such as one interface’s block.

Step 1 of 7

show ip interface briefR1’s outputInterface IP-Address … Status ProtocolEthernet0/0 10.0.12.1 … up upEthernet0/1 10.0.13.1 … up upEthernet0/2 … administratively down downEthernet0/3 … administratively down down

R1 prints five lines for show ip interface brief: a header, then one line per interface.

Step 2 of 7

show ip interface brief | include upR1’s outputInterface IP-Address … Status ProtocolEthernet0/0 10.0.12.1 … up upEthernet0/1 10.0.13.1 … up upEthernet0/2 … administratively down downEthernet0/3 … administratively down down| include up keeps each linethat holds the letters up

With | include up after the command, R1 tests each line for the letters up.

Step 3 of 7

show ip interface brief | include upR1’s outputInterface IP-Address … Status ProtocolEthernet0/0 10.0.12.1 … up upEthernet0/1 10.0.13.1 … up upEthernet0/2 … administratively down downEthernet0/3 … administratively down down| include up keeps each linethat holds the letters upWhich lines does R1 print?Answer under the figure, then tap Next.

All five lines go through the test, the header among them.

Which lines does R1 print?

  • The Ethernet0/0 and Ethernet0/1 lines (Correct): Only those two lines hold the letters up, in their Status and Protocol.
  • All five, since the header always stays: include treats the header like any other line. It does not hold up, so it is not printed.
  • The four Ethernet lines, since each one has a Status: The test is the letters up, not whether a line has a Status. Ethernet0/2 and Ethernet0/3 say administratively down, down: no up in them.
  • None, since no line starts with up: A line stays when up appears anywhere in it.

Step 4 of 7

show ip interface brief | include upR1’s outputInterface IP-Address … Status ProtocolEthernet0/0 10.0.12.1 … up upEthernet0/1 10.0.13.1 … up upEthernet0/2 … administratively down downEthernet0/3 … administratively down down| include up keeps each linethat holds the letters upWhat R1 printsEthernet0/0 10.0.12.1 … up upEthernet0/1 10.0.13.1 … up up

R1 prints two lines, Ethernet0/0 and Ethernet0/1, and no header.

Step 5 of 7

show ip interface brief | begin Ethernet0/1R1’s outputInterface IP-Address … Status ProtocolEthernet0/0 10.0.12.1 … up upEthernet0/1 10.0.13.1 … up upEthernet0/2 … administratively down downEthernet0/3 … administratively down down| begin Ethernet0/1 starts at the first linethat holds Ethernet0/1, then prints the restWhat R1 printsEthernet0/1 10.0.13.1 … up upEthernet0/2 … administratively down downEthernet0/3 … administratively down down

With | begin Ethernet0/1, R1 starts at the first line that holds Ethernet0/1 and prints every line after it.

Step 6 of 7

show running-config| section interface Ethernet0/1R1’s outputinterface Ethernet0/0 …interface Ethernet0/1description Link to R3ip address 10.0.13.1 255.255.255.0interface Ethernet0/2 …| section interface Ethernet0/1 keeps thatline and the lines indented under itWhat R1 printsinterface Ethernet0/1description Link to R3ip address 10.0.13.1 255.255.255.0

On running-config, | section interface Ethernet0/1 keeps the line that holds the text and the indented lines under it: one interface’s block.

Step 7 of 7

Three filters after the pipe:include, begin, sectionWhat each filter keepsinclude – every line that holds the textwith up: Ethernet0/0, Ethernet0/1begin – first such line and all after itwith Ethernet0/1: Ethernet0/1 to the last linesection – that line and indented lineswith interface Ethernet0/1: its block

include keeps the matching lines. begin prints from the first match on. section keeps a block.

Step 1 of 7

At the top, a strip with the command. Under it the heading “R1’s output” over five rows, then a bar that says what the filter keeps, then the heading “What R1 prints” over the rows R1 prints. Step 1: the strip reads show ip interface brief and the output rows hold its five lines, the header, Ethernet0/0 and Ethernet0/1 ending in up up, Ethernet0/2 and Ethernet0/3 ending in administratively down down. Step 2: the strip adds | include up and the bar says it keeps each line that holds the letters up. Step 3 asks which lines R1 prints; the space for the answer reads “Which lines does R1 print? Answer under the figure, then tap Next.” on two lines. Step 4: the rows R1 prints are the Ethernet0/0 and Ethernet0/1 lines only. Step 5: with | begin Ethernet0/1 R1 prints the Ethernet0/1, Ethernet0/2 and Ethernet0/3 lines. Step 6: the output rows now hold running-config lines around interface Ethernet0/1, and with | section interface Ethernet0/1 R1 prints that line and its two indented lines, description Link to R3 and the ip address line. Step 7: the output rows and the filter bar go; under the strip, the heading “What each filter keeps” over three cards, for include, every line that holds the text, with up Ethernet0/0 and Ethernet0/1; begin, the first such line and all after it, with Ethernet0/1 from Ethernet0/1 to the last line; section, that line and its indented lines, with interface Ethernet0/1 its block.

Figure 2.2 · What include, begin and section keep.R1 prints five lines for show ip interface brief: a header, then one line per interface.With | include up after the command, R1 tests each line for the letters up.All five lines go through the test, the header among them.R1 prints two lines, Ethernet0/0 and Ethernet0/1, and no header.With | begin Ethernet0/1, R1 starts at the first line that holds Ethernet0/1 and prints every line after it.On running-config, | section interface Ethernet0/1 keeps the line that holds the text and the indented lines under it: one interface’s block.include keeps the matching lines. begin prints from the first match on. section keeps a block.

On R1, with | include up:

Output · IOS XE 17.18.2
R1#show ip interface brief | include up1Ethernet0/0            10.0.12.1       YES NVRAM  up                    up      1Ethernet0/1            10.0.13.1       YES NVRAM  up                    up      
  1. Ethernet0/0 and Ethernet0/1: each holds up, in its Status and Protocol.

On R1, with | begin Ethernet0/1:

Output · IOS XE 17.18.2
R1#show ip interface brief | begin Ethernet0/11Ethernet0/1            10.0.13.1       YES NVRAM  up                    up      2Ethernet0/2            unassigned      YES NVRAM  administratively down down    2Ethernet0/3            unassigned      YES NVRAM  administratively down down    
  1. The first line that holds Ethernet0/1. Printing starts here.
  2. These lines do not hold Ethernet0/1, but they come after it, so they are printed too.

On R1, from running-config, with | section interface Ethernet0/1:

Output · IOS XE 17.18.2
R1#show running-config | section interface Ethernet0/11interface Ethernet0/12 description Link to R32 ip address 10.0.13.1 255.255.255.0
  1. The line that holds the text: the start of the block.
  2. The indented lines under it: Ethernet0/1’s settings. They do not hold the text, but section keeps them.

Nothing from the other interfaces is printed.

With the same text, include would print only the line interface Ethernet0/1, and section adds the lines indented under it.

Use the include rule: a line stays only when it holds the text.

show ip interface brief prints a header and four interface lines. Ethernet0/0 and Ethernet0/1 end in up, up; Ethernet0/2 and Ethernet0/3 end in administratively down, down. By the rule, with | include down after it, which lines would R1 print?

Do capital letters matter? R1 runs IOS XE software, and IOS XE commands are generally case-insensitive, but the text after a filter keyword is case-sensitive.

Key idea

A filter reads the output line by line. include keeps the lines that hold the text, begin starts at the first one, section keeps a block. Filter text is case-sensitive.

Verify

Read R1’s interfaces

R1 at a glance: show version and show ip interface brief

Which software does R1 run, and which of its interfaces work?

R1’s software is in show version, which prints details about the router itself. On R1 it shows release 17.18.2 and how long it has been up and running.

In show ip interface brief, two columns, Status and Protocol, say whether an interface works.

R1 lists Ethernet0/2 as administratively down under Status. Why? Its configuration holds shutdown, so it has been taken down by an administrator. That column is the interface status, the state of the interface itself. Otherwise it reads up or down, by whether the interface hardware is currently active; on R1, Ethernet0/0 and Ethernet0/1 read up (Figure 2.3).

The Protocol column asks something different. It shows the line protocol, which says, for the interface’s link, whether the line is usable. Next to administratively down it reads down.

R2HQ routerR1office routerR3branch routerEt0/0up · upEt0/1up · upEt0/2, Et0/3turned off
Figure 2.3 · R1’s four interfaces: two up and up, two turned off.

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, up · up”, the cable to R3 “Et0/1, up · up”; both tags sit left of the cable. Left of R1, level with it and with no line, a note: “Et0/2, Et0/3” over “turned off”.

On R1, read Interface, IP-Address, Status and Protocol:

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

Find the line for R1’s link to R3.

Output · IOS XE 17.18.2
R1#show ip interface brief
  1. Ethernet0/1: 10.0.13.1, then up and up.
  2. Ethernet0/2: unassigned, no address. Administratively down and down: its configuration holds shutdown, so it is turned off on R1.
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    

When you see administratively down, look at R1’s own configuration, not at a cable.

In that output, which interfaces can carry data right now?

One interface in detail: show interfaces and its counters

Ethernet0/1 is up and up. Is it actually carrying anything?

It shows in the interface’s counters, numbers that go up as an interface receives or sends. The counters count from the last time they were reset to zero, and Last clearing shows when that was.

show interfaces Ethernet0/1 prints one interface in detail.

On R1:

Output · IOS XE 17.18.2
R1#show interfaces Ethernet0/11Ethernet0/1 is up, line protocol is up … 1 more line (see Full output)2  Description: Link to R33  Internet address is 10.0.13.1/24… 6 more lines (see Full output)4  Last clearing of "show interface" counters never… 5 more lines (see Full output)5     30 packets input, 3366 bytes, 0 no buffer… 2 more lines (see Full output)6     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored… 1 more line (see Full output)7     49 packets output, 7353 bytes, 0 underruns… 6 more lines (see Full output)
  1. The same two words as Status and Protocol, in a sentence: the interface is up, and its line protocol is up.
  2. The note set with description for this interface.
  3. R1’s address on the link, 10.0.13.1/24, with the prefix length.
  4. Last clearing … never: these counters have not been reset since they started counting.
  5. The packets this interface has received (input).
  6. 0 input errors: no receive errors were counted.
  7. The packets it has sent (output).
Full output · 28 lines
R1#show interfaces Ethernet0/1Ethernet0/1 is up, line protocol is up   Hardware is AmdP2, address is aabb.cc00.0b10 (bia aabb.cc00.0b10)  Description: Link to R3  Internet address is 10.0.13.1/24  MTU 1500 bytes, BW 10000 Kbit/sec, DLY 1000 usec,      reliability 255/255, txload 1/255, rxload 1/255  Encapsulation ARPA, loopback not set  Keepalive set (10 sec)  ARP type: ARPA, ARP Timeout 04:00:00  Last input 00:00:00, output 00:00:00, output hang never  Last clearing of "show interface" counters never  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0  Queueing strategy: fifo  Output queue: 0/40 (size/max)  5 minute input rate 1000 bits/sec, 2 packets/sec  5 minute output rate 2000 bits/sec, 2 packets/sec     30 packets input, 3366 bytes, 0 no buffer     Received 0 broadcasts (0 IP multicasts)     0 runts, 0 giants, 0 throttles      0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored     0 input packets with dribble condition detected     49 packets output, 7353 bytes, 0 underruns     Output 15 broadcasts (0 IP multicasts)     0 output errors, 0 collisions, 2 interface resets     0 unknown protocol drops     0 babbles, 0 late collision, 0 deferred     0 lost carrier, 0 no carrier     0 output buffer failures, 0 output buffers swapped out

To count one test, start from zero. clear counters Ethernet0/1 sets this interface’s counters back to 0. Unlike a show command, it changes something, and it asks you to confirm first. On R1, Enter confirmed it.

R1 clears Ethernet0/1’s counters, then sends 100 test packets to R3 with ping 10.0.13.3 repeat 100. What will packets output show?

Right after clear counters Ethernet0/1, on R1, only the lines that hold packets:

Output · IOS XE 17.18.2
R1#show interfaces Ethernet0/1 | include packets  5 minute input rate 1000 bits/sec, 1 packets/sec  5 minute output rate 0 bits/sec, 0 packets/sec1     0 packets input, 0 bytes, 0 no buffer     0 input packets with dribble condition detected2     0 packets output, 0 bytes, 0 underruns
  1. packets input: 0 since the clear.
  2. packets output: 0.

The filter also keeps three other lines that hold the word packets.

Impact clear counters Ethernet0/1 changed only the counters of Ethernet0/1.

Then R1 tests R3 with ping, and repeat sets how many, here 100. Each ! is a reply.

On R1, a test of R3, 10.0.13.3:

Output · IOS XE 17.18.2
R1#ping 10.0.13.3 repeat 100Type escape sequence to abort.Sending 100, 100-byte ICMP Echos to 10.0.13.3, timeout is 2 seconds:!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1Success rate is 100 percent (100/100), round-trip min/avg/max = 1/1/1 ms
  1. Success rate is 100 percent (100/100): every test packet got a reply.

Right after, on R1, the same filter:

Output · IOS XE 17.18.2
R1#show interfaces Ethernet0/1 | include packets  5 minute input rate 1000 bits/sec, 1 packets/sec  5 minute output rate 0 bits/sec, 0 packets/sec1     100 packets input, 11400 bytes, 0 no buffer     0 input packets with dribble condition detected2     100 packets output, 11400 bytes, 0 underruns
  1. packets input: 100.
  2. packets output: 100, since it went up by one for each packet sent.

Packets input counts what arrives, so it went up for the replies from R3, which R1 did not send.

Key idea

show interfaces gives the state in words, with the note, the address and counters. Counters count up: clear them, send packets, read again.

Troubleshoot

A link off, a filter that finds nothing

What do you check when R2 does not answer, and when a filter prints nothing?

Case 1 of 2.R2 does not answer because R1’s Ethernet0/0 is turned off

  1. Case 1 · Symptom

    Someone has worked on R1. Now R1 tests R2 and gets no answer.

    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 0 percent (0/5)
    1. Success rate is 0 percent: R2 does not answer.
  2. Case 1 · Command

    Check the interface that leads to R2.

  3. Case 1 · Output

    On R1:

    Output · IOS XE 17.18.2
    R1#show ip interface brief1Interface Ethernet0/0IP-Address 10.0.12.1OK? YESMethod NVRAMStatus administratively downProtocol downInterface 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. Key line Ethernet0/0, the interface with 10.0.12.1 toward R2, reads administratively down, down.
    Full output · 5 lines
    R1#show ip interface briefInterface              IP-Address      OK? Method Status                ProtocolEthernet0/0            10.0.12.1       YES NVRAM  administratively down down    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    
  4. Case 1 · How far it reaches

    Does R3 still answer?

    On R1, a test of R3, 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: R3 answers.
  5. Case 1 · What it means

    R2HQ routerR1office routerR3branch routerR1 Et0/0 offR3 still answers
    Figure 2.4 · Case 1 · R1’s Ethernet0/0 turned off.

    The network: 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. Both cables are drawn alike. Beside R1’s end of the cable from R2, just above R1 and left of the cable, a cross and, level with it on its left, a highlighted tag “R1 Et0/0 off”. Beside the cable to R3 is the tag “R3 still answers”.

    • administratively down: Ethernet0/0 was turned off on R1 with shutdown.
    • With R1’s end turned off, nothing crosses the link to R2.
    • Ethernet0/1 is a separate interface, so it stays on.
  6. Case 1 · Fix

    Turn Ethernet0/0 on again: from privileged EXEC, go to its interface configuration mode and type no shutdown.

    On R1:

    Output · IOS XE 17.18.2
    R1#configure terminalEnter configuration commands, one per line.  End with CNTL/Z.R1(config)#interface Ethernet0/01R1(config-if)#no shutdown2R1(config-if)#end
    1. no shutdown turns the interface on.
    2. end goes back to R1#.

    Impact Turning an interface on or off changes what R1 can reach at once. The change is in running-config only; to keep it after a restart, save the configuration with copy running-config startup-config.

  7. Case 1 · Proof

    R1 tests R2 again.

    On R1:

    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 again.

End of case 1. Solved: Ethernet0/0 is on; R2 answers.

Case 2 of 2.The filter prints nothing

  1. Case 2 · Symptom

    You look for the interface notes in R1’s configuration with a filter. R1 prints nothing.

    On R1:

    Output · IOS XE 17.18.2
    1R1#show running-config | include Description(no output: the command printed nothing)
    1. No line of the configuration holds Description.
  2. Case 2 · Command

    Check Ethernet0/1’s block for the note.

  3. Case 2 · Output

    On R1:

    Output · IOS XE 17.18.2
    R1#show running-config | section interface Ethernet0/1interface Ethernet0/11 description Link to R3 ip address 10.0.13.1 255.255.255.0
    1. Key line description, with a small d.
  4. Case 2 · How far it reaches

    Does the same filter text fail on every output?

    On R1:

    Output · IOS XE 17.18.2
    R1#show interfaces Ethernet0/1 | include Description1  Description: Link to R3
    1. show interfaces writes it with a capital D: Description.
  5. Case 2 · What it means

    The filter looks for: Descriptionno match: D is not dThe line holds: description Link to R3
    Figure 2.5 · Case 2 · Description against description.

    A bar “The filter looks for: Description”. Under it an arrow down, crossed on its shaft and labeled, highlighted, “no match: D is not d”, to a bar “The line holds: description Link to R3”.

    • The note is there, and the filter missed it.
    • Description with a capital D does not find description, because filter text is case-sensitive.
  6. Case 2 · Fix

    Type the word as the configuration writes it.

    On R1:

    Output · IOS XE 17.18.2
    R1#show running-config | include description1 description Link to R22 description Link to R3
    1. The note of Ethernet0/0: the link to R2.
    2. The note of Ethernet0/1: the link to R3.
  7. Case 2 · Proof

    Type more of the line to keep only the one you want:

    Output · IOS XE 17.18.2
    R1#show running-config | include description Link to R31 description Link to R3
    1. One line: only Ethernet0/1’s note holds all of that text.

End of case 2. Solved: The filter finds the notes.

Both cases

Key idea

Read the Status first: administratively down means turned off on this router. When a filter prints nothing, check its letters before you decide that the line is missing.

Suppose you type show running-config | include Shutdown, with a capital S, and R1 prints nothing. Would that prove that every interface is turned on?

Check

In show ip interface brief, an interface’s Status reads administratively down and its Protocol down. What does that say?
show ip interface brief prints a header, then Ethernet0/0 with 10.0.12.1, Ethernet0/1 with 10.0.13.1, and Ethernet0/2 and Ethernet0/3 with unassigned. By the rule, with | include 10 after it, which lines would R1 print?

On R1:

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

Find the line that says whether Ethernet0/0 is turned on.

Output · IOS XE 17.18.2
R1#show interfaces Ethernet0/0… 1 more line (see Full output)… 12 more lines (see Full output)… 4 more lines (see Full output)… 6 more lines (see Full output)
Full output · 28 lines
R1#show interfaces Ethernet0/0Ethernet0/0 is administratively down, line protocol is down   Hardware is AmdP2, address is aabb.cc00.0b00 (bia aabb.cc00.0b00)  Description: Link to R2  Internet address is 10.0.12.1/24  MTU 1500 bytes, BW 10000 Kbit/sec, DLY 1000 usec,      reliability 255/255, txload 1/255, rxload 1/255  Encapsulation ARPA, loopback not set  Keepalive set (10 sec)  ARP type: ARPA, ARP Timeout 04:00:00  Last input 00:00:37, output 00:00:37, output hang never  Last clearing of "show interface" counters never  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0  Queueing strategy: fifo  Output queue: 0/40 (size/max)  5 minute input rate 0 bits/sec, 0 packets/sec  5 minute output rate 0 bits/sec, 0 packets/sec     36 packets input, 4331 bytes, 0 no buffer     Received 1 broadcasts (0 IP multicasts)     0 runts, 0 giants, 0 throttles      0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored     0 input packets with dribble condition detected     56 packets output, 8393 bytes, 0 underruns     Output 17 broadcasts (0 IP multicasts)     0 output errors, 0 collisions, 2 interface resets     0 unknown protocol drops     0 babbles, 0 late collision, 0 deferred     0 lost carrier, 0 no carrier     0 output buffer failures, 0 output buffers swapped out
R1’s configuration holds a block for Ethernet0/0: the line interface Ethernet0/0, then, indented under it, description Link to R2 and ip address 10.0.12.1 255.255.255.0. By the rule, what would show running-config | section interface Ethernet0/0 print?
R1’s Ethernet0/1 is turned off. Then R1 tests two routers, R2 at 10.0.12.2 and R3 at 10.0.13.3. Which one still answers?

Summary

Three filters after the pipe:include, begin, sectionWhat each filter keepsinclude – every line that holds the textwith up: Ethernet0/0, Ethernet0/1begin – first such line and all after itwith Ethernet0/1: Ethernet0/1 to the last linesection – that line and indented lineswith interface Ethernet0/1: its block
Figure 2.2, recap · include keeps the matching lines. begin prints from the first match on. section keeps a block.

The strip reads “Three filters after the pipe: include, begin, section”. Under it the heading “What each filter keeps” over three cards: include, every line that holds the text, with up Ethernet0/0 and Ethernet0/1; begin, the first such line and all after it, with Ethernet0/1 from Ethernet0/1 to the last line; section, that line and its indented lines, with interface Ethernet0/1 its block.

  • A show command only reads: show version shows the software, show ip interface brief every interface in one line, show interfaces one interface in detail, show running-config the configuration.
  • A filter after the pipe keeps lines: include the matching lines, begin from the first match on, section a block. Filter text is case-sensitive.
  • In show ip interface brief, Status up and Protocol up mean the interface is turned on and its link is usable; administratively down means it was turned off on the router.
  • show interfaces adds the note, the address and counters, which a clear sets back to zero.
  • On R1, turning one interface off stopped only its own link. An empty filter output does not prove the line is missing: check the letters first.