+ All Categories
Home > Documents > Csc261 Ccn Lab Manual

Csc261 Ccn Lab Manual

Date post: 27-Oct-2015
Category:
Upload: asadhppy
View: 33 times
Download: 1 times
Share this document with a friend
Description:
Computer Communication and Networks Lab Manual
Popular Tags:
125
Computer Communication Network TCL261 List of Experiments Lab Number Name Lab # 1 Introduction to network Lab # 2 Building a Network Lab # 3 Capturing traffic through wire shark Lab # 4 Ethernet Lab # 5 Token Ring Lab # 6 Switch Vs Hub Lab # 7 Internet basics Lab # 8 Network design Lab # 9 Evaluate firewall policies to manage traffic Lab # 10 Firewall and VPN Lab # 11 Routing Information Protocol Lab # 12 Open Shortest Path First Lab # 13 Asynchronous Transfer Mode Lab # 14 Router IOS Basics LAB # 15 Project -A Lab # 16 Project -B
Transcript
Page 1: Csc261 Ccn Lab Manual

Computer Communication Network TCL261

List of Experiments

Lab Number Name

Lab # 1 Introduction to network

Lab # 2 Building a Network

Lab # 3 Capturing traffic through wire shark

Lab # 4 Ethernet

Lab # 5 Token Ring

Lab # 6 Switch Vs Hub

Lab # 7 Internet basics

Lab # 8 Network design

Lab # 9 Evaluate firewall policies to manage traffic

Lab # 10 Firewall and VPN

Lab # 11 Routing Information Protocol

Lab # 12 Open Shortest Path First

Lab # 13 Asynchronous Transfer Mode

Lab # 14 Router IOS Basics

LAB # 15 Project -A

Lab # 16 Project -B

Page 2: Csc261 Ccn Lab Manual

LAB - 1

INTRODUCTION TO INTERNET

Objective: The purpose of this session is to gather network information (IP address, MAC

Address etc), learn to use the TCP/IP Packet Internet Groper (ping) command,

and learn to use the Traceroute command from the workstation. You will also be

able to observe name resolution occurrences using DNS servers.

Overview: An IP address is a unique network layer numbering system that end systems

use in order to identify and communicate with each other. It is a dotted decimal

notation with four numbers ranging from 0 to 255 separated by periods. The

numbers currently used in IP addresses range from 1.0.0.0 to 255. 255. 255.

255, though some of these values are reserved for specific purposes. The

decimals represent Octets of the bits in the binary representation of the IP

addresses. For example, 255 is equal to 28 and represents 11111111.

This does not provide enough possibilities for every Internet device to have its

own permanent number. Subnet routing is one of the methods currently in

practice to allow LANs to use the same IP address as other networks elsewhere,

though both are connected to the Internet.

A Subnet (short for subnetwork) is a division of the network that is identified by a

subnet mask. A subnet mask is an IP address that is used to tell how many bits

in an Octet(s) identify the subnet and how many bits provide room for host

addresses. For example, the Subnet Mask 255. 255. 255.0 tells that the first 24

bits represent the subnet, while the rest 8 bits identify the hosts in the subnet.

A default gateway is a node on a computer network that serves as an access

device to another network. The default gateway address is usually (and applies

to this lab) an interface belonging to the LAN’s border router.

This lab is a non-destructive lab and can be done on any machine without

concern of changing the system configuration. It should be performed in a

classroom (or other LAN environment) that connects to the Internet so that the

computer that you use has an IP address.

Packet Internet Groper (ping) command is used to provide a basic test of

whether a particular host is operating properly and is reachable on the network

from the testing host. It provides estimates of round trip time and packet loss rate

between hosts.

The traceroute (tracert) traces all the routers that a network layer packet has to

pass through to get to a destination.

Page 3: Csc261 Ccn Lab Manual

Preparation:

A workstation connected to the internet is required.

Experiment: Verify the connectivity of your workstation to the internet.

1. Open the Command Prompt of the operating system using either of the

Following methods:

2. Click on Start > All Programs > Accessories > Command Prompt or

3. Click on Start > Run, enter cmd (short for command) and click on ok.

Command Prompt screen should open.

