You are on page 1of 125

Computer Communication Network TCL261 List of Experiments

Lab Number Lab # 1 Lab # 2 Lab # 3 Lab # 4 Lab # 5 Lab # 6 Lab # 7 Lab # 8 Lab # 9 Lab # 10 Lab # 11 Lab # 12 Lab # 13 Lab # 14 LAB # 15 Lab # 16 Name Introduction to network Building a Network Capturing traffic through wire shark Ethernet Token Ring Switch Vs Hub Internet basics Network design Evaluate firewall policies to manage traffic Firewall and VPN Routing Information Protocol Open Shortest Path First Asynchronous Transfer Mode Router IOS Basics Project -A Project -B

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 LANs 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.

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 computers 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

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

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.

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.

(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 routers 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 routers 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.

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

Building a Local Area Network:-

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

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 dont yet begin packet capture. Enter http (just the letters, not the quotation marks) in the display-filterspecification window, so that only captured HTTP messages will be displayed later in the packet-listing window. (Were only interested in the HTTP protocol here, and dont want to see the clutter of all captured packets). 3. Wait a bit more than one minute (well 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.

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 (were 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).

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 youve 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? What languages (if any) does your browser indicate that it can accept to the server? What is the IP address of your computer? Of the gaia.cs.umass.edu server? What is the status code returned from the server to your browser? When the HTML file that you are retrieving was last modified at the server? How many bytes of content are being returned to your browser? 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.

ii.

iii. iv. v. vi. vii.

Lab 4

LAB - 5

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

hub

Switch

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 users 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.

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:

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.

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.

Step Five :Duplicate the Scenario


So far we have created a simulation scenario using Hub. Dont 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. Lets 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:

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.

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.

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?

Lab -7
Internet Basics
Objective

Overview

Lab Instruction

Lab -8

LAB -9
Evaluating Firewall Policies to manage Network Traffic
Objective

Overview

Step by step Instructions

Lab - 10

Lab - 11

Lab - 12

Lab - 13

Lab # 14

You might also like