Top Banner
Ramapuram campus Chennai- 600089 December 2016 Faculty of Science and Humanities Department of Computer Applications UCA15403 - COMPUTER NETWORKS LAB LAB MANUAL For U.G. Degree Programme Batch (2015– 2018) (4th Semester) 1
40

krishnamoorthymca99.files.wordpress.com · Web viewCisco router configuration commands are explained in packet tracer. Cisco router is a device that switches data packets between

Jan 21, 2021

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: krishnamoorthymca99.files.wordpress.com · Web viewCisco router configuration commands are explained in packet tracer. Cisco router is a device that switches data packets between

Ramapuram campus Chennai-600089

December 2016

Faculty of Science and Humanities

Department of Computer Applications

UCA15403 - COMPUTER NETWORKS LAB

LAB MANUAL

For U.G. Degree Programme

Batch (2015– 2018) (4th Semester)

Prepared By Approved By

1

Page 2: krishnamoorthymca99.files.wordpress.com · Web viewCisco router configuration commands are explained in packet tracer. Cisco router is a device that switches data packets between

1. Familiarization with configuring and installing a LAN

2. Experimenting with network protocols for achieving communication between

computers

Packet Tracer – Creating a New TopologyWhat is Packet Tracer? Packet Tracer is a protocol simulator developed by Dennis Frezzo and his team at Cisco Systems. Packet Tracer (PT) is a powerful and dynamic tool that displays the various protocols used in networking, in either Real Time or Simulation mode. This includes layer 2 protocols such as Ethernet and PPP, layer 3 protocols such as IP, ICMP, and ARP, and layer 4 protocols such as TCP and UDP. Routing protocols can also be traced.

Purpose: The purpose of this lab is to become familiar with building topologies in Packet Tracer.

Requisite knowledge: This lab assumes some understanding of the Ethernet protocol. At this point we have not discussed other protocols, but will use Packet Tracer in later labs to discuss those as well.

Version: This lab is based on Packet Tracer 5.0.

Step 1: Start Packet Tracer

2

Page 3: krishnamoorthymca99.files.wordpress.com · Web viewCisco router configuration commands are explained in packet tracer. Cisco router is a device that switches data packets between

Step 2: Choosing Devices and Connections

We will begin building our network topology by selecting devices and the media in which to connect them. Several types of devices and network connections can be used. For this lab we will keep it simple by using End Devices, Switches, Hubs, and Connections.

Single click on each group of devices and connections to display the various choices. The devices you see may differ slightly.

3

Page 4: krishnamoorthymca99.files.wordpress.com · Web viewCisco router configuration commands are explained in packet tracer. Cisco router is a device that switches data packets between

Step 3: Building the Topology – Adding Hosts

Single click on the End Devices.

Single click on the Generic host.

Move the cursor into topology area. You will notice it turns into a plus “+” sign.

Single click in the topology area and it copies the device.

Add three more hosts.

4

Page 5: krishnamoorthymca99.files.wordpress.com · Web viewCisco router configuration commands are explained in packet tracer. Cisco router is a device that switches data packets between

Step 4: Building the Topology – Connecting the Hosts to Hubs and Switches

Adding a Hub

Select a hub, by clicking once on Hubs and once on a Generic hub.

Add the hub by moving the plus sign “+” below PC0 and PC1 and click once.

Connect PC0 to Hub0 by first choosing Connections.

Click once on the Copper Straight-through cable.

5

Page 6: krishnamoorthymca99.files.wordpress.com · Web viewCisco router configuration commands are explained in packet tracer. Cisco router is a device that switches data packets between

Perform the following steps to connect PC0 to Hub0:1. Click once on PC02. Choose FastEthernet3. Drag the cursor to Hub04. Click once on Hub0 and choose Port 05. Notice the green link lights on both the PC0 Ethernet NIC and the Hub0 Port 0 showing that the link

is active.

1 2 3 4 5

Repeat the steps above for PC1 connecting it to Port 1 on Hub0. (The actual hub port you choose does not matter.)

6

Page 7: krishnamoorthymca99.files.wordpress.com · Web viewCisco router configuration commands are explained in packet tracer. Cisco router is a device that switches data packets between

Adding a Switch

Select a switch, by clicking once on Switches and once on a 2950-24 switch.

Add the switch by moving the plus sign “+” below PC2 and PC3 and click once.

Connect PC2 to Hub0 by first choosing Connections.

Click once on the Copper Straight-through cable.

7

Page 8: krishnamoorthymca99.files.wordpress.com · Web viewCisco router configuration commands are explained in packet tracer. Cisco router is a device that switches data packets between