Gather TCP/IP configuration information:

4. Type ipconfig (short for IP configuration) and press Enter.

The screen will show the IP address, subnet mask, and default gateway for

your computer’s connection.

Notice the values in the Command Prompt. The IP address and the default

gateway should be in the same network or subnet, otherwise this host would

not be able to communicate outside the network. In below figure the subnet mask

tells us that the first three octets of the IP address and the default gateway

must be the same in order to be in the same network.

Figure 1.1 The TCP/IP configuration information of a workstation

5. Check more detailed TCP/IP configuration information:

Type ipconfig /all and press Enter. What are the DNS and DHCP server

addresses? What are their functions? What is the MAC of the network

Page 4: Csc261 Ccn Lab Manual

Interface card?

6. Ping the IP address of another computer. Note that for the ping and tracert

commands to work the PC firewalls have to be disabled. Why do you think

this is so?

7. Ask the IP address of the workstation that is being used by another group of

students.Then type ping, space, and the IP address that you received, then

press Enter. Notice the outputs.

Figure 1.2

8. Ping the IP address of the gateway router from the details that have been

observed in the output of step 4 above. If the ping is successful, it means that

there is a physical connectivity to the router on the local network and probably

the rest of the world.

9. Ping the Loopback IP address of your computer. Type the following

command: ping 127.0.0.1.

10. The IP address 127.0.0.1 is reserved for loopback testing. If the ping is

successful, then TCP/IP is properly installed and functioning on this

computer.

You can also ping using names like websites. Ping the IP address of the cisco

website.

11. Type ping, space and www.iqraisb.edu.pk, then press Enter. Notice the

Outputs. A DNS server will resolve the name to an IP address and the ping

Will be successful only in the existence of the DNS server.

12. Ping www.google.com.pk and observe the results. Is there a difference in time

between the results shown by pinging www.iqraisb.edu.pk and www.google.com.pk

Page 5: Csc261 Ccn Lab Manual

.

Visualize the path:

13. Trace the route to the IQRA website. Type tracert www.iqraisb.edu.pk and

press enter. In a successful output, you will see listings of all routers the

tracert requests had to pass through to get to the destination.

Question:

a) Include the above work for different web sites and observe the delay and TTL

values.

Page 6: Csc261 Ccn Lab Manual

LAB- 2

Building a Network

Objective To briefly introduce students with network devices and media used to building a small network.

Workstations The end systems that you use for the network labs are workstations. The lab manuals assume the use of Windows XP. Some of the commands are specific to the use of the Windows XP/2000/NT and they do not apply to other earlier systems like Windows 98.

Routers: A router is a network device that forwards network traffic along optimized paths. Router uses networks protocols (set of network rules, and algorithms) to connect different network segments. A router allows users in a network to share a single connection to the Internet or a WAN. A router can also be viewed as a specialized computer that is designed to forward packets very efficiently. Like a computer, a typical router consists of the following: CPU, Memory, System Bus, and network interfaces (Figure 1). These components are described below. (a) CPU – The Central Processing Unit performs the computation and logical operations. (b) Interfaces – These are the network connections through which packets transverse the router. The console and auxiliary ports are examples of the router interfaces. The console port is the asynchronous data port for the direct terminal access to the router. Remote router access can be provided by a modem connection to the aux port. The aux port can also be used for WAN connection.

Page 7: Csc261 Ccn Lab Manual

(c) Memory – Routers have four types of memory: 1) ROM (Read Only Memory) – ROM contains power-on diagnostics, the bootstrap program, and the operating system software loader. 2) RAM (Random Access Memory) – RAM is for storing routing tables, the ARP cache, fast-switching caches, and packet queuing and buffering. This memory provides temporary (or Running) memory for the router’s configurations while the router is powered on. When the router is powered off, all the data in the RAM, including the running configuration and routing tables, will be cleared. 3) NVRAM (Nonvolatile RAM) – This is where the router’s Configurations are saved. As this would suggest, the NVRAM Content is retained when you power down or reboot the router. 4) Flash (Erasable, Programmable ROM) – Flash memory holds the Operating system image (IOS Software) and macrocodes. Using Flash memory allows you to update software without removing or replacing chips on the processor. Flash contents are retained when you power down or reboot the router.

