Verify Connectivity of Directly Connected Networks (1.1.4)
The first task to undertake once the basic settings and interfaces are configured is to verify and validate the configured settings. This is an important step and should be done before any other configurations are added to the router.
Verify Interface Settings (18.104.22.168)
There are several show commands that can be used to verify the operation and configuration of an interface. The following three commands are especially useful to quickly identify an interface status:
- show ip interface brief: Displays a summary for all interfaces, including the IPv4 address of the interface and current operational status.
- show ip route: Displays the contents of the IPv4 routing table stored in RAM. In Cisco IOS 15, active interfaces should appear in the routing table with two related entries identified by the code 'C' (Connected) or 'L' (Local). In previous IOS versions, only a single entry with the code 'C' will appear.
- show running-config interface interface-id: Displays the commands configured on the specified interface.
Figure 1-17 displays the output of the show ip interface brief command.
Figure 1-17 Display Interface Summaries
The output reveals that the LAN interfaces and the WAN link are all activated and operational as indicated by the Status of “up” and Protocol of “up.” A different output would indicate a problem with either the configuration or the cabling.
Figure 1-18 displays the output of the show ip route command.
Figure 1-18 Verify the IPv4 Routing Table
Notice the three directly connected network entries and the three local host route interface entries. A local host route has an administrative distance of 0. It also has a /32 mask for IPv4, and a /128 mask for IPv6. The local host route is for routes on the router owning the IP address. It is used to allow the router to process packets destined to that IP.
Figure 1-19 displays the output of the show running-config interface command. The output displays the current commands configured on the specified interface.
Figure 1-19 Verify an Interface Configuration
The following two commands are used to gather more detailed interface information:
- show interfaces: Displays interface information and packet flow count for all interfaces on the device
- show ip interface: Displays the IPv4-related information for all interfaces on a router
Verify IPv6 Interface Settings (22.214.171.124)
The commands to verify the IPv6 interface configuration are similar to the commands used for IPv4.
The show ipv6 interface brief command in Figure 1-20 displays a summary for each of the interfaces.
Figure 1-20 Verify the R1 IPv6 Interface Status
The “up/up” output on the same line as the interface name indicates the Layer 1/Layer 2 interface state. This is the same as the Status and Protocol columns in the equivalent IPv4 command.
The output displays two configured IPv6 addresses per interface. One address is the IPv6 global unicast address that was manually entered. The other address, which begins with FE80, is the link-local unicast address for the interface. A link-local address is automatically added to an interface whenever a global unicast address is assigned. An IPv6 network interface is required to have a link-local address, but not necessarily a global unicast address.
The show ipv6 interface gigabitethernet 0/0 command output shown in Figure 1-21 displays the interface status and all of the IPv6 addresses belonging to the interface. Along with the link-local address and global unicast address, the output includes the multicast addresses assigned to the interface, beginning with prefix FF02.
Figure 1-21 Verify the IPv6 Configuration on R1 G0/0
The show ipv6 route command shown in Figure 1-22 can be used to verify that IPv6 networks and specific IPv6 interface addresses have been installed in the IPv6 routing table. The show ipv6 route command will only display IPv6 networks, not IPv4 networks.
Figure 1-22 Verify the R1 IPv6 Routing Table
Within the routing table, a ‘C’ next to a route indicates that this is a directly connected network. When the router interface is configured with a global unicast address and is in the “up/up” state, the IPv6 prefix and prefix length is added to the IPv6 routing table as a connected route.
The IPv6 global unicast address configured on the interface is also installed in the routing table as a local route, as indicated with an ‘L’ next to the route entry. The local route has a /128 prefix. Local routes are used by the routing table to efficiently process packets with the interface address of the router as the destination.
The ping command for IPv6 is identical to the command used with IPv4 except that an IPv6 address is used. As shown in Figure 1-23, the ping command is used to verify Layer 3 connectivity between R1 and PC1.
Figure 1-23 Verify Connectivity on R1
Other useful IPv6 verification commands include:
- show interface
- show ipv6 routers
Filter Show Command Output (126.96.36.199)
Commands that generate multiple screens of output are, by default, paused after 24 lines. At the end of the paused output, the --More-- text displays. Pressing Enter displays the next line and pressing the spacebar displays the next set of lines. Use the terminal length number command to specify the number of lines to be displayed. A value of 0 (zero) prevents the router from pausing between screens of output.
Another very useful feature that improves the user experience in the command-line interface (CLI) is the filtering of show output. Filtering commands can be used to display specific sections of output. To enable the filtering command, enter a pipe (|) character after the show command and then enter a filtering parameter and a filtering expression.
The filtering parameters that can be configured after the pipe include:
- section: Shows entire section that starts with the filtering expression
- include: Includes all output lines that match the filtering expression
- exclude: Excludes all output lines that match the filtering expression
- begin: Shows all the output lines from a certain point, starting with the line that matches the filtering expression
Figure 1-24 Filter show Commands by Section
Figure 1-25 Filter show Commands by Common Keyword
Figure 1-26 Filter show Commands to Exclude Rows of Output
Figure 1-27 Filter show Commands Beginning from a Keyword
The example in Figure 1-25 uses the pipe character and the include keyword.
The example in Figure 1-26 uses the pipe character and the exclude keyword.
The example in Figure 1-27 uses the pipe character and the begin keyword.
Command History Feature (188.8.131.52)
The command history feature is useful, because it temporarily stores the list of executed commands to be recalled.
To recall commands in the history buffer, press Ctrl+P or the Up Arrow key. The command output begins with the most recent command. Repeat the key sequence to recall successively older commands. To return to more recent commands in the history buffer, press Ctrl+N or the Down Arrow key. Repeat the key sequence to recall successively more recent commands.
By default, command history is enabled and the system captures the last 10 command lines in its history buffer. Use the show history privileged EXEC command to display the contents of the buffer.
It is also practical to increase the number of command lines that the history buffer records during the current terminal session only. Use the terminal history size user EXEC command to increase or decrease the size of the buffer.
For example, the following displays a sample of the terminal history size and show history commands:
R1# terminal history size 200 R1# R1# show history show ip interface brief show interface g0/0 show ip interface g0/1 show ip route show ip route 184.108.40.206 show running-config interface s0/0/0 terminal history size 200 show history R1#