Lab 1: Introduction to the network lab



Similar documents
LAB THREE STATIC ROUTING

CS 326e F2002 Lab 1. Basic Network Setup & Ethereal Time: 2 hrs

Debugging Network Communications. 1 Check the Network Cabling

THE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering

Computer Networks I Laboratory Exercise 1

1 crossover cable. the PCs. network

Introduction to Operating Systems

ICS 351: Today's plan

[HOW TO RECOVER AN INFINITI/EVOLUTION MODEM IDX ] 1

INTRODUCTION. Version 6c, May 16 th, updated numbering of Figures 28, Deleted: March

Instructor Notes for Lab 3

Lab - Configure a Windows 7 Firewall

Lab 1: Network Devices and Technologies - Capturing Network Traffic

3.1 Connecting to a Router and Basic Configuration

In this lab you will explore the Windows XP Firewall and configure some advanced settings.

Lab - Configure a Windows Vista Firewall

Procedure to Create and Duplicate Master LiveUSB Stick

Hands-on MESH Network Exercise Workbook

USER GUIDE. Ethernet Configuration Guide (Lantronix) P/N: Rev 6

Lab - Configure a Windows XP Firewall

Fundamentals of UNIX Lab Networking Commands (Estimated time: 45 min.)

USER MANUAL GUIMGR Graphical User Interface Manager for FRM301/FRM401 Media Racks

Connect the Host to attach to Fast Ethernet switch port Fa0/2. Configure the host as shown in the topology diagram above.

CONNECTING THE RASPBERRY PI TO A NETWORK

Red Hat Linux Networking

Tutorial Guide to the IS Unix Service

Chapter 2 Preparing Your Network

SATO Network Interface Card Configuration Instructions

Pre-lab and In-class Laboratory Exercise 10 (L10)

Deploying BitDefender Client Security and BitDefender Windows Server Solutions

Load Balancing. Outlook Web Access. Web Mail Using Equalizer

Lab assignment #1 Firewall operation and Access Control Lists

IT Essentials II: Network Operating Systems V 3.0

This techno knowledge paper can help you if: You need to setup a WAN connection between a Patton Router and a NetGuardian.

Operating System Installation Guidelines

Introduction to Network Security Lab 1 - Wireshark

EDGE FX Network configuration

System Area Manager. Remote Management

BioStar Config Guide V1.0

Deployment Guide: Transparent Mode

How to Create, Setup, and Configure an Ubuntu Router with a Transparent Proxy.

Recommended Network Setup

1. Installation Overview

Lab 3 Routing Information Protocol (RIPv1) on a Cisco Router Network

Compuprint 4247 Serial Matrix Printers

Chapter 15: Advanced Networks

1 PC to WX64 direction connection with crossover cable or hub/switch

CET442L Lab #2. IP Configuration and Network Traffic Analysis Lab

ICS 351: Today's plan

NetLINE Wireless Broadband Gateway

HL2170W Windows Network Connection Repair Instructions

How Do I Recover infiniti Remotes and Line Cards?

Software installation and configuration IEC-line series

SA-9600 Surface Area Software Manual

Intrusion Detection and Prevention: Network and IDS Configuration and Monitoring using Snort

Ultra Thin Client TC-401 TC-402. Users s Guide

Setting Up Your FTP Server

1:1 NAT in ZeroShell. Requirements. Overview. Network Setup

Smoking and any food or drinks are not permitted in the Applications Lab!

integration tools setup guide SIM 3 Remote Guide to controlling a SIM 3 Audio Analyzer remotely over a network connection from a laptop

Procedure: You can find the problem sheet on Drive D: of the lab PCs. Part 1: Router & Switch

Deploying BitDefender Client Security and BitDefender Windows Server Solutions

Guideline for setting up a functional VPN

Moxa Device Manager 2.3 User s Manual

Connecting the DG-102S VoIP Gateway to your network

FILE TRANSFER PROTOCOL (FTP) SITE

Digicom Remote Control for the SRT

RADAR NETWORK SETUP WITH WINDOWS XP/VISTA

Savvius Insight Initial Configuration

Lab Conducting a Network Capture with Wireshark