Perform the following steps to connect PC2 to Switch0:1. Click once on PC22. Choose FastEthernet3. Drag the cursor to Switch04. Click once on Switch0 and choose FastEthernet0/15. Notice the green link lights on PC2 Ethernet NIC and amber light Switch0 FastEthernet0/1 port.

The switch port is temporarily not forwarding frames, while it goes through the stages for the Spanning Tree Protocol (STP) process.

6. After a about 30 seconds the amber light will change to green indicating that the port has entered the forwarding stage. Frames can now forwarded out the switch port.

Note: Spanning Tree Protocol (STP) is discussed later.

1 2 3 4 5 6

Repeat the steps above for PC3 connecting it to Port 3 on Switch0 on port FastEtherent0/2. (The actual switch port you choose does not matter.)

Move the cursor over the link light to view the port number. Fa means FastEthernet, 100 Mbps Ethernet.

8

Page 9: krishnamoorthymca99.files.wordpress.com · Web viewCisco router configuration commands are explained in packet tracer. Cisco router is a device that switches data packets between

Step 5: Configuring IP Addresses and Subnet Masks on the Hosts

Before we can communicate between the hosts we need to configure IP Addresses and Subnet Masks on the devices.

Click once on PC0.

Choose the Config tab and click on Settings. It is here that you can change the name of PC0. It is also here where you would enter a Gateway IP Address, also known as the default gateway and the DNS Server IP Address. We will discuss this later, but this would be the IP address of the local router. If you want, you can enter the Gateway IP Address 172.16.1.1 and DNS Server IP Address 172.16.1.100, although it will not be used in this lab.

9

Page 10: krishnamoorthymca99.files.wordpress.com · Web viewCisco router configuration commands are explained in packet tracer. Cisco router is a device that switches data packets between

Click on Interface and then FastEthernet. Although we have not yet discussed IP Addresses, add the IP Address to 172.16.1.10. Click once in the Subnet Mask field to enter the default Subnet Mask. You can leave this at 255.255.0.0. We will discuss this later.

Also, notice this is where you can change the Bandwidth (speed) and Duplex of the Ethernet NIC (Network Interface Card). The default is Auto (autonegotiation), which means the NIC will negotiate with the hub or switch. The bandwidth and/or duplex can be manually set by removing the check from the Auto box and choosing the specific option.

Bandwidth - Auto

If the host is connected to a hub or switch port which can do 100 Mbps, then the Ethernet NIC on the host will choose 100 Mbps (Fast Ethernet). Otherwise, if the hub or switch port can only do 10 Mbps, then the Ethernet NIC on the host will choose 10 Mbps (Ethernet).

Duplex - Auto

Hub: If the host is connected to a hub, then the Ethernet NIC on the host will choose Half Duplex.

Switch: If the host is connected to a switch, and the switch port is configured as Full Duplex (or Autonegotiation), then the Ethernet NIC on the host will choose Full Duplex. If the switch port is configured as Half Duplex, then the Ethernet NIC on the host will choose Half Duplex. (Full Duplex is a much more efficient option.)

The information is automatically saved when entered.

10

Page 11: krishnamoorthymca99.files.wordpress.com · Web viewCisco router configuration commands are explained in packet tracer. Cisco router is a device that switches data packets between

To close this dialog box, click the “X” in the upper right.

Repeat these steps for the other hosts. Use the information below for IP Addresses and Subnet Masks.

Host IP Address Subnet MaskPC0 172.16.1.10 255.255.0.0PC1 172.16.1.11 255.255.0.0PC2 172.16.1.12 255.255.0.0PC3 172.16.1.13 255.255.0.0

Verify the information

To verify the information that you entered, move the Select tool (arrow) over each host.

Deleting a Device or Link

To delete a device or link, choose the Delete tool and click on the item you wish to delete.

11

Page 12: krishnamoorthymca99.files.wordpress.com · Web viewCisco router configuration commands are explained in packet tracer. Cisco router is a device that switches data packets between

Step 6: Connecting Hub0 to Switch0

To connect like-devices, like a Hub and a Switch, we will use a Cross-over cable. Click once the Cross-over Cable from the Connections options.

Move the Connections cursor over Hub0 and click once.

Select Port 5 (actual port does not matter).

12

Page 13: krishnamoorthymca99.files.wordpress.com · Web viewCisco router configuration commands are explained in packet tracer. Cisco router is a device that switches data packets between

Move the Connections cursor to Switch0.

Click once on Switch0 and choose FastEthernet0/4 (actual port does not matter).

The link light for switch port FastEthernet0/4 will begin as amber and eventually change to green as the Spanning Tree Protocol transitions the port to forwarding.

13

Page 14: krishnamoorthymca99.files.wordpress.com · Web viewCisco router configuration commands are explained in packet tracer. Cisco router is a device that switches data packets between

Step 7: Verifying Connectivity in Realtime Mode

