Subscribe:

Ads 468x60px

Social Icons

Monday, September 3, 2012

Chapter 3 - Initial Configuration of Cisco Switch and Router

Chapter 3

Understanding technologies requires a skill. Even though not mine, but the best definition of what a skill is, could be summarized in five words: knowledge and one thousand repetitions.

In this Chapter, there is no real technology to explain. Instead, you will get familiar with some useful commands we use very often while configuring our routers and switches. This practical exercise however, is going to help hone your skills obtained in the previous lesson.


Take a look at our simple topology first:






And here's our plan for the initial configuration. 
  1. Configure the host names on both the switch and the router (SW1 and R1 respectively).
  2. When you mistype the command in the 'enabled mode' the IOS is trying to resolve this name to ip address. Disable that name resolution.
  3. Protect the 'privileged exec mode' with clear text password. Use 'cisco_enable' as your password.
  4. Encrypt the password with 'over-shoulder' algorithm.
  5. Protect the access to the console port 0. Use 'cisco_console' as your password.
  6. Configure the console port 0, so it disconnects you after 5 min. 30 sec. of idleness.
  7. Configure the console port 0 such, that system messages sent to the screen, do not interfere with what you are typing.
  8. After careful consideration you decide to use the most secure access to the 'privileged exec mode'. Disable the previous method and configure the same password using MD5 algorithm to encrypt the password.
  9. On the switch assign ip address (use: 192.168.1.253/24) on the management interface Vlan 1.
  10. Configure the switch to use the default-gateway (address of the default gateway: 192.168.1.254/24) in case it is managed remotely from another subnet or network.
  11. Enable the router's interface FastEthernet1/0. Use 192.168.1.254/24 address.
  12. Enable the interface facing the Internet Serial0/1 (we pretend it is the public interface). Use ip address 172.31.1.1/30.
  13. Enable the remote access to your devices via telnet. Use password 'cisco_remote'.
  14. After careful consideration you decide to use ssh as the remote access method rather than telnet. Configure that.
  15. Save the configuration on both switch and the router so it is available after reload/power cycle.


Solution:

1. Configure the host names on both the switch and the router (SW1 and R1 respectively). 


Most of the steps are identical on a switch and a router.  That is why I'm presenting, router's configuration only. You have to repeat them on the switch yourself. If the configuration of the switch is different, it is presented as well (step 9 and step 10).

If your prompt shows the user mode '>' you must enter the privileged mode first by typing 'enable':
Router>enable
Router#

Then, in order to set the host name on the router you must enter the 'config mode' (you can abreviate the command to 'conf t'):
Router#configure terminal
Router(config)#

Finally, you type in:
Router(config)#hostname R1
R1(config)#

NOTICE!
The commands take effect immediately as long as their syntax is correct.


2. When you mistype the command in the 'enabled mode' the IOS is trying to resolve this name to ip address. Disable that name resolution. 

R1(config)#no ip domain-lookup

3. Protect the 'privileged exec mode' with clear text password. Use 'cisco_enable' as your password.
R1(config)#enable password cisco_enable

4. Encrypt the password with 'over-shoulder' algorithm.

R1(config)#service password-encryption

5. Protect the access to the console port 0. Use 'cisco_console' as your password.

In order to do that you have to change the context from 'config mode' to 'line console 0' mode. Pay attention to the prompt! The 'login' keyword is going to prompt the user for the password.

NOTICE!
the 'no login' command would allow the user to access the console 0 WITHOUT asking for the password even if one was configured.


R1(config)#line console 0
R1(config-line)#password cisco_console
R1(config-line)#login

6. Configure the console port 0, so it disconnects you after 5 min. 30 sec. of idleness.

We're still in console 0 prompt so, we can continue configuring console 0.

R1(config-line)#exec-timeout 5 30
R1(config-line)#


If you wanted the console line 0 to never disconnect you during the time of idleness, you would use:exec-timeout 0 0.

7. Configure the console port 0 such, that system messages sent to the screen, do not interfere with what you are typing.