Page 8: Csc261 Ccn Lab Manual

Switches:- Switches are link-layer devices that forward frames (link layer packets) based on LAN destination addresses. When a frame comes into a switch interface, therkwork

switch examines the link layer destination address of the frame and attempts to forward it on the interface that leads to the destination. A typical switch consists of all the hardware components that are explained above for a router.

Cabling:- Three different types of cables will be used for the labs. They are straight-through Cable, console (rollover) cable and crossover cable. They differ from one another as to how the component wires of the cable are inserted into the pins of the adapters at the two ends of the cable In the below figure, the numbers refer to pins in the adapters. Apparatus:-

RJ-45 connector

Twisted Pair cable LAN Card

Criping Tool

Page 9: Csc261 Ccn Lab Manual

Building a Local Area Network:-

Question:

a) Design the above network in packet tracer 5.3.1 and show the ping results.

Page 10: Csc261 Ccn Lab Manual

LAB - 3

Capturing HTTP traffic through wireshark

Objective This lab demonstrates how capture different internet protocols traffic through a packet sniffer (wireshark).

Overview Wireshark is a network packet analyzer. A network packet analyzer will try to capture

network packets and tries to display that packet data as detailed as possible.

You could think of a network packet analyzer as a measuring device used to examine

what's going on inside a network cable, just like a voltmeter is used by an electrician to

examine what's going on inside an electric cable (but at a higher level, of course).

In the past, such tools were either very expensive, proprietary, or both. However, with the

advent of Wireshark, all that has changed.

Wireshark is perhaps one of the best open source packet analyzers available today.

Procedure The Basic HTTP GET/response interaction:

1. Start up your web browser. 2. Start up the Wireshark packet sniffer, but don’t yet begin packet capture.

Enter “http” (just the letters, not the quotation marks) in the display-filter-specification window, so that only captured HTTP messages will be displayed later in the packet-listing window. (We’re only interested in the HTTP protocol here, and don’t want to see the clutter of all captured packets).

3. Wait a bit more than one minute (we’ll see why shortly), and then begin Wireshark packet capture.

4. Enter the following to your browser

http://gaia.cs.umass.edu/wireshark-labs/HTTP-wireshark-file1.html Your browser should display the very simple, one-line HTML file. 5. Stop Wireshark packet capture. Your Wireshark window should look similar to the window shown in Figure below If you are unable to run Wireshark on a live network connection, you can download a packet trace that was created when the steps above were followed.

Page 11: Csc261 Ccn Lab Manual

Figure 1.1

The example in Figure 1 shows in the packet-listing window that two HTTP messages

were captured: the GET message (from your browser to the gaia.cs.umass.edu web

server) and the response message from the server to your browser. The packet-contents

window shows details of the selected message (in this case the HTTP GET message,

which is highlighted in the packet-listing window). Recall that since the HTTP message

was carried inside a TCP segment, which was carried inside an IP datagram, which was

carried within an Ethernet frame, Wireshark displays the Frame, Ethernet, IP, and TCP

packet information as well. We want to minimize the amount of non-HTTP data

displayed (we’re interested in HTTP here, and will be investigating these other protocols

is later labs), so make sure the boxes at the far left of the Frame, Ethernet, IP and TCP

information have a plus sign (which means there is hidden, undisplayed information), and

the HTTP line has a minus sign (which means that all information about the HTTP

message is displayed).

Page 12: Csc261 Ccn Lab Manual

Question:

By looking at the information in the HTTP GET and response messages, answer the

following questions. When answering the following questions, you should print out the

GET and response messages and indicate where in the message you’ve found the

information that answers the following questions.

i. Is your browser running HTTP version 1.0 or 1.1? What version of HTTP is the

server running?

ii. What languages (if any) does your browser indicate that it can accept to the

server?

iii. What is the IP address of your computer? Of the gaia.cs.umass.edu server?

iv. What is the status code returned from the server to your browser?

v. When the HTML file that you are retrieving was last modified at the server?

vi. How many bytes of content are being returned to your browser?

vii. By inspecting the raw data in the packet content window, do you see any headers