Be sure you are in Realtime mode.

Select the Add Simple PDU tool used to ping devices..

Click once on PC0, then once on PC3.

The PDU Last Status should show as Successful.

14

Page 15: krishnamoorthymca99.files.wordpress.com · Web viewCisco router configuration commands are explained in packet tracer. Cisco router is a device that switches data packets between

Resetting the Network

At this point we will want to reset the network, Whenever you want to reset the network and begin the simulation again, perform the following tasks:

Click Delete in the PDU area.

Now, Power Cycle Devices and confirm the action.

Waiting for Spanning Tree Protocol (STP)

Note: Because Packet Tracer also simulates the Spanning Tree Protocol (later), at times the switch may show amber lights on its interfaces. You will need to wait for the lights to turn green on the switches before they will forward any Ethernet frames.

15

Page 16: krishnamoorthymca99.files.wordpress.com · Web viewCisco router configuration commands are explained in packet tracer. Cisco router is a device that switches data packets between

Step 8: Verifying Connectivity in Simulation Mode

Be sure you are in Simulation mode.

Deselect all filters (All/None) and select only ICMP.

16

1

2

3

Page 17: krishnamoorthymca99.files.wordpress.com · Web viewCisco router configuration commands are explained in packet tracer. Cisco router is a device that switches data packets between

Select the Add Simple PDU tool used to ping devices..

Click once on PC0, then once on PC3.

Continue clicking Capture/Forward button until the ICMP ping is completed. You should see the ICMP messages move between the hosts, hub and switch. The PDU Last Status should show as Successful. Click on Clear Event List if you do not want to look at the events or click Preview Previous Events if you do. For this exercise it does not matter.

17

Page 18: krishnamoorthymca99.files.wordpress.com · Web viewCisco router configuration commands are explained in packet tracer. Cisco router is a device that switches data packets between

Step 9: Saving the Topology

Perform the following steps to save the topology (uses .pkt file extension).

18

Page 19: krishnamoorthymca99.files.wordpress.com · Web viewCisco router configuration commands are explained in packet tracer. Cisco router is a device that switches data packets between

Opening Existing Topologies

Opening Existing PT Topologies

19

Page 20: krishnamoorthymca99.files.wordpress.com · Web viewCisco router configuration commands are explained in packet tracer. Cisco router is a device that switches data packets between

3. Interconnection software for communication between two different network architectures

Configure Cisco Router Step by Step Guide

This tutorial explains how to configure Cisco router step by step. Cisco router configuration commands are explained in packet tracer.

Cisco router is a device that switches data packets between two different networks. By default two different IP network cannot communicate with each other. They need a mediator device that exchanges their packets. Routers do this job successfully by taking packet from one network and delivering it to another network. This process is called routing.

We need to perform some initial configurations on router before it can be used for routing. In this article we will explain these configurations.

We will use Packet Tracer network simulator software for demonstration. Beside Packet Tracer You can also use any other network simulator software such as Boson, GNS or even better if you can afford, use a real Cisco device. No matter what option you choose, till this uses Cisco IOS output will be same.

Create a network topology as illustrate in following figure

We have created this topology to give you a better overview of commands. You can use single router if you are unable to replicate this topology in packet tracer. Alternatively you can download this pre-created topology.

Download practice topology

No matter what you prefer, for reset of this article I assume that you have one router available in workspace.

Access CLI prompt of router

Cisco IOS supports various command modes, among those followings are the main command modes.

20

Page 21: krishnamoorthymca99.files.wordpress.com · Web viewCisco router configuration commands are explained in packet tracer. Cisco router is a device that switches data packets between

User EXEC Mode Privileged EXEC Mode Global Configuration Mode Interface Configuration Mode Sub Interface Configuration Mode Setup Mode ROM Monitor Mode

You need to execute specific commands to navigate from one mode to another.

Mode Prompt Command to enter Command to exit

User EXEC Router >Default mode after booting. Login with password, if configured.

Use exit command

Privileged EXEC Router # Use enable command from user

exec mode Use exit command

Global Configuration Router(config)#

Use configure terminal command from privileged exec mode

Use exit command

Interface Configuration Router(config-if)#

Use interface type number command from global configuration mode

Use exit command to return in global configuration mode

Sub-Interface Configuration Router(config-subif)

Use interface type sub interface number command from global configuration mode or interface configure mode

Use exit to return previous mode. Use end command to return in privileged exec mode.

Setup Parameter[Parameter value]:

Router will automatically insert in this mode if running configuration is not present

Press CTRL+C to abort. Type yes to save configuration, or no to exit without saving when asked in the end of setup.

ROMMON ROMMON >

Enter reload command from privileged exec mode. Press CTRL + C key combination during the first 60 seconds of booting process