By default, all system messages are sent to the console 0 and they may interfere with what you are currently typing on the console 0 line. If you are accessing the device via telnet/ssh (remotely), you do not see any messages. If you want to see them on the vty lines (remote connection via telnet/ssh), you must type in: 'terminal monitor' in the 'enabled mode'. Here is the command to satisfy the step 7 in our design:
R1(config-line)#logging synchronous

8. After careful consideration you decide to use the most secure access to the 'privileged exec mode'. Disable the previous method and configure the same password using MD5 algorithm to encrypt the password.

As we are still in the line console 0 context (look at the prompt), we need to step back to the 'config mode', and then remove the previous 'enable' password. Next we will proceed with md5 password configuration. If you did not remove the previous 'enable password', system is going to use the more secure one anyway.

R1(config-line)#exit
R1(config)#no enable password
R1(config)#enable secret cisco_enable


9. On the switch assign ip address (use: 192.168.1.253/24) on the management interface Vlan 1.

I assume that you have completed the steps 1-8 on BOTH router and switch. The commands and prompts will be identical. Now, you can assign ip address on Vlan 1 interface.
SW1>enable
SW1#conf t
SW1(config)#interface vlan 1
SW1(config-if)#ip address 192.168.1.253 255.255.255.0
SW1(config-if)#no shutdown

10. Configure the switch to use the default-gateway (address of the default gateway: 192.168.1.254/24) in case it is managed remotely from another subnet or network.

We need to step back to 'config mode' from interface Vlan1 mode to accomplish the task.
SW1(config-if)#exit
SW1(config)#ip default-gateway 192.168.1.254

11. Enable the router's interface FastEthernet1/0. Use 192.168.1.254/24 address.
R1(config)#interface f1/0
R1(config-if)#ip address 192.168.1.254 255.255.255.0
R1(config-if)#no shutdown


12. Enable the interface facing the Internet Serial0/1 (we pretend it is the public interface). Use ip address 172.31.1.1/24.

Even though we are currently in F1/0 interface context (look at the prompt), we can jump directly towards s0/1 without typing 'exit' first. If you use real routers (not dynamips), one end of the connection must use DCE cable and the other DTE cable. They are connected back-to-back and DCE interface must be set up with the clock rate.
R1(config-if)#interface s0/1
R1(config-if)#ip address 172.31.1.1 255.255.255.252
R1(config-if)#no shutdown

13. Enable the remote access to your devices via telnet. Use password 'cisco_remote'.

Remote access connections are service by special, virtual lines called vty. Here, we will use vty lines 0 through 4, allowing only five concurrent connections via telnet.
R1(config-if)#line vty 0 4
R1(config-if)#password cisco_remote
R1(config-if)#login


14. After careful consideration you decide to use ssh as the remote access method rather than telnet. Configure that.

This is going to be the most complex part in our lab. Below are four steps need to complete the task.
a) Configure system domain-name. Without the domain name, IOS cannot generate rsa keys used for encryption and decryption (public/private). The domain name can be any name you choose to use (here: ccna.local) but company's real name is a good idea.

R1(config-line)#exit
R1(config)#ip domain-name ccna.local
R1(config)#

b) When you type the below command the system will ask you what should be the length of the keys. Choose 1024 value. IOS will take a few seconds to generate them and automatically start SSH server. Wait till it's done.
R1(config)#crypto key generate rsa
R1(config)#

c) Create a user account that will be used for ssh access (here: user=admin, password=S3cr3t).

R1(config)#username admin password cisco_remote
R1(config)#

d) Enable ssh protcol and disable telnet on vty lines 0 4. Make sure that ssh will use locally created user (admin) for ssh connections. This is done using 'login local' command.
R1(config)#line vty 0 4
R1(config-line)#transport input ssh
R1(config-line)#login local
R1(config-line)#end
R1#

15. Save the configuration on both switch and the router so it is available after reload/power cycle.

R1#copy running-config startup-config 


________________________________________________________

will be back soon with next chapter.



Friday, August 31, 2012