Within the data that are not displayed in the packet-listing window? If so, name

One.

Page 13: Csc261 Ccn Lab Manual

Lab – 4

Page 14: Csc261 Ccn Lab Manual
Page 15: Csc261 Ccn Lab Manual
Page 16: Csc261 Ccn Lab Manual
Page 17: Csc261 Ccn Lab Manual
Page 18: Csc261 Ccn Lab Manual
Page 19: Csc261 Ccn Lab Manual
Page 20: Csc261 Ccn Lab Manual
Page 21: Csc261 Ccn Lab Manual
Page 22: Csc261 Ccn Lab Manual
Page 23: Csc261 Ccn Lab Manual

LAB - 5

Page 24: Csc261 Ccn Lab Manual
Page 25: Csc261 Ccn Lab Manual
Page 26: Csc261 Ccn Lab Manual
Page 27: Csc261 Ccn Lab Manual
Page 28: Csc261 Ccn Lab Manual
Page 29: Csc261 Ccn Lab Manual
Page 30: Csc261 Ccn Lab Manual
Page 31: Csc261 Ccn Lab Manual
Page 32: Csc261 Ccn Lab Manual
Page 33: Csc261 Ccn Lab Manual
Page 34: Csc261 Ccn Lab Manual
Page 35: Csc261 Ccn Lab Manual
Page 36: Csc261 Ccn Lab Manual
Page 37: Csc261 Ccn Lab Manual
Page 38: Csc261 Ccn Lab Manual

LAB -6

Switches vs. Hubs

Objective Maybe you have heard of hub and switch in your everyday life. Both of them are devices to

connect multiple computers. Hub will forward any incoming frames to all connected

computers, while switch only forward the incoming frame to its destination. For example, as

shown in the following figure, the incoming frame will be forwarded to all three attached

computer by the hub even if its destination is computer 1. However, if switch is used, the frame

Will be directly forwarded to computer I which is the destination

Figure 6.1. Comparison of different forwarding behavior between Hub and Switch

Based on the above description, which do you think is better, hub or switch? Intuitively, switch

should be more efficient. In another words, switch can allow more traffic to pass. As a network

engineer, intuition is not sufficient. We need to provide quantitative measurement to compare the

performance of hub and switch. This lab shows you how to design a network simulation for

performance comparison.

The first step is to consider what criteria to measure the performance. From the user’s aspect of

view, delay is always a good measurement. A more efficient network should provide shorter

delay. Another widely used measurement is called “Throughput”, which is the data amount

transferred in the network per time unit. A more efficient network should allow more traffic to

pass that leads to larger throughput. In your future design, you may want to use these

measurements as well.

The second step is to create a practical network topology and set the applications according to the

simulated scenario. The following section shows to you that how to create a LAN using hub and

switch, and how to compare their performance based on the simulation. Please follow these steps

to complete this lab.

hub

1 2 3

Switch

1 2 3

Page 39: Csc261 Ccn Lab Manual

Step-by-Step Instruction

Step one: create a new project

Start up OPNET IT Guru Academic Edition. Create a new project using the method introduced in

Lab one. Set the Project Name to be x_Switch_vs_Hub (where x is your initial), and set the

Scenario Name to Hub.

In the Initial Topology window, select Create Empty Scenario;

In the Choose Network Scale window, select Office;

In the Specify Size window, accept the default values;

In the Select Technologies window, include the Ethernet and Ethernet_advanced model family.

Step two: create Network Topology

Here I will show you how to quickly create a LAN topology which all computers are connected

using a Hub.

Select the Topology Tab in the menu Rapid Configuration. Set the Configuration to Star,

and click on OK. Set the Center Node Model to ethernet16_hub. Set the Periphery Node

Model to Ethernet_station. Set the Link Model to 10BasedT, and set the Number to 12. Click

OK to create the LAN.

Step three: Generate Traffic for the LAN

To generate traffic for each Ethernet station, right-click on any of the station and choose Select

Similar Nodes. Next, right click on one of the stations and choose Edit Attributes. Put a check

in the checkbox next to Apply Changes to Selected Objects. Expand the Traffic Generation