Attix5 Pro Server Edition

ACP ThinManager Tech Notes Troubleshooting Guide

BASIC ANALYSIS OF TCP/IP NETWORKS

Host Configuration (Linux)

Exercise 4 MPLS router configuration

Moxa Device Manager 2.0 User s Guide

Installation Overview

2 Setting Up the Hardware for a Wired Ethernet Network Setting Up the Software for an Ethernet Network... 21

Applicazioni Telematiche

In the following installation procedures, do not disconnect the Mediatrix 3000 Series while the LEDs are flashing.

Chapter 7 Troubleshooting

Technical Support Information Belkin internal use only

Procedure: You can find the problem sheet on Drive D: of the lab PCs. 1. IP address for this host computer 2. Subnet mask 3. Default gateway address

Building a Penetration Testing Virtual Computer Laboratory

SSL VPN Setup for Windows

InfoPrint 4247 Serial Matrix Printers. Remote Printer Management Utility For InfoPrint Serial Matrix Printers

OPERATION MANUAL. MV-410RGB Layout Editor. Version 2.1- higher

Quick Note 53. Ethernet to W-WAN failover with logical Ethernet interface.

Raspberry Pi Setup Tutorial

Homework 3 TCP/IP Network Monitoring and Management

Linux Overview. Local facilities. Linux commands. The vi (gvim) editor

Network Setup Guide. 1 Glossary. 2 Operation. 1.1 Static IP. 1.2 Point-to-Point Protocol over Ethernet (PPPoE)

Chapter 3 Management. Remote Management

Chapter 4 Management. Viewing the Activity Log

c. Securely insert the Ethernet cable from your cable or DSL modem into the Internet port (B) on the WGT634U. Broadband modem

Sample Configuration Using the ip nat outside source static

Link Link sys E3000 sys RE1000

CS 103 Lab Linux and Virtual Machines

Honeywell Internet Connection Module

QOS 8 High-Speed RAID System Guide

Transcription:

CSCI 312 - DATA COMMUNICATIONS AND NETWORKS FALL, 2014 Lab 1: Introduction to the network lab NOTE: Be sure to bring a flash drive to the lab; you will need it to save your data. For this and future labs, you may find it useful to use the man pages to get more information. Manual pages (man pages) exist on every lab machine. For each of the following commands, type the name of the command as a search term. The search will return the appropriate man page (e.g. type in man mv). Read the man pages of the following commands to refresh your memory on some linux commands: mv rmdir pwd cp chmod ls rm kill more mkdir ping tcpdump We will be using wireshark to monitor network activity. The man page for wireshark, a network analyzer tool, can be found on every lab machine. You can also read about the wireshark network analyzer at the website http://wiki.wireshark.org/capturesetup The machines used in the network lab are not connected to the Internat and cannot be used for web browsing. In Lab 1, you will acquaint yourself with the equipment of the Internet Lab, the Linux operating system, and some traffic measurement tools. Saving Data Most lab exercises ask you to save data that is displayed on your monitor to a file. Save your files to a flash drive before the end of the lab. You will need the files when you prepare your lab report. *** Note that after you save your data to the flash drive and before you remove the flash drive, you must unmount the drive or you will likely lose your data! When you insert the flash drive into the computer, an icon for the drive should show up on the desktop. To unmount the drive, rightclick on the icon and select eject volume (or some similar command). Once this is done, you can safely remove the drive. If you bring insert the drive into one of the linux machines in the main lab, you must do the same or you may corrupt your drive. If you cannot find the drive on the desktop, you can try opening the file icon to look for the flashdrive. *** NOTE: Whenever you create a file, place the file in the directory /Labdata. Since other students will most likely purge the files in this directory, please remember to save your files to a flash drive at the end of your lab session. Here are three methods to save data to a file on a Linux system.

