Cisco OS basics..part of the Intro to Networking series

Today, lets start our Cisco router and switch tutorial series.

Advertisements

Today, I would like to start a series of post related to Networking and Cisco iOS basics. This will include a few post about network protocols, routing protocols and Cisco command line interface (CLI) commands. This series will be ongoing, and hopefully helpful to some of you out there. For some of these tutorials, I will be using the Cisco Packet Tracer program, located here. I’ll get into the tutorial after the break.

Once you have your router, or switch, as most of these commands work for them as well, powered on, you’ll need a way to connect to the OS. One way to do this is to connect a PC to it using a console roll-over cable. One end connects to the console port on the router or switch, and the other can connect either to the DB-15 port of your computer, or USB if you have the adapter.

consoleport
The backside of a Cisco 1941 router. Highlighted is the location of the console port.

Once connected, use a program like PuTTY to connect the computer to the router via console.  One thing to remember is that you will need to go to your Device manager to verify which COM port is being used.

putty
PuTTY

 

Once connected, a screen similar to command prompt will appear. You are now connected to the serial port. From here, you will see a screen similar to this. This is the CLI. This is how you configure the router and switch.

cli
When presented with this prompt, type no and hit enter

You should now have a prompt that reads Router> . This is known as User EXEC mode. To get started with configuring the router, type enable. This will change the router prompt to Privilege EXEC mode, and some settings can be made here. To show a list of commands that can be performed here, type ? .

privexec
Privilege EXEC mode and commands

 

To get into the configuration terminal, known as the global configuration mode, type in configure terminal. Lets set a hostname, which will be the identifier of the router. From the Router (config)# prompt, type hostname and then the name you want the router to be. It should follow some sort of naming convention, be it building, room number and router number, or some other convention. For my examples, I will just call it R1network1. The command should look like Router (config)# hostname R1network1 . Note that the prompt now changes to R1network1(config)# . You have now successfully changed the hostname, and thus begins the start of setting up the router.

hostname
Success!!

 

Setting a banner message on the router can be frustrating. There is a specific format that must be followed when entering the message. Using the ? while entering a command helps with remembering how to finish the command. Also, Cisco iOS has tab completion, so if you start typing in a command and it Tab, it will auto complete the command. Back to the date and time. From the Global Config mode, type  banner MOTD followed by # . Complete your message warning about unauthorized access and follow the message with another # . The command should look like banner MOTD # Any unauthorized usage is strictly prohibited.  # . Banner messages will appear when a user logs into the router.

motd.PNG
Another success.

 

In a future post, I’ll show how to secure the User Exec, Privilege Exec and other lines into the router. For now lets do four more commands. To get back from Global Configuration mode into Privilege Exec or User Exec, type in exit. Now we will want to save our changes that we have made. There is no automatic save in the Cisco routers or switches, so we use a command copy running-config startup-config . This will save the configurations into the onboard NVRAM (non-volatile ram) which means that the setting do not disappear when the power goes off).  It will ask for a saving point, to which you hit enter for the default. All the settings are now saved.

copyrunstart.PNG
copy run start also works. 

To show the current running configurations, or to show information on the router itself, use the show run or show version commands. If you want to reboot the router from the CLI, type reload, followed by another enter. This will do a fill reboot of the router. Ensure that any changes you have done are saved before hand.

That is it for very basic commands for the Cisco router. Next time, we are going to add a switch and another computer to the topology and establish our first IP addressing. If you would like a copy of the Packet Tracer file, please let me know. As always, like, share, comment. Hopefully this has been helpful. I know it was fun.

 

Until next time…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s