Chapter 2 - Navigating in Cisco IOS

Navigating in Cisco IOS

Once, you have connected to your Cisco switch or router console port, and power up the device you will see some information displayed during the start of the device. If the device has no initial configuration you are presented with:

Pic. 1 - System Configuration Dialog






You can safely cancel this request as its capability to configure the device is not very impressive. Instead, you are going to do things all professionals do: command after command.

What follows is bunch of messages sent to the screen and after hitting the Enter key few times you get something like this (here is the router, but a switch would introduce itself as ... Switch>



Router>


IOS Modes (contexts)

This prompt of the device tells you in which 'context' you are, and the one above with the '>' character is known as 'user exec mode' or 'privilege level 1 mode'. You can't configure much in this mode of operation. It is designed as a 'monitoring' mode not a 'configuration' one. Also, the monitoring capability is limited. For instance, you can't see the running configuration of the device.

Type in the following command:

Router>enable
Router#

The prompt changes to '#' which is called 'privileged exec mode', 'enabled mode' or sometimes 'privilege level 15 mode'. I would like to draw your attention to two things here. Both modes of operation (or contexts, if you like) have two things in common:

  1. They are used primarily to monitor the device (you will be using 'show' and 'debug' commands in those modes).
  2. They are context for immediate execution of your commands. If the syntax is correct, system executes the command immediately.
Those two modes differ from one another as well:
  1. User Exec Mode - is limited in terms of what information will be available.
  2. Enabled Exec Mode - gives the operator ALL information (like root or Administrator account on a computer).


Question Mark 

As the commands take many attributes your best friend is the question mark '?'. This help is known as the 'context-sensitive help'. This means that depending on which context you use, while typing a question mark (?) the system is going to list the commands that can be executed in that particular mode of operation. See more in the attached video.

Configurations

In order to configure things in Cisco IOS (except for some minor changes), you must enter the 'global configuration mode' first which is characterized by the following prompt:

Router(config)#

This context can be accessed by typing the following command in the 'privileged exec mode':

Router#configure terminal

Whatever you configure this particular mode it is going to be applied to the device as a whole unit (e.g. hostname, default gateway on a switch etc.).

If you want to enter the context of the interface to configure it with some parameters like ip address, speed, duplex, description etc. , you must enter that interface from the global configuration mode like the one below:

Router(config)#interface fastethernet1/0

If you do not know what interfaces your device has, type the following command in the enabled mode:

Router#show ip interface brief

As you see, in the 'global configuration mode' I did the following actions in order to access the context of the interface:

  1. Entered the interface type (here: Fast Ethernet).
  2. Referenced the module number (here: 1)
  3. Referenced the port number in the module 1 (here: 0)
Please, note that routers count ports starting from 0, switches starting from 1.

You'll learn other contexts as we go through numerous labs and video presentations.

Abbreviations

You don't have to type in the full words of the commands and certain attributes that follow the commands. For instance, instead of typing:

Router#configure terminal
Router(config)#

You can type:

Router#conf t
Router(config)#

As long as the abbreviation uniquely describes which command you want to use, the system has no problem accepting it.

Shortcuts And Keystrokes

When you type enough of the characters that uniquely identify the command in a given context you can use 'tab' key and the system is going to complete the command on the screen for you (just like in Linux).

I often use the following keystrokes while editing the commands:

  • CTRL-z - takes the cursor back to the 'enabled exec' mode from any other context
  • CTRL-a - takes the cursor to the beginning of the line
  • CTRL-e - takes the cursor to the end of the line
  • CTRL-k - erases everything to the right of the cursor
  • CTRL-u - erases everything to the left of the cursor
  • Upper Arrow or CTRL-P - displays previous command from the history buffer
  • Lower Arrow or CTRL-N - displays next command from the history buffer
System keeps the record of up to ten (default) commands you typed in. You can increase/decrease the history buffer up to 256 commands.

If you want to check the history buffer size, type in:

Router#show terminal | include history

Changing the buffer size can be accomplished with the following command in the 'enabled mode'

Router#terminal history size 256

The above command  will increase the size of the history buffer to 256 commands.

If you want to see the buffer (which commands were typed) use this command:

Router#show history




*Next lesson is going to be about creating an initial configuration of our router and/or switch.

Thursday, August 30, 2012

Chapter 1 - Connecting to Cisco Console Port with MINICOM



If you are a linux user user you must learn how to connect to your Cisco router or switch using roll-over cable (the cable that comes with your device).


Step1 - Installing Minicom


Linux users will use application called 'minicom'.  If you are Ubuntu user you can install it using either 'Synaptic Package Manager' or type in the following in your terminal window:

$ sudo apt-get install minicom

Once it is installed, you must configure the 'minicom' to communicate with the console port of your router/switch. 

Step 2 - Connection to Console Port


Power up your router/switch and connect the roll-over cable to your computer's serial port (DB-9) and to the 'console' port of your router/switch (RJ-45).

Step 3 - Configure Minicom


Open your Terminal window (Applications ==> Accessories ==> Terminal) and type in:


$ minicom -s

Scroll down to 'Serial Port Setup' and hit Enter:


Pic:1




Choose 'A' to set up the serial port of your computer (here the first serial port is referenced as ttyS0) so it reads as highlighted below. Then hit Enter again to accept the change:

Pic:2



Next, press 'E' and then 'C' again to access the transmission speed and change it to '9600' value (no apostrophies). You should see values like highlighted below:

Pic:3



Then hit Enter twice to get back to the first screen (Pic.1)

The last thing is to save this configuration (you can choose 'dfl' to be the default template or with some other name).

Pic. 4





If you chose 'dflp and then, 'Exit from Minicom', you can try out your work now. Type in:

$ minicom


and hit Enter

You should see the console prompt of your router/switch. If you want to leave the minicom use CTRL-A keystroke and then type 'x' and confirm you want to leave the application.



Wednesday, August 29, 2012

CCleaner 3.19.1721



CCleaner is a freeware system optimization, privacy and cleaning tool. It removes unused files from your system - allowing Windows to run faster and freeing up valuable hard disk space. It also cleans traces of your online activities such as your Internet history. Additionally it contains a fully featured registry cleaner. But the best part is that it's fast (normally taking less than a second to run) and contains NO Spyware or Adware! 
Cleans the following:

Internet Explorer
Firefox
Google Chrome
Opera
Safari
Windows - Recycle Bin, Recent Documents, Temporary files and Log files.
Registry cleaner
Third-party applications
100% Spyware FREE



Title: CCleaner 3.19.1721
Filename: ccsetup319.exe
File size: 3.68MB (3,862,112 bytes)
Requirements: Windows 2000 / XP / 2003 / Vista / Windows7 / XP64 / Vista64 / Windows7 64
Languages: Multiple languages
License: Freeware
Date added: May 24, 2012
Author: Piriform




====================================================

VLC Media Player 2.0.1



VLC media player is a highly portable multimedia player for various audio and video formats as well as DVDs, VCDs, and various streaming protocols without external codec or program.

It can also be used as a server to stream in unicast or multicast in IPv4 or IPv6 on a high-bandwidth network.

VLC can play:

MPEG-1, MPEG-2 and MPEG-4 / DivX files from a hard disk, a CD-ROM drive, and so on
DVDs, VCDs, and Audio CDs
From satellite cards (DVB-S)
Several types of network streams: UDP/RTP Unicast, UDP/RTP Multicast, HTTP, RTSP, MMS, etc.
From acquisition or encoding cards (on GNU/Linux and Windows only)


Title: VLC Media Player 2.0.1
Filename: vlc-2.0.1-win32.exe
File size: 21.23MB (22,259,528 bytes)
Requirements: Windows 2000 / XP / 2003 / Vista / Windows7 / XP64 / Vista64 / Windows7 64
Languages: Multiple languages
License: Open Source
Date added: March 19, 2012
Author: VideoLAN.org



Download Link:-
______________________________________
_______________
______