1. Save data to a file with the redirection operators: Linux provides an easy way for redirecting the output of a command to a file via the redirection operators > and >>. (> writes a file and >> appends the file). 2. View and save data at the same time: You can view data on the monitor and save data to a file at the same time. For example, to display the output of command is in a terminal window, and also to file with name fname, you can use the command ROOT@PC1% ls tee fname or ROOT@PC1% ls > fname & tail f fname. 3. Save data with a text editor (with copy and paste) Open your favorite Unix editor such as gedit, kwrite, kate, etc. Use Ctrl-C and CTRL-V to copy and paste things into the editor window. From a terminal window, you will need to use the top menus edit, copy to grab data from the window and paste into an editor window. SETUP FOR PC 1 Please take a few minutes to compare the following description with the actual equipment: Four Linux PCs, which are labeled as PC1, PC2, PC3, and PC4. The PCs have the Linux operating system installed. Each Linux PC has two Ethernet network interface cards (NICs) installed, which are labeled em1 and p1p1. An Ethernet hub with at least four ports. A monitor, a keyboard, a mouse, and a KVM (keyboard-video-mouse) switch. The KVM switch connects the keyboard, monitor, and mouse to the four Linux PCs. The KVM switch gives you control over all four Linux PCs from one keyboard, one monitor, and one mouse, but you can access only one computer at a time. Ethernet cables. Note that there are two kinds: straight-through Ethernet cables (blue in color) and crossover Ethernet cables. In Lab 1, only straight-through Ethernet cables are used. Before you get started, one at a time, reboot each of the PCs to be sure that the network settings are refreshed. 1. Set the KVM switch to PC1 (the first light or the number 1 should light up). Log in as netlab (password netlab). 2. Open a terminal window. Type reboot at the prompt. Don't switch the KVM switch while a Linux PC is rebooting, otherwise the keyboard and mouse may not work properly. 3. Do the same for each of the machines. On PC1, open an editor (e.g. gedit) so that you can save data for later use. You can do this from the menu or the command line by typing gedit& (The & will cause the process to run in the background so that you can use the window for other things. If you start a process and then decide you want to to be running in the background, you can shift it to run in the background by first entering CTRL-Z to suspend the process and then entering bg to indicate that you want it to resume it as a background process.) Exercise 1 EXERCISE 1(A). 1. Set the KVM switch to PC1 (the first light or the number 1 should light up). Log in as netlab (password netlab). 2. Use the KVM switch to switch to PC3 (the third light or the number 3 should light up) and log in as netlab (password netlab). 3. Explore the desktop environment of PC3. 4. If a terminal window is not open, open a terminal window. Recall that all Linux commands are typed from a terminal window.

EXERCISE 1(B). In Lab 1 the four Linux PCs must be connected to an Ethernet hub. All Linux PCs are attached to the same Ethernet hub. 1. Attach each Linux PC to the same Ethernet hub with (straight-through) Ethernet cables. Connect the Ethernet interface with label em1 of each Linux PC to a hub using an Ethernet cable. Do not connect into the slot marked uplink on the hub. 2. Check to see if your physical connections are made by assuring that the small LEDs are lit on both the hub and on the back of the PC s. This is often a good way to check for a physical problem that may prevent wasted effort when the problem is really a bad cable. EXERCISE 1(C). To do many of these commands, you need to be root. Be careful, as root you have great power ("with great power come great responsibility"). You can do a lot of damage as root. To do this enter the command netlab@lab1% su - Note: It is important to have the dash after the su command in order to take on the root environment. When prompted, enter the password for root ( also netlab) To configure the IP addresses, we will be using the ip command in the sbin directory. Before continuing, look at the man pages for the ip command. To start, enter: Netlab@PC1% /sbin/ip addr show Entering /sbin/ip addr show will give you status information for each of the network interfaces. Take the information that you receive from the system by running this command and save it in a file so that you can include it in your lab report. Provide the results of the ip addr show command and explain the meaning of the different pieces of information provided. Next enter: /sbin/ip addr show em1 Providing the name of an interface will provide status information on that interface only. To set the IP address of an interface em1 to 10.0.1.11 with a net mask of 255.255.255.0, enter the following command: Netlab@PC1%/sbin/ip addr add 10.0.1.11/24 dev em1

