packet tracer

All posts tagged packet tracer

Basic configuration of a Cisco switch can be done  in three ways, using Cisco Device manager web tool, using Cisco Networking Assistant(CNA) and Cisco IOS setup mode. The first two are GUI tools and the latter is a CLI option. Since Cisco IOS plays a very important part in CCNA exam,  we are going to see how to configure a switch using Cisco IOS setup mode commands.

In this tut, we are going to configure the name of the switch, set management ip address to the switch, configure console and telnet passwords and lastly configure message of the day banner for the switch. To configure a Cisco switch using Cisco IOS, we must connect a computer to the console part of the switch using a rollover cable. For this article however, I am going to use Cisco Packet Tracer software.

bcos1

Naming the switch: 

Naming the switch can ease management and identification of the switch. Run the following commands for naming the switch. A switch can be named using “hostname” command.

bcos3

 

The first two commands allow us to access the global configuration of the switch. If you are not aware of different modes of a Cisco switch, see here. The “hostname” command renames the switch. The rest of the commands are used to exit from global configuration mode.

Configure management IP address:

Configuring management IP address to the switch allows us to connect to the switch from remote locations using either Telnet or HTTP. To configure management IP address on the switch, run the folllowing commands.

bcos4

 

The first two commands (“en” and “conf t”) set the IOS in privileged global configuration mode. This mode enables us to run commands that configure switch settings that apply to the whole switch.

The “interface vlan1″ command selects an interface to work with.  VLAN 1, is  called the management VLAN and is reserved for management of the switch.  We set IP address and the management default IP gateway on this Vlan.

“ip address 10.10.10.3 255.0.0.0” command sets the ip address and the subnet mask of the switch on interface vlan1. The no shutdown command turns on the interface vlan1. The exit command brings us back into global configuration mode from specific configuration mode.