Parameters and Packet Generation Arguments attributes, set the On State Time to constant

(1000), and the OFF State Time to constant (0). Thhis will ensure that the stations are always

sending.

Set the Interarrival Time (seconds) to exponential (0.005) and the Packet Size (bytes) to

constant(1000). Click on OK to apply the changes and close the window. Each station will now

generate traffic at an average rate of one 1000-byte packet every 5 ms. Based on this setting, we

know that each station are sending with the following average data rate:

Page 40: Csc261 Ccn Lab Manual

1000bytes/packet * 8 bits/byte * 1 packet/0.005sec = 1.6 Mbps

Now the hub-based LAN is complete. You should have the following:

Step Four : Configure the Simulation and view the results

Select the Simulation tab Choose Individual Statistics…

Expand the Global Statistics item and the Ethernet item, and select the Delay

Expand the Traffic Sink item and select the Traffic Received (bits/sec) statistic. Expand the

Traffic Source item and select the Traffic Sent (bits/sec) statistic. (Note: Statistics like traffic

received and traffic sent indicates the value of Throughput)

Click on OK to close the window.

Page 41: Csc261 Ccn Lab Manual

Select Simulation tab Configure Discrete Event Simulation…

Under the Common tab, set the Duration to 2, and the unit to minute(s). Click OK to close the

window.

Now you have configured the statistics to collect during the simulation, you can go ahead and run

the simulation to view the results using the method learned in Lab one.

Page 42: Csc261 Ccn Lab Manual

Step Five :Duplicate the Scenario

So far we have created a simulation scenario using Hub. Don’t forget we need to do the same

thing for switch as well. Since we are comparing their performance, we need to put them in the

same network topology. Fortunately, OPNET allows us to quickly create a similar topology

without going through the above steps again.

Let’s build another scenario using Switch as the center of the LAN.

Choose Scenarios Duplicate Scenario, and name the new scenario Switch. Click on OK to

create the scenario.

Right-click on the hub and choose Edit Attributes. Left click on the model attribute and choose

enthernet16_switch_adv from the pull-down menu. Also, you can change the name to be

Switch. Click on OK to make the change.

Now you should get the scenario like the following:

Page 43: Csc261 Ccn Lab Manual

Step Six : Run Simulation and Compare Results

Select the Scenarios tab Manage Scenarios…

Edit the Results field in both rows and set the values to <collect> or <recollect>

Click on OK to run both scenarios. When the simulation is completed, click on Close to close the

window.

To compare the result, select the Result tab Compare Results…

Select and expand the Global Statistics item. Under the Ethernet, select Delay. View Delay in

As Is mode. Click on Show for a more detailed graph. This statistic shows the delivery delay for

each Ethernet frame. From the comparison, we can see that the delay for the switch scenario is

small and constant, while the delay for the hub scenario is increasing. Apparently, the switch can

provide faster network service.

Page 44: Csc261 Ccn Lab Manual

Expand the Traffic Sink and select the Traffic Received (bits/sec) statistics. View the statistics in

As Is mode. Click on Show for a more detailed graph. This statistics shows the total of traffic

received by all stations in the LAN. From the result, we can see that the switch can almost handle

twice traffic as much as the hub.

Using the same method, you can compare the Traffic sent (bits/sec). This should be almost the

same for both scenario, since the stations in both scenario generate same amount of traffic.

Page 45: Csc261 Ccn Lab Manual

Question:

The above results are obtained under the assumption that each station are sending data at 1.6

Mbps. Please change the Traffic Generation parameter of each Ethernet station to compare the

performance of Switch and Hub under the following conditions:

1. Each station sends data at around 60 Kbps

2. Each station sends data at around 500 Kbps

3. Each station sends data at around 2.5 Mbps

What conclusion you can make from your above comparison?

Page 46: Csc261 Ccn Lab Manual

Lab -7

Internet Basics

Objective

Overview

Page 47: Csc261 Ccn Lab Manual
Page 48: Csc261 Ccn Lab Manual

Lab Instruction