Finally, bring the interface up with the command Netlab@PC1%/sbin/ip link set em1 up (may not be necessary) Set the IP address for each of the 4 devices, according to the table. IP addresses for the Linux PCs as shown in Table 1.1. Linux PC IP Addresses of Ethernet Interface em1: Host IP Address PC1 10.0.1.11/24 PC2 10.0.1.12/24 PC3 10.0.1.13/24 PC4 10.0.1.14/24 The notation 10.0.1.11/24 means that the IP address is 10.0.1.11 and the network prefix is 24 bits long. A network prefix of 24 bits corresponds to a netmask set to 255.255.255.0. With this netmask, all hosts are on the 10.0.1.0/24 network. EXERCISE 1(D) Testing connectivity between computers. One of the most basic, but also most effective, tools to debug IP networks is the ping command. The ping command tests whether another host or router on the Internet is reachable. The ping command sends an ICMP Echo Request datagram to an interface and expects an ICMP Echo Reply datagram in return. NOTE: On Linux systems, ping continues to send packets until you interrupt the command with the Ctrl-C keys. When using ping on the Linux PCs, always send at least two ICMP Echo Request packets. The first ICMP Echo Request may often be dropped at the receiver. This occurs when the ICMP Echo Request packet does not reach its destination within a certain amount of time or number of hops, e.g., when waiting for an ARP Reply or ICMP Redirect. After connecting the four Linux PCs to the Ethernet hub, all four computers should be able to communicate with one another. Verify connectivity by using the ping command. From PC1, ping each of the other three machines by entering: Netlab@PC1% ping c 3 <addr> where <addr> is replaced by each of the other three addresses in turn. If you have problems, check your connections and settings and fix. Save the results of your ping and include them in your report. Include the results of your ping along with a brief explanation. Switch to PC2 and repeat the process to assure that each machine can be reached via PC2.

Linux Configuration Linux has numerous configuration files that set the environment variables of the operating system. For example, if you want to set up your Linux PC as an IP router, you merely need to change a single line in one of the configuration files. Studying configuration files also provides a way of learning what network configuration options are available to you. Configuration files are fundamentally different across different versions of Unix-like operating systems (e.g., AIX, Solaris, Linux, FreeBSD). Sometimes the structure of configuration files changes between releases of the same Unix version. For example, the configuration files of different Linux distributions, such as Red Hat and Slackware, are quite different. Furthermore, the configuration files between different versions of the some Linux distribution can have significant differences. A list of the most important network configuration files follows: /etc/sysconfig/network This file defines global parameters of the network configuration, such as the host name, domain name, and IP address of the default gateway. It also includes a line to determine whether the Linux PC acts as a router or not. /etc/sysconfig/network scripts /ifcfg lo /etc/sysconfig/network scripts /ifcfg em1 /etc /sysconfig/network-scripts /ifcfg-p1p1 These files define the configuration of the network interfaces. There is one configuration file for each network interface. The files ifcfg-em1 and ifcfg-p1p1 are for the two installed Ethernet interface cards. The file ifcfg lo is for the loopback interface. /etc/sysctl.conf This file specifies many kernel options related to the network configuration. /etc/sysconfig/static-routes This file contains the settings of the static routing table, which is set when booting the Linux PC. It may not exist or may be empty if no static routes have been previously assigned. EXERCISE 1(E) On PC1, issue a ping to the IP address of PC1. Also, issue a ping command to the loopback interface 127.0.0.1 Limit the number of pings to five Save the output. Include the output you saved in this exercise. Explain the difference between pinging the local Ethernet interface and the loopback interface. Specifically, on PC 1, what is the difference between typing ping 10.0.1.11 and ping 127.0.0.1. (This is a conceptual question on the role of the loopback interface. The response to the ping command does not provide you with the answer to this question.)

