Computer networking lab manual

ccna lab manual for cisco networking fundamentals and introduction to networking lab manual
LavinaKanna Profile Pic
LavinaKanna,Canada,Researcher
Published Date:13-07-2017
Your Website URL(Optional)
Comment
ITS332 Information Technology Laboratory II Networking Lab Manual by Steven Gordon Sirindhorn International Institute of Technology Thammasat University Semester 2, 2011Contents 1 Introduction 1 1.1 About ITS332 Information Technology Lab II . . . . . . . . . . . . . . . 1 1.2 About the Lab Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2.1 How to Use the Manual . . . . . . . . . . . . . . . . . . . . . . . 1 1.2.2 Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.3 Completing the Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.3.1 Making Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.3.2 Drawing Message Sequence Diagrams . . . . . . . . . . . . . . . . 3 1.3.3 Drawing Packets . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3.4 Network Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3.5 What Not To Do . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.4 Further Information Sources . . . . . . . . . . . . . . . . . . . . . . . . . 4 2 Ubuntu Linux 5 2.1 What is Ubuntu Linux? . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.1.1 Why Not Microsoft Windows? . . . . . . . . . . . . . . . . . . . . 5 2.2 Common Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.2.1 Starting Ubuntu Linux . . . . . . . . . . . . . . . . . . . . . . . . 6 2.2.2 User Accounts and Login . . . . . . . . . . . . . . . . . . . . . . . 6 2.2.3 Window System . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.2.4 Command Line Shell . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.2.5 Text and Source Code Editing . . . . . . . . . . . . . . . . . . . . 9 2.2.6 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.3 Advanced Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.3.1 Installing Software . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.3.2 Compiling C Code . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.4 Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3 Wireshark 13 3.1 Packet Capture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.2 Using Wireshark . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.2.1 Starting Wireshark . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.2.2 Viewing Captured Trac . . . . . . . . . . . . . . . . . . . . . . . 14 3.2.3 Analysis and Statistics . . . . . . . . . . . . . . . . . . . . . . . . 15 3.2.4 Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.3 Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 iii CONTENTS 4 Client/Server Applications 21 4.1 Clients, Servers and Addressing . . . . . . . . . . . . . . . . . . . . . . . 21 4.1.1 Addresses and Ports . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.1.2 Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 4.1.3 Clients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 4.2 Web Browsing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 4.2.1 Server Con guration Files . . . . . . . . . . . . . . . . . . . . . . 23 4.2.2 Controlling the Web Server . . . . . . . . . . . . . . . . . . . . . 24 4.2.3 Creating Web Pages . . . . . . . . . . . . . . . . . . . . . . . . . 24 4.2.4 Server Logs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 4.2.5 Basic Authentication . . . . . . . . . . . . . . . . . . . . . . . . . 25 4.3 Remote Login . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 4.4 Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 5 Networking Tools 31 5.1 Operating Systems and Tool Interfaces . . . . . . . . . . . . . . . . . . . 31 5.2 Viewing Network Interface Information . . . . . . . . . . . . . . . . . . . 32 5.3 Testing Network Connectivity . . . . . . . . . . . . . . . . . . . . . . . . 32 5.3.1 ping at SIIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 5.4 Testing a Route . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 5.5 Converting Between Domain Names and IP Addresses . . . . . . . . . . . 34 5.6 Viewing the Routing Table . . . . . . . . . . . . . . . . . . . . . . . . . . 35 5.7 Converting IP Addresses to Hardware Addresses . . . . . . . . . . . . . . 35 5.8 Network Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 5.9 Viewing More Network Information: Useful Files . . . . . . . . . . . . . 36 5.10 Automatic IP Address Con guration . . . . . . . . . . . . . . . . . . . . 36 5.10.1 How Does DHCP Work? . . . . . . . . . . . . . . . . . . . . . . . 36 5.10.2 Viewing Interface Information . . . . . . . . . . . . . . . . . . . . 37 5.10.3 Viewing DHCP Information . . . . . . . . . . . . . . . . . . . . . 38 5.10.4 Setting a Static IP Address . . . . . . . . . . . . . . . . . . . . . 38 5.11 Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 6 Layer 2 Networking 43 6.1 Peer-to-Peer Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 6.1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 6.1.2 Ethernet Cabling . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 6.2 Switched Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 6.3 Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 7 Layer 3 Networking 51 7.1 Routers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 7.1.1 Routers and Hosts . . . . . . . . . . . . . . . . . . . . . . . . . . 51 7.1.2 Enabling Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 7.1.3 Editing the Routing Table . . . . . . . . . . . . . . . . . . . . . . 53 7.2 Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54CONTENTS iii 8 Firewalls 57 8.1 Understanding Firewalls . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 8.1.1 How Do Firewalls Work? . . . . . . . . . . . . . . . . . . . . . . . 58 8.1.2 Firewall Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 8.1.3 Firewalls and Servers . . . . . . . . . . . . . . . . . . . . . . . . . 60 8.1.4 Firewalls on Linux: iptables . . . . . . . . . . . . . . . . . . . . . 60 8.2 Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 9 Socket Programming 65 9.1 Programming with Sockets . . . . . . . . . . . . . . . . . . . . . . . . . . 65 9.1.1 Servers Handling Multiple Connections . . . . . . . . . . . . . . . 67 9.1.2 Further Explanation . . . . . . . . . . . . . . . . . . . . . . . . . 67 9.2 Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 A Acronyms and Units 71 A.1 Acronyms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 A.2 Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 B Lab Facilities 73 B.1 Work Stations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 B.2 Network Infrastructure . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 C Ubuntu Reference Material 77 C.1 Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 C.2 Files and Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 D Example Client/Server Programs 79 D.1 Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 D.2 Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 E Packet Formats and Constants 85 E.1 Packet Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 E.2 Port Numbers and Status Codes . . . . . . . . . . . . . . . . . . . . . . . 86iv CONTENTSList of Figures 1.1 Example message sequence diagram . . . . . . . . . . . . . . . . . . . . . 3 1.2 Example packet diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3 Single Router Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 3.1 Capturing packets in the Operating System . . . . . . . . . . . . . . . . 14 3.2 Main window of Wireshark . . . . . . . . . . . . . . . . . . . . . . . . . . 16 6.1 Layer 2 Peer-to-peer Network . . . . . . . . . . . . . . . . . . . . . . . . 43 6.2 Example ordering of Ethernet sockets on computer and switch . . . . . . 45 6.3 Ethernet straight-through cable connection . . . . . . . . . . . . . . . . . 45 6.4 Ethernet cross-over cable connection . . . . . . . . . . . . . . . . . . . . 46 6.5 Layer 2 Switched Network . . . . . . . . . . . . . . . . . . . . . . . . . . 47 7.1 Comparison of Router and Host . . . . . . . . . . . . . . . . . . . . . . . 53 8.1 An organisation views their network as inside, and all other networks as outside . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 8.2 Example rewall rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 8.3 Chains in iptables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 9.1 Socket communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 B.1 Network Lab: Connections for each computer . . . . . . . . . . . . . . . 74 B.2 Network Lab: Connections for each group of 9 computers . . . . . . . . . 75 B.3 Network Lab: Connections for entire lab . . . . . . . . . . . . . . . . . . 76 E.1 IP Datagram Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 E.2 TCP Segment Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 E.3 UDP Datagram Format . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 E.4 Ethernet Frame Format . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 vvi LIST OF FIGURESList of Tables C.1 General Ubuntu commands . . . . . . . . . . . . . . . . . . . . . . . . . 77 C.2 Important Ubuntu networking commands . . . . . . . . . . . . . . . . . . 78 C.3 Important Ubuntu les and directories . . . . . . . . . . . . . . . . . . . 78 viiviii LIST OF TABLESChapter 1 Introduction 1.1 About ITS332 Information Technology Lab II The course ITS332 Information Technology Laboratory II is a lab covering introductory concepts and technologies in networking. This document is the manual for the lab tasks. For information about the course structure, lab dates, instructors, assessment and email list, see the course website at: http://ict.siit.tu.ac.th/ steven/its332/ 1.2 About the Lab Manual 1.2.1 How to Use the Manual You can use this lab manual as a reference document, rather than a set of instructions for the lab. That is, you do not have to read this manual from start to nish. Starting from Chapter 2, each chapter roughly corresponds to a lab class (some chap- ters are covered across two classes). A chapter provides background on the technologies you are going to learn in the class, including examples and reference material. At the end of each chapter is a list of general tasks. The lab instructor will inform you about details of each task. In some cases you don't have to read the entire chapter: after listening to the instructor you can get started on the tasks. Then refer back to the manual when you have problems. You should also use this manual to record notes. See Section 1.3 for details about tasks and notes. 1.2.2 Notation Often you will use a terminal (command line) to enter commands. This lab manual explains di erent commands using examples enclosed in a box, as illustrated below.  The command prompt is where you type commands using a terminal. In this manual the prompt is shown as a dollar sign (). You do not type this in. File: Steve/Courses/2011/S2/ITS332/Handouts/intro.tex, r2074 12 CHAPTER 1. INTRODUCTION  Commands that you should type are given after the command prompt.  Variables are part of a command, but a string that you must choose. For example, FILENAME below is a variable: you should type in a suitable name of a le.  Comments are shown in italics following a hash symbol (). This is just to explain to the reader. You do not type it in.  Output of commands is shown without a command prompt. For example, the output of the rst command below has 3 lines, while the output of the second command is a single line. cat FILENAME this command displays the contents of a file line1 line2 line3 wc example.txt this command counts lines, words and bytes in a file 3 3 18 example.txt 1.3 Completing the Tasks 1.3.1 Making Notes It is important that you make notes of what you do and what you learn when completing tasks. The notes help you in identifying the important information, and hopefully will help you in study for exams. The things you should note include:  Record the commands you used to perform tasks (especially if it is di erent from the commands given in this manual). Include a description of the important options used. An example: To view the routing cache run the command: route -C -n The -C option displays the cache (instead of table), while the -n option shows only IP addresses (not domains).  Note important concepts learnt from the tasks and from the instructors. An exam- ple: Reverse DNS maps IP addresses to domain names. But not all organisations register the reverse mapping.  Illustrate the operation of protocols, and the packets transferred. See Sections 1.3.2 and 1.3.3 for details.  When building a network, record the design of the network. See Section 1.3.4 for details.1.3. COMPLETING THE TASKS 3 1.3.2 Drawing Message Sequence Diagrams One method to illustrate the operation of a protocol is to draw the exchange of packets between the involved entities. Such a diagram is often called a message sequence diagram. Figure 1.1 shows an example message sequence diagram. 10.10.6.134 10.10.6.1 Port: 1540 Port: 24 The address or The address identifier of the node information is relevant SYN that initiates the to the protocol you are exchange describing. SYN+ACK Name or type of message If useful, include extra ACK+DATA(Seq=1) information about the message contents Figure 1.1: Example message sequence diagram 1.3.3 Drawing Packets Understanding the relationship of protocols to di erent layers is important to under- standing the role of a protocol in a communications network. As encapsulation is often used in protocol layers, drawing a packet with the headers added by the di erent layers is one method of visualising the layers. The headers of each layer can be drawn simply noting the name of the protocol for each header. Although sometimes you may included extra information, such as values of important elds in selected headers. Also, showing the size of headers and data can be useful. Figure 1.2 gives an example illustration of a packet. IEEE 802.3 IP TCP HTTP Data Figure 1.2: Example packet diagram 1.3.4 Network Design When you build a network you should record the design with enough detail such that a student next year could read your design and build the exact same network. Information you often include in the design includes:4 CHAPTER 1. INTRODUCTION  A diagram of the network topology. This should show the devices and links in the network, with each clearly labelled with a meaningful name (e.g. client, server, switch) or technology (e.g. Ethernet crossover cable). Figure 1.3 provides an exam- ple.  Addresses of devices, especially IP addresses. You often can include them on the network diagram.  Commands and operations you performed to con gure the network. E.g. routing tables, application con guration.  Commands and operations you performed to test the network, as well as important results from tests. E.g. ping and the average response time. IF1 IF1 IF2 IF1 Host A Router C Host B Figure 1.3: Single Router Network 1.3.5 What Not To Do When completing tasks, often applications will produce output on the screen. Do not waste your time by copying the output from the screen to your notes. You should look at the output and try to understand the important information it tells you. If you want a record of the output, take a screenshot and save the le. 1.4 Further Information Sources The course website, http://ict.siit.tu.ac.th/ steven/its332/, has links to numer- ous other sites with useful information about networking software and hardware. During the lab several sources of information you may regularly use include:  Linux manual pages. On Linux, help can be found for almost all commands (and many important les) via the manual pages. Via the terminal, simply type man followed by the name of the command and you will see a detailed description of the command including the options available. Instead of asking your instructor about how to use a command, you should RTFM  Wikipedia. For details about protocols, packet/header formats, and even le for- mats, Wikipedia and other similar reference sites (or a search engine) is a good place to look.Chapter 2 Ubuntu Linux 2.1 What is Ubuntu Linux? Linux is an operating system based on Unix, one of the earlier multi-user operating systems developed in the 1970's and 1980's. Unix was originally a single operating sys- tem, but over time several commercial variants were developed. These Unix operating systems were particularly popular in the 1980's and 1990's, especially within academic and technology organisations. Some of the Internet applications and protocols were rst developed on Unix, and hence Unix-based computer systems have a strong link with computer networking. Today Unix operating systems are still used, mainly in servers and high-end worksta- tions. In the 1990's Linux appeared, a free operating system with Unix-like functionality (or at least a kernel for an operating system). In the 2000's, Linux also became popular in typical Unix domains of servers and workstations, and also has been growing in the desktop eld (however, in quantity of installs, Linux still does not compare with Microsoft Windows). As with the original Unix, there are many variants, or distributions of Linux, di ering in the applications and graphical environments they provide (e.g. RedHat, De- bian, Fedora, Ubuntu, Xandros). We will be using the Ubuntu Linux distribution. Ubuntu Linux is a free, open-source Unix-based operating system, that has been de- veloped mainly for desktop (and laptop) installations. The aim is to make a user-friendly Linux distribution. It is now one of the more popular Linux distributions. Ubuntu is installed on the Network Lab computers, and will be used extensively to demonstrate computer network operations in ITS 332. This document aims to give a quick introduc- tion to some of the most common operations that you will need during the course. 2.1.1 Why Not Microsoft Windows? Why use Ubuntu Linux, and not Microsoft Windows, especially since Windows is by far the most popular desktop operating system, and hence very popular with server systems? There are several reasons we will use be using Linux instead of Windows: 1. Linux is well-suited for learning of networking concepts: File: Steve/Courses/2011/S2/ITS332/Handouts/linux.tex, r2074 56 CHAPTER 2. UBUNTU LINUX (a) Linux has simple, yet powerful, operations for many networking tasks such as: changing an IP address, creating routing tables, testing network connectivity, inspecting trac recevied/sent, and so on. (b) Implementing and compiling simple client/server applications is straightfor- ward on Linux. (c) A Linux PC can easily be con gured as a router (all the PCs in the Network Lab have two interface cards). 2. Experience in Unix-based operating systems is important: Although Windows is the most commonly used operating system for desktops, Unix-based operating systems (including Linux) are common for network servers, network devices and embedded systems. For example, many routers, switches and specialised computer devices use Linux. 3. Ubuntu Linux is free, as are all the applications we use (and none of them are pirated) 2.2 Common Operations 2.2.1 Starting Ubuntu Linux When the computer boots, within the rst several seconds a program gives you the option to start Windows or Ubuntu. You should select Ubuntu, which will boot Ubuntu Linux. 2.2.2 User Accounts and Login Once Ubuntu has started you are presented with a login screen. You should login with the username/password provided in the class. Di erent users in Ubuntu have di erent privileges (e.g. ability to view or edit system les, view or edits other peoples les, change important operating system parameters). The user with the most privileges (that is, can do everything) is called root (sometimes also called super-user). The problem with logging in as root is that a simple typing mistake may delete the entire hard drive The user you login as is just a normal userlets refer to them as network. The user network has the ability to view and edit their own les in the directory /home/network, view most system les (that is almost all les on the hard disk, except those of other users) and view con guration options (such as IP address). You must always login as this normal user, and perform most operations as this normal user. However, sometimes during the lab classes it will be necessary to perform tasks that require more priveleges than the network user. For example, you require root privileges to install new software, change IP addresses and modify system les (such as con guration parameters for the web server). The network user has been con gured to allow them to temporarily gain the privileges of the root user for these tasks. You do this using the sudo command. Lets assume there is a command you need to execute in the command line shell (see Section 2.2.4). The command is:2.2. COMMON OPERATIONS 7 command parameter1 parameter2 However, you must execute this as root user (since as the normal user, you are not allowed). So you would actually run the command by preceding it with sudo: sudo command parameter1 parameter2 On the rst use of sudo you will be prompted for a passwordit is the password you logged in as network with. Then the command will execute. If you do not use sudo (and the command is privileged), the the command will not execute (usually returning an error like Permission denied). Note that sudo should only be used for running command line applications as root. To run graphical applications as root (such as gedit or wireshark) use gksudo. The method is the same as with sudo, except the password will be prompted via a graphical window. A nal note on the root user. As we said before, you can potentially delete the entire hard drive. As we give you the access to perform operations as root user, you must act responsibly. Anyone caught using these privilelges incorrectly will be punished. This includes deleting system or other users les, copying other users les, changing param- eters of the operating system and installing software which is not needed for the class. Punishment may range from loss of marks for the lab class, to more severe punishment in line with that for cheating (e.g. zero for the course). 2.2.3 Window System Ubuntu has a graphical windows system like most other operating systems. It is quite intuitive. The main functions can be obtained from the Applications, Places and System menus from the top left corner of the screen. Although many of the networking operations can be performed using the graphical tools, almost all have a command line interface. 2.2.4 Command Line Shell Like almost all Unix-based systems, operations can be performed via a command line shell or terminal. In Ubuntu, to start a new terminal select Accessories and then Terminal 1 from the Applications menu . Some of the more common operations you will use include: cd change directory ls list the les in the directory man view the manual (help) for a command cp copy a le mv move/rename a le 1 You can also access a terminal, or tty1 using Ctrl-Alt-F1. This doesn't use the windowing system. To switch back to the windowing system use Ctrl-Alt-F7. tty2 through to tty6 can also be accessed using F2 through to F6 instead of F1.8 CHAPTER 2. UBUNTU LINUX rm remove/delete a le mkdir make/create a directory rmdir remove/delete a directory less display a le cat display a le echo print text to the screen (standard output) pwd display the name of the present/current working directory wc display the number of lines, words and bytes in a le redirect output to le redirect le to input ps list the current processes running & place process to be started into the background Ctrl-c stop (kill) the currently active process Ctrl-z suspend the currently active process bg place the the just suspended process into the background fg bring the background process to the foreground An example of using some of these commands is shown below. pwd /home/sgordon mkdir test cd test pwd /home/sgordon/test nano example.txt use the text editor to write 'Hello, my name is Steve.' cat example.txt Hello, my name is Steve. ls example.txt ls -l total 4 -rw-rr 1 sgordon sgordon 25 2009-11-06 16:34 example.txt wc example.txt 1 5 25 example.txt cp example.txt copy-of-example.txt ls copy-of-example.txt example.txt rm example.txt ls copy-of-example.txt mv copy-of-example.txt example.txt2.3. ADVANCED OPERATIONS 9 ls example.txt rm example.txt ls ls -al total 12 drwxr-xr-x 2 sgordon sgordon 4096 2009-11-06 16:36 . drwxr-xr-x 75 sgordon sgordon 8192 2009-11-06 16:33 .. echo 'Hello' Hello echo 'Hello' another-example.txt cat another-example.txt Hello wc another-example.txt 1 1 6 another-example.txt rm another-example.txt ls cd .. rmdir test We will introduce network-speci c operations during the labs. For reference, some networking commands are listed in Appendix C. 2.2.5 Text and Source Code Editing Although everyone has their own preferences about text and source code editors, two standard editors in Ubuntu that are recommended are: gedit A GUI based editor, with syntax highlighting. Can be opened from Accessories then Text Editor from the Applications directory, otehrwise executing gedit from the command line. nano A command line based editor. Provides a quick and simple way to edit a le. The main commands available to you once in nano are listed at the bottom of the display. Thecharacter means the Ctrl key. To save a le use Ctrl-o. To exit, where you are also prompted if you want to save a le, use Ctrl-x. 2.2.6 Applications Some of the applications that we may use during the labs include: Wireshark Capture and view trac on a network interface. Command: wireshark. Also available via the GUI menus. Apache Web Server A common web server. 2.3 Advanced Operations 2.3.1 Installing Software Although it should not be required during the labs, (and you must not install any software unless asked to by the instructor), Ubuntu has a simple command line interface to installing software, using apt-get:10 CHAPTER 2. UBUNTU LINUX apt-get install NAME where NAME is the name of the software package you want to install. Of course, you need administrator privileges to install software (hint: sudo). 2.3.2 Compiling C Code You can use the GNU C Compiler to compile C code: gcc -o EXECUTABLE FILE.c while compile FILE.c and create the executable program named EXECUTABLE. 2.4 Tasks Task 2.1. Follow the demonstration by the instructor to learn basic Linux commands and operations.

Advise: Why You Wasting Money in Costly SEO Tools, Use World's Best Free SEO Tool Ubersuggest.