CLI Prompts
Let’s explore the different prompts you’ll encounter when configuring a switch or router now, because knowing them well will really help you orient yourself and recognize exactly where you are at any given time while in configuration mode. I’m going to demonstrate some of the prompts used on a Cisco switch and cover the various terms used along the way. Make sure you’re very familiar with them, and always check your prompts before making any changes to a router’s configuration!
We’re not going to venture into every last obscure command prompt you could potentially come across in the configuration mode world because that would get us deep int o territory that’s beyond the scope of this book. Instead, I’m going to focus on the prompts you absolutely must know to pass the exam plus the very handy and seriously vital ones you’ll need and use the most in real-life networking—the cream
of the crop.
Don’t freak! It’s not important that you understand exactly
what each of these command prompts accomplishes just yet because I’m going to completely fill you in on all of them reallysoon. For now, relax and focus on just becoming familiar with the different prompts available and all will be well!
Interfaces
To make changes to an interface, you use the interface command from global configuration mode:
Switch(config)# interface ?
Async Async interface
BVI Bridge-Group Virtual Interface
CTunnel CTunnel interface
Dialer Dialer interface
FastEthernet FastEthernet IEEE 802.3
Filter Filter interface
Filtergroup Filter Group interface
GigabitEthernet GigabitEthernet IEEE 802.3z
Group-Async Async Group interface
Lex Lex interface
Loopback Loopback interface
Null Null interface
Port-channel Ethernet Channel of interfaces
Portgroup Portgroup interface
Pos-channel POS Channel of interfaces
Tunnel Tunnel interface
Vif PGM Multicast Host interface
Virtual-Template Virtual Template interface
Virtual-TokenRing Virtual TokenRing
Vlan Catalyst Vlans
fcpa Fiber Channel
range interface range command
Switch(config)# interface fastEthernet 0/1
Switch(config-if)#)
Did you notice that the prompt changed to Switch(config-if)# ? This tells you that you’re in interface configuration mode . And wouldn’t it be nice if the prompt also gave you an indication of what interface you were configuring? Well, at least for now we’ll have to live without the prompt information, because it doesn’t. But it should already be clear to you that you really need to pay attention when configuring an IOS device!
Line CommandsTo configure user-mode passwords, use the line command. The prompt then becomes Switch(config-line)# :
Switch(config)# line ?
<0-16> First Line number
console Primary terminal line
vty Virtual terminal
Switch(config)# line console 0
Switch(config-line)#
The line console 0 command is a global command, and sometimes you’ll also hear people refer to global commands as major commands. In this example, any command typed from the (config-line) prompt
is known as a subcommand.
Access List Configurations
To configure a standard named access list, you’ll need to get to the prompt Switch(config-std-nacl)# :
Switch# config t
Switch(config)# ip access-list standard tod
Switch(config-std-nacl)#
What you see here is a typical basic standard ACL prompt. There are various ways to configure access lists, and the prompts are only slightly different from this particular example.
Routing Protocol Configurations
I need to point out that we don’t use routing or router protocols on 2960 switches, but we can and will use them on my 3560 switches. Here is an example of configuring routing on a layer 3 switch:
Switch(config)# router rip
IP routing not enabled
Switch(config)# ip routing
Switch(config)# router rip
Switch(config-router)#
Did you notice that the prompt changed to Switch(config-router)# ? To make sure you achieve the objectiv es specific to the Cisco exam and this book, I’ll configure static routing, RIPv2, and RIPng. And don’t worry—I’ll explain all of these in detail soon, in Chapter 9, “IP Rout ing,” and Chapter 14, “Internet Protocol Version 6 (IPv6)”!