The “ip default-gateway 10.10.10.1″ command sets the default gateway of the switch to 10.10.10.1 . We can see that we first exit from the interface configuration mode ((config-if)# exit) because the default gateway applies to the whole switch, not just to an interface.

Configuring Console password:

To set up a console password on the switch, run the following commands.

bcos5

 

The “line console 0″ command selects the console line. There is only one console line on a cisco switch. The “password 123456″ command sets the password of the console line to 123456. The “login” command instructs the IOS to prompt for authentication when somebody logs into console line.

Configuring telnet password:

To configure telnet password on the switch, run the following commands.

bcos6

 

The “line vty 0 ?” command shows the number of vty lines available on the switch. The response <1-15>  shows that 15 VTY lines are available, which means we can have 15 simultaneous sessions on this switch.  We will configure telnet password on line 1. The “line vty 1″ command selects the line 1. The “password telnet” command sets the telnet password of the line to telnet. The “login” command instructs the IOS to prompt for authentication.

Configuring banners:

Banners can be used to display a brief message about the switch when someone logs in. It helps identifying the switch we log into and its configuration and usage guidelines. We can also add a security warning in the banner message to warn users against unauthorized access to the switch. We should run the following commands to configure banners on the switch.

bcos7

 

We will configure message of the day on the switch. The “banner motd -“ command ( note that there is a space between motd and – ) is used to configure the message of the day banner on the switch. When we run this command, it prompts us to enter the message whcich should be ended by .

This is the basic configuration of he switch. Hope this was hepful.

Understanding subnetting is very important not only for those preparing for CCNA exam but also network administrators. Today, I am going to teach you how to create a subnet in a network. For this, I will use Packet Tracer software. To know what is subnetting and why we need it go here. So let’s start.

Imagine I formed a small software company named shunya whose network looks like below. I hired one Java developer, one software tester, one HR and one network administrator. I have been assigned the IP address range from 192.168.10.1 to 192.168.10.255.

subnet1

 

I have enabled DHCP on my router as below.

subnet2

 

subnet3

After one year, imagine my company has received Abrahamic blessings from GOD and has seen rapid growth. Now the company has three Java developers, three software testers and  a dedicated HR team. Not only that, my company now has moved into Remote Infrastructure Management(RIM) and has a Network Operation Center(NOC) and Security Operation Center(SOC).  Total I have 15 computers in my network which looks like below.

subnet4

 

Now see the image below. Here the machine “JD1″ sends a packet to machine “Testing3″. We can see here that for communication between machines “JD1: and “Testing3″ other machines have also been disturbed.

subnet5

 

So for this reason, I decided to subnet the network. I decide to divide the network into three subnets as shown below.

subnet6

 

To create a subnet, first we need to have proper planning as to how many subnets we need and how many we may need in the future. Presently, I need three subnets. The number of subnets should always be calcutated in the powers of 2.

2 to the power of 1 = 2

This doesn’t satisfy our requirement as we need three subnets.

2 to the power of 2 = 4

This satisfies our requirement. So we need to take two bits from the host portion of the IP address. 192.168.10.1 to 192.168.10.255 is the address range available to us with subnet mask 255.255.255.0,  Writing the subnet mask in the binary notation, it is

11111111 11111111 11111111 00000000

 255            255          255             0  

The first 24 bits are network bits and the last eight bits are host bits. To create three subnets, we need to take two bits from the host portion of the address as explained above.

11111111 111111111 11111111 11000000

   255              255            255         192

Four subnets which can be created from the above subnet mask are,

192.168.10.0 to 192.168.10.63 ( with host bits 00000000 )

192.168.10.64 to 192.168.10.127 ( with host bits 01000000 )

192.168.10.128 to 192.168.10.191 ( with host bits 10000000 )

192.168.10.192 to 192.168.10.255 ( with host bits 11000000 )

Since we require only three subnets, we will create the first three subnets. The first subnet ( 192.168.10.1 to 192.168.10.63 ) comprises of Java Developers and Software testers. The commands are as below on the interface.

subnet7

 

If you go to any machine on this subnet and look at its IP address, it will be like below.

subnet8

Now the subnet for the Human Resource Department ( 192.168.10.128 to 192.168.10.191 ) . This will be like below.

subnet9

 

 

subnet10

 

The third subnet ( 192.168.10.64 to 192.168.10.127 ) comprises of NOC and SOC.

subnet11

 

 

subnet12

 

 

Now our network has been successfully subnetted into three subnets and we still have another subnet to use for future use.

subnet13

 

 

Hope this was helpful. If you have any doubts regarding this article please comment below. Thank you.

 

Cisco IOS is the internetwork operating system of both the Cisco switches and routers. It has two interfaces command line interface(CLI) and Graphical User Interface(GUI). Since CCNA exam will surely test your knowledge on these interfaces, it is important to get familiar with them.

Cisco’s IOS command-line interface (CLI) is a text-based interface integrated with the IOS. When a switch or router boots up, the IOS loads the startup configuration from NVRAM and displays the IOS prompt, waiting for commands. We can enter the IOS commands at the IOS prompt.

In this article, we will see various command line modes on Cisco routers and switches. For this, we are going to use Packet Tracer. To see what is Packet Tracer and how to install it in both Linux and Windows, go here. For a startup guide on Packet Tracer, see here. Open Packet Tracer  and select a Cisco 2960 switch.

cclm1

 

Hover on the switch to see its ports.

cclm2

Select a Computer from the End Devices and connect them with a Console wire. What we are simulating here is connecting to the switch from a PC through console.

cclm3

 

Click on the Host device( Computer ). On the window that opens, click on Desktop tab and Click on Terminal.

cclm4

The console opens with the switch booting. Switch finishes its booting operation and loads  into user EXEC mode.

cclm5

Coming to the modes of Cisco IOS, the Cisco IOS has five command line modes.

  • Setup mode
  • User EXEC mode
  • Privileged EXEC mode
  • Global configuration mode
  • Specific Configuraton mode

Setup mode

Setup mode is the initial configuration mode of Cisco switches and routers. They start in setup mode when no startup configuration exists in NVRAM. After completion of the setup mode,  the Cisco IOS transitions to user EXEC mode.

User EXEC mode

The user EXEC mode is the normal operation mode on Cisco switches and routers. The Cisco IOS user EXEC prompt is the switch or router name followed by the ‘greater than’ character >. See all the commands available in user EXEC prompt by typing ‘?’

cclm6

 

Privileged EXEC mode

Privileged EXEC mode is the advanced operation mode of Cisco IOS. It has been designed to restrict access to IOS commands that can have adverse effects on the Cisco device and its configuration. To enter privileged EXEC mode type “enable” or “en” .Privileged EXEC prompt is comprised of the switch or router name followed by the # character. To exit the privileged EXEC prompt type “disable”.

cclm7

 

To see the commands available in privileged EXEC prompt, type ?.

cclm8

 

Global Configuration mode

The global configuration mode is comprised of commands pertaining to the entire Cisco device. In other words, if we need to execute commands to modify the behavior of either the whole switch or the whole router we need to set the IOS in global configuration
mode. Global configuration mode can only be enabled from  privileged
EXEC mode by typing config t” or “conf t”. The prompt in this mode is comprised of the device name followed by “(config)#”.

cclm9

 

See the commands available in this mode by typing ‘?’. If we need to execute a command not available in the global configuration mode we should prefix the command by “do”.

cclm10

 

Specific configuration mode

The specific configuration mode is used for commands that affect the configuration of either just one part or range of components of the Cisco device. Suppose we want to work on a few interfaces (or ports) on our switch or router we need to enable specific configuration mode. We can enable specific configuration mode only from the global configuration mode by selecting the components we want to work with. The prompt in this mode is comprised of the router or switch host name followed by “(config-<component>)#”.

Let’s select interface fastethernet 0/1 by typing “interface fastethernet 0/1″. 

cclm11

If we want to run a command not available in specific configuration mode prefix the command by do”. For example, run the command “do show running-config” in specific configuration mode.

cclm12

 

We can exit from global configuration mode and specific configuration mode by typing “exit”.


There are a few tuts available for Packet tracer on internet but I have made this guide keeping absolute beginners in mind and when I say absolute beginners, I mean really absolute beginners. In this guide we are going to create a star topology  and see the difference between hub and a switch.

To those people who don’t know what Packet Tracer is, it is a software developed by Cisco that can simulate networks and can be really helpful for people preparing for CCNA. See How to install Packet Tracer in Windows and Linux.

So Let’s start our tutorial. Open Packet Tracer. On the lower left corner, there are components required for creating a network. There are routers, switches, End devices, Hubs, Wireless Devices, Connections etc.

ptsgb1

 

Click on “Hubs”. To the right, you should see types of hubs displayed. Click on the first type ‘Generic‘, move your mouse to the workspace above and click on the point you want to place your hub.

ptsgb2

Click on the hub we just placed in our workspace. You are shown the physical view of the hub and it is a physical view literally. You can even see the Power button of the hub.

ptsgb3

 

Click on the Config” tab just beside the “Physical” tab. You are shown the global settings of the hub. You can change the display name of the hub hers. Change it from “Hub0″ to “Hub”. Then close it.

ptsgb4

 

Now we are going to place five computers around the hub to form Hub and Spoke topology. From the components on the lower left corner click on “End devices”. From the options displayed, click on the first choice called “Generic” hold “CTRL” key and click on the workspace at five points around the hub where you want to place your computers. This is a shortcut to place many devices.

ptsgb5

 

Click on any PC”. You should see something similar to “CPU”. This is the physical view of the PC. We can even see the Power button.

ptsgb6

 

Click on the “Config” tab beside “Physical” tab. On the global settings, change the name of the PC to “PC 1″. On gateway/DNS select “DHCP”. We will set up a DHCP server to assign IP addresses to the PC’s. You can have a look at other tabs beside “Config” tab.

ptsgb7

 

Perform this action for other PC’s also and name them differently. Then from “End Devices” select “Server” and place it on the workspace as below.

ptsgb8

 

Click on “Server”. Go to “Config” tab. We can see the services which can be configured on our servers HTTP, DHCP etc etc.

ptsgb9

 

Click on “DHCP”. Keep the Pool name, default gateway and DNS server same. Give “starting IP address” as “192.168.0.1″ and “subnet mask” as “255.255.255.0″. Turn on DHCP service if it is OFF. Click on “Save”.

ptsgb10

 

Click on the interface “FastEthernet” to the left. Set IP configuration as static and give “IP address” as 192.168.0.1 and “subnet mask” as “255.255.255.0″. Close the window.

ptsgb11

 

Now we are going to connect our devices. In the components to the lower left corner, Click on “Connections”.

ptsgb12

 

Different types of cabling are displayed. Here’s where Packet tracer assists in our learning abilities. If you are not sure what type of wiring to use, click on the first choice automatic. Then on the workspace, click on Server” and then click on the “Hub”. A connection is established. If the connection end points are red, then there is some problem with your wiring. If end points show green, then your wiring is alright.( We learn that we have to use copper straigtht through cabling in Star Topology.)

ptsgb13

 

Do the same for all connections.

ptsgb14

 

After some time, IP addresses are assigned to all systems by the DHCP server. Hover the mouse over the systems to check if IP addresses are assigned or not.

ptsgb15

 

Now let’s see the functioning of the hub. Click on “Simulation” beside “Realtime” as shown below.

ptsgb16

 

The Event List window will open. Click on “Edit Filters”. We will see various protocols.

ptsgb17

 

Deselect “Show All/None” option. All options are deselected. Then Select ICMP option. What we are doing is trying to ping the machine.

ptsgb18

 

Close the Event List window.

ptsgb19

 

Click on “Add Simple PDU” as shown below. When we move the mouse on the workspace we can see a white envelope moving along with the mouse.

ptsgb20

 

First click on the sending device( Click on “PC0″ ). Then select the receiving device( Click on the “Server” ). It should be clear to you that we are pinging the server from PC0. Our screen would like this.

ptsgb21

 

We will now see how packets travel from PC0 to the Server. Click on “Capture/Forward” as shown below.

ptsgb22

 

Click on “Capture/Forward” again. The ping travels from PC0 to the hub.

ptsgb23

 

Click on “Capture/Forward” again. The hub forwards  the frame on all the ports, except the port through which the frame came in. All hosts except Server discard the frame since it is not addressed to them.

ptsgb24

 

Click on “Capture/Forward”. The server forwards a frame to the hub.

ptsgb25

 

Click on “Capture/Forward”. The hub once again forwards the frame on all ports except the input port. All hosts except PC0 discard it since it is not addressed to them. The simulation success message is shown as below.

ptsgb26

 

To see the list of complete events undergone in this communication, Click on “Event List” as shown below.

ptsgb27

 

As already seen Hubs forward a frame they receive on all the outbound ports except the port through which it received the frame. When connected using hubs, the host devices share same bandwidth of the medium. Since they share the same bandwidth, hosts can send frames at the same time on the medium which can result in collisions. In order to prevent frame collisions, Ethernet uses “Carrier Sense Multiple Access/Collision detect(CSMA?CD)”. Of course this prevents collisions but it still consumes a lot of bandwidth. The only solution is to this problem is to make the collision domain as small as possible.

Let’s see how.

Click on “Delete” as shown below.

ptsgb28

 

Click on the hub. This will delete the hub and also the connections.

ptsgb29

 

Replace it with a “2960″ switch and make the connections in the same way as done previously.

ptsgb30

 

Add a simple ICMP PDU as done previously.

ptsgb31

 

Click on “Capture/Forward”. The first frame travels to the switch.

ptsgb32

 

Click on “Capture/Forward” again. The switch forwards the frame only to the Server, it’s intended destination.

ptsgb33

 

Subsequently the frame is forwarded to switch which forwards it to PC0 thus completing the communication.

ptsgb34

 

Now How does this happen?

This happens because a switch creates only one collision domain per port forwarding frames only on the outbound port that reaches the destionation of the frame. Since the hosts work in their own isolated collision domain, frames will never collide thus solving the problem of collisons.

Cisco Certified Network Associate certification has become must for anybody who wishes to start  a career in networking. This certification validates that you have the ability to install,configure and troubleshoot a network. You need  lot of practice for achieving success in this exam. Apart from the labs where you are getting trained for CCNA what if you had a chance to practice at home. Or what if you want to self learn for CCNA? Well for both of the questions above, Cisco Packet Tracer is the perfect answer. To quote from Cisco’s official website,Packet tracer is

“a powerful network simulation program that allows students to experiment with network behavior and ask “what if” questions.”

It further says,

“The simulation-based learning environment helps students develop 21st century skills such as decision making, creative and critical thinking, and problem solving. Packet Tracer complements the Networking Academy curricula, allowing instructors to easily teach and demonstrate complex technical concepts and networking systems design.”

Nothing could have defined that better. This software is available for free from Cisco’s website provided you are a registered Networking Academy student, alumni, instructor, or administrator. Even if you are not one among the above you could still get hold of this software,just google it.

Now I’m gonna show you how to install packet tracer in Windows and Linux.

1.Windows

Any installation in Windows is just clicks and mouse and the same applies to Packet tracer. Click on the exe file downloaded. The below screen appears.Select “I accept the agreement” and click on “Next”.

pt1

Setup will show the folder in which the program’s shortcuts will be created. If you want to change the folder, you can change it. Click on “Next”.

pt2

 

Then the program will ask whether to create a Desktop icon and create a Quick Launch icon. Make your own choice and click on “Next”.

pt3

 

Then the summary of the settings we selected is displayed. Click on “Install”.

pt4

The installation starts as shown below.

pt5

 

In seconds,installation gets completed and the below screen is shown.Click on “Finish”.

pt6

 

Then the below popup appears asking you to close or restart your computer. Click on “OK”.

pt7

As we selected Launch option, Packet tracer is automatically launched.

pt8

2. Linux

To install Packet Tracer in Linux, we need a .deb package of Packet tracer which can be downloaded from here. Now I am going to install it in Ubuntu Precise Pangolin (12.04). Download the above file to the desktop.

pt9

 

Start the terminal and see your current working directory by typing “pwd”. If the current directory is not desktop move to the Desktop directory using “cd”. After reaching the Desktop directory, type “ls” to see if the packet tracer binary is there.

pt10

 

Left click on the packet tracer .bin file displayed after typing “ls” above,the entire word will be selected. Then right click and select copy. Now type “chmod +x” and then hit “CTRL+SHIFT+V “to paste the text we copied above. Our command should look like this.

                       chmod +x  PacketTracer533_i386_installer-deb.bin

What chmod +x command does is that it gives all users permission to execute.

pt11

 

Then type “./PacketTracer533_i386_installer-deb.bin” in the terminal.This will start extracting the binary package.

pt12

 

Then terminal prompts us to hit Enter to read the End User License Agreement.Hit Enter.

pt13

 

After displaying a rather long EULA, terminal asks us if we accept the terms of EULA. Type “Y”.

pt14

 

Then system asks us for the sudo password.Type the password and hit Enter.

pt15

 

When the installation is finished, close the terminal,go to Dashboard, if packet tracer is not seen,type ‘pac’ in the search box. When Packet Tracer is shown, click on it.

pt16

 

A messagebox shows up saying that we are starting packet tracer for the first time and our files will be stored in a specific folder. Click on “OK”.

pt17

 

Another message box pops up.Click on OK”.

pt18

 

Packet tracer is started.

pt19