Use exit command.

IOS commands are not case sensitive; you can enter them in uppercase, lowercase, or mixed case.

Password is case sensitive. Make sure you type it in correct case. In any mode, you can obtain a list of commands available on that mode by

entering a question mark (?). Standard order of accessing mode is

User Exec mode => Privileged Exec mode => Global Configuration mode => Interface Configuration mode => Sub Interface Configuration mode

21

Page 22: krishnamoorthymca99.files.wordpress.com · Web viewCisco router configuration commands are explained in packet tracer. Cisco router is a device that switches data packets between

Router will enter in setup mode only if it fails to load a valid running configuration.

Router will enter in ROMMON mode only if it fails to load a valid IOS image file.

You can manually enter in ROMMON mode for diagnostics purpose.

Enter in global configuration mode to execute following commands.

Change default router name

By default Router name is configured on routers. We can configure any desired name on router. hostname command will change the name of router. For example following command will assign LAB1 name to the router.

Configure password on cisco router

Router is a critical device of network. It supports multiple lines for connection. We need to secure each line [port].

Secure console port

Command DescriptionRouter(config)#line console 0 Move in console line modeRouter(config-line)#password console Set console line password to CNNRouter(config-line)#login Enable password authentication for console line

Secure auxiliary port

Auxiliary port provides remote access to router. You can attach modem in this port. Not all devices support this port. If your router supports this port use following commands to secure it.

Command Description

22

Page 23: krishnamoorthymca99.files.wordpress.com · Web viewCisco router configuration commands are explained in packet tracer. Cisco router is a device that switches data packets between

Router(config)#line aux 0 Move into auxiliary line modeRouter(config-line)#password AUXCNN Set auxiliary line mode password to AUXCNNRouter(config-line)#login Enable auxiliary line mode password

Assign hostname to IP Address

Hostname are easy to remember. We can use host name instead of their IP address while connecting with remote address. Router resolves IP address to hostname in two ways: static and dynamic.

In static method we have to assign hostname to IP address.

In dynamic method we have to configure an external DNS server and need to configure its IP address on router.

show hosts command will display the currently configured hosts with their IP addresses. Following figure illustrate an example of static entry for hostname.

Enable logging synchronous

Whenever IOS has any kind of notification, it will display that on command prompt. It fines until prompt is free. What if you are typing a command and notification line appears in the middle of the command? This is really annoying. Luckily we can stop this behavior. logging synchronous command will enable synchronization at command prompt.

After this if IOS has anything to display it will move prompt and your typed command in next line. Notification will not insert in the middle of command. If you continue typing, the command will execute properly, even though it looks wrong at prompt.

Never use this command in real world. It could create security risk to your network.

Configure FastEthernet Interface in router

Usually FastEthernet connects local network with router. Following commands will configure FastEhternet 0/0 interface.

23

Page 24: krishnamoorthymca99.files.wordpress.com · Web viewCisco router configuration commands are explained in packet tracer. Cisco router is a device that switches data packets between

Command DescriptionRouter(config)#interface fastethernet 0/0 Enter into the FastEthernet 0/0 interface.Router(config-if)#description Development department

This command is optional. It will set description on interface.

Router(config-if)#ip address 192.168.0.1 255.255.255.0 Assigns address and subnet mask to interface

Router(config-if)#no shutdown Turns interface on. All interfaces are set to off on startup.

Disable router interface

By default all interface are administratively down on startup. We should also follow this rule.

For security reason, we should always disable unused interface on router. shutdown command is used to disable the interface.

Saving running configuration in cisco router

Router keeps configuration in RAM. All settings that we have made in this article will erase once the router reboot. To preserve this configuration after reboot we must have to save this. Following command will save running configuration in NVRAM.

24

Page 25: krishnamoorthymca99.files.wordpress.com · Web viewCisco router configuration commands are explained in packet tracer. Cisco router is a device that switches data packets between

4. Experiments using POP, e-mail

25

Page 26: krishnamoorthymca99.files.wordpress.com · Web viewCisco router configuration commands are explained in packet tracer. Cisco router is a device that switches data packets between

Double click on router and select CLI (Command Line Interface) to configure

26

Page 27: krishnamoorthymca99.files.wordpress.com · Web viewCisco router configuration commands are explained in packet tracer. Cisco router is a device that switches data packets between

Continue previous step

Close CLI

27

Page 28: krishnamoorthymca99.files.wordpress.com · Web viewCisco router configuration commands are explained in packet tracer. Cisco router is a device that switches data packets between

Select server to configure

Select http and select off radio button

28

Page 29: krishnamoorthymca99.files.wordpress.com · Web viewCisco router configuration commands are explained in packet tracer. Cisco router is a device that switches data packets between

Select DHCP services to configure

29