TCPDUMP tcpdump allows you to capture traffic on a network and display the packet headers of the captured traffic. tcpdump can be used to identify network problems or to monitor network activities. See the man pages for tcpdump. Exercise 2 EXERCISE 2A Simple tcpdump exercise. Use tcpdump to observe the network traffic that is generated by issuing ping commands. 1. Switch to PC1. Start tcpdump so that it monitors all packets that contain the IP address of PC2, by typing root@pc1% tcpdump -n host 10.0.1.12 2. Open a new window and execute Netlab@PC1% ping -c 1 10.0.1.12 3. Observe the output of tcpdump. Save the output to a file. NOTE: If you use the tee or tail commands to simultaneously view and save the output from tcpdump, you need to use the -l option of tcpdump. For example, tcpdump -n -l > filename & tail f filename tcpdump -n -l tee filename It-may be necessary to hit CTRLl-C to terminate the tcpdump session. It may sometimes be best to simply redirect the output of tcpdump straight to a file (e.g. tcpdump > filename) and view it afterward with a text editor. Include a snippet of the saved output in your lab report. Explain the meaning of each field in the captured data. EXERCISE 2(B). 1. On PC1, start capturing packets using the tcpdump -n command. 2. Issue a ping to the nonexistent IP address 111.111.111.111: Netlab@PC1% ping -c 1 111.111.111.111 3. Issue a ping to the broadcast address 10.0.1.255 using the command Netlab@PC1% ping -c 2 -b 10.0.1.255 Save the outputs of ping and tcpdump to a file.

Include relevant output in your lab report and interpret the results. How many of the Linux PCs responded to the broadcast ping? Wireshark Wireshark is a network protocol analyzer with a graphical user interface. Using wireshark, you can interactively capture and examine network traffic, view summaries, and get detailed information for each packet. Before starting this part of the exercise, reboot PC1 and then reconfigure em1 with the IP address as before. This is important to do before starting! Do not test the interface after issuing the /sbin/ip commands. Exercise 3 EXERCISE 3. Running Wireshark This exercise walks you through the steps of capturing and saving network traffic with wireshark. The exercise is conducted on PCI. 1. Starting wireshark: On PC1, start wireshark by typing ROOT@PC1% wireshark & or select it from the icons on the bottom of the screen. 2. Starting the traffic capture: Start the packet capture by selecting Capture, Itnerfaces from the top menu. In the second window, click on the Start button after em1. 3. Generating traffic: In a separate window on PC1, execute a ping command to PC3. Netlab@PC1% ping -c 2 10.0.1.13 Observe the output in the wireshark main window. Click and highlight a captured packet in the wireshark window and view the headers of the captured traffic. 4. Stopping the traffic capture: Click Stop in the window Ethernet Capture. 5. Saving captured traffic: Save the results of the captured traffic as a plain text file. This is done by selecting export in the File menu. When a Export window pops up, select the options and set a filename. If you select Save in the file menu, the captured data is saved in the format of a libpcap file. This format con be interpreted by both tcpdump and wireshark. Measurements saved in libpcap format can be analyzed at a later time. However, libpcap files are not plain text files and are not useful for preparing your report. Unless you have the tcpdump and/or wireshark tools available on a system outside of the lab, which allows you to view and save captured traffic as text at a later time, always save captured traffic in plain text Format.

Repeat this process a second time. Restart the traffic capture on em1 and again issue the ping command for PC3. Save the results in a second file. Netlab@PC1% ping -c 2 10.0.1.13 Include the file with the captured data in your lab report. Save the details of the captured traffic, using the Export window. Explain why you have different number of packets in the second capture than you do in the first. Describe the differences between the files saved by tcpdump and by wireshark (in this part). TearDown When you are done with the exercises, you must return the lab to the state at th which you should have found it. Remove all data files that you created and disconnect all network wires. Writing the Your file lab report should have a heading that includes your name, the date you conducted the lab exercise, the lab number, and the names of all individuals who worked on the lab with you. It should be written with an introduction, an explanation of what occurred for each step (including problems encountered) and results along with analysis if appropriate. Include any data needed to support what you ahve done but please save trees by limiting the amount of data that you print to a minimum. A conclusion should sum up lessons learned and what things you would do differently if you were to do it again. Finally, make any suggestions that you would recommend for this lab in the future. Submitting Submit only one lab report per group. The name of the report should be Lab1_Report_fist_last.pdf where first and last represent the name of one member (selected at random) of the group(e.g. Lab1_Report_John_Doe.pdf). The list of names of the group members should be included in the first page of the report. To submit, copy the file to /usr/people/handin/cs312 folder by the due date listed in the class website.