Discovering computer networks: hands on in the Open Networking Lab
Discovering computer networks: hands on in the Open Networking Lab

Start this free course now. Just create an account and sign in. Enrol and complete the course for a free statement of participation or digital badge if available.

Free course

Discovering computer networks: hands on in the Open Networking Lab

10.2 Modes within the Cisco CLI

Now you know how to connect to the routers, it is important to understand how to navigate around the command-line interface of a Cisco router.

You will now have the opportunity to use the command-line interface. Be aware that there are multiple modes within the Cisco internetwork operating system (IOS). Each mode allows the user to achieve different tasks; for example, each mode can be password-protected so specific people can only use specific modes. Watch the video below (which is about 2 minutes long) to see how to identify different modes and how to navigate between them.

CLI modes

Download this video clip.Video player: 60_cli_modes.mp4
Skip transcript

Transcript

There are three main modes within the Cisco CLI: user exec, represented by a greater-than symbol, privileged exec, represented bywith a hash symbol, and global configuration, which is represented with the word config in brackets followed by a hash symbol. These three modes allow you to use different commands. User exec is a restricted view where only a few basic commands work, for example ping, traceroute and some basic show commands. Privileged exec mode is less restricted. This allows you to execute all of the show commands and save the configuration. Global configuration is the mode to make configuration changes. From here you can configure the hostname or enter a sub-mode to configure an IP addresses on an interface.

OK, now we are connected to a Cisco 2911 router being simulated in Packet Tracer. When you turn the router on for the first time it will ask you if you want to go through the configuration wizard. If you answer yes, the device will ask a series of questions and make a configuration depending on the answers. We don’t want this, so we always answer no. Now we can see the default hostname ‘router’ and that we are in user exec mode indicated by the greater-than symbol to the right of the hostname. How do I know what commands I can use in this mode? We can use the question mark to list all the commands available. We want to move to privileged exec, so the command we are interested in is enable. If we type enable and hit Return, the prompt will change to a hash symbol indicating that we are now in privileged exec mode. If we use the question mark now, we can see that there are a lot more commands available. If I want to see how theis router is configured, I can do this by typing show and then use the question mark again, it will list all the show commands we can use. To see the configuration of the router we can use the show running-configcommand. We can see the complete configuration of the router from here. If I press Return multiple times, we will scroll one line at a time or if I press Space, we will scroll a page at a time. The prompt will keep scrolling to the end of the configuration and then return us to the previous prompt, so we can continue the configuration. Use the PT Anywhere activity below to open a CLI and practise moving between modes. In the next part we will look at changing the hostname of the device.

End transcript
 
Interactive feature not available in single page view (see it in standard view).

Activity 2 Try it out

10 minutes

Open PT Anywhere [Tip: hold Ctrl and click a link to open it in a new tab. (Hide tip)] in a new tab or window so you can read these instructions.

  1. Select the router and open its CLI by selecting ‘Open console’ from the menu bar. Remember to answer ‘no’ to the question ‘Continue with configuration dialogue?’
  2. Practise moving between modes by using the commands enable and configure terminal. Can you use the configure terminal command in user exec mode? How does the prompt change when you move from one mode to another?
  3. Later in the course you will be using the commands interface g0/0 and show running-configuration. Try to discover what modes you must be in to use these commands. (Hint: remember you can use the ? command to show what commands are available in each mode.)
  4. When you’re in privileged exec mode what happens when you enter the command exit?

Answer

You should have found you were unable to use the command configure terminal in the user exec mode (where the prompt is a ‘greater than’ symbol). To use this command you need to be in the privileged exec mode (where the prompt is a hash symbol).

You should have found that the commands show running-config and configure terminal are available in the privileged exec mode but not in the user exec mode. When you enter configure terminal the prompt changes to (config)# which indicates you have entered global configuration mode.

When in privileged exec mode, the command exit takes you back to user exec mode. In fact, in any mode, the command exit will take you to the next higher mode (for example from global configuration mode to privileged exec mode and from privileged exec to user exec mode).

You’ve now tried using some commands in the Cisco CLI. You should become confident with moving around it and knowing where the majority of commands should be used, but this comes with practice. The next section of this session moves on to start configuring the router.

OPNL_1

Take your learning further

Making the decision to study can be a big step, which is why you'll want a trusted University. The Open University has 50 years’ experience delivering flexible learning and 170,000 students are studying with us right now. Take a look at all Open University courses.

If you are new to university level study, find out more about the types of qualifications we offer, including our entry level Access courses and Certificates.

Not ready for University study then browse over 900 free courses on OpenLearn and sign up to our newsletter to hear about new free courses as they are released.

Every year, thousands of students decide to study with The Open University. With over 120 qualifications, we’ve got the right course for you.

Request an Open University prospectus