Page 49: Csc261 Ccn Lab Manual
Page 50: Csc261 Ccn Lab Manual
Page 51: Csc261 Ccn Lab Manual
Page 52: Csc261 Ccn Lab Manual
Page 53: Csc261 Ccn Lab Manual
Page 54: Csc261 Ccn Lab Manual
Page 55: Csc261 Ccn Lab Manual
Page 56: Csc261 Ccn Lab Manual
Page 57: Csc261 Ccn Lab Manual
Page 58: Csc261 Ccn Lab Manual

Lab -8

Page 59: Csc261 Ccn Lab Manual
Page 60: Csc261 Ccn Lab Manual
Page 61: Csc261 Ccn Lab Manual
Page 62: Csc261 Ccn Lab Manual
Page 63: Csc261 Ccn Lab Manual
Page 64: Csc261 Ccn Lab Manual
Page 65: Csc261 Ccn Lab Manual
Page 66: Csc261 Ccn Lab Manual
Page 67: Csc261 Ccn Lab Manual
Page 68: Csc261 Ccn Lab Manual

LAB -9 Evaluating Firewall Policies to manage Network Traffic

Objective

Overview

Step by step Instructions

Page 69: Csc261 Ccn Lab Manual
Page 70: Csc261 Ccn Lab Manual
Page 71: Csc261 Ccn Lab Manual
Page 72: Csc261 Ccn Lab Manual
Page 73: Csc261 Ccn Lab Manual
Page 74: Csc261 Ccn Lab Manual
Page 75: Csc261 Ccn Lab Manual
Page 76: Csc261 Ccn Lab Manual
Page 77: Csc261 Ccn Lab Manual

Lab - 10

Page 78: Csc261 Ccn Lab Manual
Page 79: Csc261 Ccn Lab Manual
Page 80: Csc261 Ccn Lab Manual
Page 81: Csc261 Ccn Lab Manual
Page 82: Csc261 Ccn Lab Manual
Page 83: Csc261 Ccn Lab Manual
Page 84: Csc261 Ccn Lab Manual
Page 85: Csc261 Ccn Lab Manual
Page 86: Csc261 Ccn Lab Manual

Lab - 11

Page 87: Csc261 Ccn Lab Manual
Page 88: Csc261 Ccn Lab Manual
Page 89: Csc261 Ccn Lab Manual
Page 90: Csc261 Ccn Lab Manual
Page 91: Csc261 Ccn Lab Manual
Page 92: Csc261 Ccn Lab Manual
Page 93: Csc261 Ccn Lab Manual
Page 94: Csc261 Ccn Lab Manual
Page 95: Csc261 Ccn Lab Manual
Page 96: Csc261 Ccn Lab Manual

Lab - 12

Page 97: Csc261 Ccn Lab Manual
Page 98: Csc261 Ccn Lab Manual
Page 99: Csc261 Ccn Lab Manual
Page 100: Csc261 Ccn Lab Manual
Page 101: Csc261 Ccn Lab Manual
Page 102: Csc261 Ccn Lab Manual
Page 103: Csc261 Ccn Lab Manual
Page 104: Csc261 Ccn Lab Manual
Page 105: Csc261 Ccn Lab Manual
Page 106: Csc261 Ccn Lab Manual

Lab - 13

Page 107: Csc261 Ccn Lab Manual
Page 108: Csc261 Ccn Lab Manual
Page 109: Csc261 Ccn Lab Manual
Page 110: Csc261 Ccn Lab Manual
Page 111: Csc261 Ccn Lab Manual
Page 112: Csc261 Ccn Lab Manual
Page 113: Csc261 Ccn Lab Manual
Page 114: Csc261 Ccn Lab Manual
Page 115: Csc261 Ccn Lab Manual
Page 116: Csc261 Ccn Lab Manual
Page 117: Csc261 Ccn Lab Manual
Page 118: Csc261 Ccn Lab Manual
Page 119: Csc261 Ccn Lab Manual
Page 120: Csc261 Ccn Lab Manual
Page 121: Csc261 Ccn Lab Manual

Lab # 14

Page 122: Csc261 Ccn Lab Manual
Page 123: Csc261 Ccn Lab Manual
Page 124: Csc261 Ccn Lab Manual
Page 125: Csc261 Ccn Lab Manual

Recommended