IST346: LabLast Update: 8/30/2010 1:52 PM
Lab:Operating System and Networking Basics
Overview
This lab will introduce and demonstrate the key components of modern computer operating systems. Throughout the lab we will discover the similarities and differences among the Windows and Linux operating systems.
Learning Objectives
Upon completion of this lab, you should be able to
- Recall the key components of modern-day operating systems and demonstrate those components by example.
- Appraise similarities and differences among the Windows and Linux operating systems.
- Understand the advantages and disadvantages of a CLI (command-line interface) and GUI (graphical user interface).
- Execute shell commands from the command line to perform basic operating systems tasks.
- Learn some networking basics and how to create and manage a virtual network.
Lab Breakdown
This lab consists of 4 parts:
- A walk-through demonstration of CLI and GUI operating systems shells.
- Understanding operating systems basics and the key components of all operating systems.
- Networking basics. Understanding TCP/IP and how computers communicate with each other via the network.
- On your own. Execute various commands on the Linux and Windows operating systems.
Requirements
Before you start this lab you will need each of the following items:
- A Windows computer with a Lab Manager compatible web browser. See for details. If you’re doing this in the iSchool computer labs, you’re all set.
- An account with access to vLab (iSchool’s instance of VMware vCenter Lab Manager)
- Your own deployed configuration of the IST346 base lab. Please review the lab prerequisite on your class website for details.
- From your IST346 Base Lab configuration, Power on or Resume these virtual machines:
- Centos5 (Centos Linux 5), logon as the user root with password SU2orange!
- Win7 (Windows 7 Enterprise), logon as the user Userwith password SU2orange!
IMPORTANT: You will not need the win2008 or winxp virtual machines. Please leave these powered off during the lab.
Part 1 – Shells: Command Line .vs. Graphical
What is a Shell?
A shell is the component of the Operating System that provides a user interface. You tell the operating what you’d like it to do by communicating with it through the shell. There are two basic types of shells:
- Command line Interface (CLI). This type of shell presents you with a simple prompt. To make the operating system do something, you simply type the command at the prompt. This is a simple concept, but to be effective you must know which command to type! CLI shells have a steep learning curve but are the best shells to use for automating tasks and mastering control of the inner workings of the operating system.
An example of getting IP Information from the Windows Command Prompt: - Graphical User Interface (GUI). This shell usesvisual metaphors to represent the operating system commands. The traditional GUI uses the WIMP metaphor – Windows, Icons, MenusPointers. Well developed GUI’s are easier to learn then their CLI counterparts, but are often “feature incomplete” (not every function is implemented via the GUI) and impossible to automate.
Example of getting similar IP information from the Windows Graphical Shell
Which shell is better?
Neither the GUI nor CLI is better than the other and modern day operating systems are equipped with both shells. The GUI Shell softens the learning curve and helps you deal with running several simultaneous tasks; while the CLI Shell helps you master the OS innards and automate a series of commands. Most power users are comfortable with the command-line; it gives you the most freedom and flexibility for expressing your needs to the operating system.
The Windows Shells
By default the Windows operating systems Load the GUI shell Windows Explorer (Later namedWindows Shell). This is the de-facto standard Shell for windows operating systems.
There are two main command-line shells for windows. First is Cmd.exe, a legacy shell from the pre-windows days, and a newer, and second a modernized shell known as WindowsPower shell. The future of the Windows CLI is Power Shell and it represents a major upgrade to the archaic and often poked fun at cmd.exe.
The Linux Shells
While the Windows world is very set-in stone when it comes to its shells, the open-source nature of Linux gives us many flavors and varieties of GUI and CLI shells.
The two most popular GUI shells for Linux are GNOME and KDE. Our install of Centos uses GNOME.
The most popular CLI shell for Linux is Bash (borne again shell). The Bash shell is available for many Unix-like operating systems, making it easier to transport your command-line experiences to other operating systems like Open Solairs, FreeBSD, and even Mac OSX uses the Bash shell underneath the hood.
You try it: Let’s make some shell Magic!
In yourWindowsvm:
- To bring up the command prompt: Start All Programs Accessories Command Prompt.
In yourLinuxvm:
- To bring up the bash prompt: Applications Accessories Terminal
Important!Leave both prompts open for further commands that you’ll attempt in the next few steps.
Questions
Q1.1 what is an Operating Systems Shell?
Q1.2 what are the advantages and drawbacks of a Command-Line Shell?
Q1.3 what are the advantages and drawbacks of a Graphical Shell?
Q1.4 which shell is the better shell CLI or GUI?
Q1.5 what is the name of the primary GUI shell in Windows?
Q1.6 what are the two major GUI shells in Linux?
Part 2 – Operating systems components by example
Key components of the modern day operating system
All modern day operating systems have support for the following features, among other things.
- Reporting CPU and Memory usage in real time.
- Multitasking (executing more than one process at a time) and process and memory management
- File system tasks: navigating the file system, file and folder management
- Network Management
We will explore how the Windows and Linux operating systems approach these features in the next section.
Watch this! The Windows and Linux (bash) Command Prompts
This video will demonstrate how to get around the Windows and Linux operating systems, explain the key components of the OS and demonstrate how to issue commands to the OS.
Watch Here:
(Note there is no audio with this video)
Questions
Q2.1what is the Windows equivalent of the Linux command pwd?
Q2.2 what symbol represents the current directory in Windows?
Q2.3 what is the path separator symbol in Linux?
Q2.4what Linux command displays the contents of a file?
Q2.5 what is the function of the pipe | operator?
Q2.6explain the purpose of the command more?
Part 3 – On Your Own
In this next part you will be tasked with executing various Windows and Linux commands on your own. Feel free to try them out inside your virtual machines. You may use the video from the previous section as well as this nice table of windows and linux commands to help you perform these tasks.
Questions
Q3.1 what command will display the files in the c:\windows\system32 folder.
Q3.2 there’s a lot of files in Q3.1 what is the command to show the files a page at a time?
Q3.3What is the Linux command to display the contents of the /etc/passwd file?
Q3.4 There’s a lot of entries in your answer to Q3.3. What command will locate the ftpline in the /etc/passwd file?
Part4 – Networking Basics
Hopefully at this point, you’re grasping the concepts behind operating systems virtualization and beginning to realize its benefits. Besides the coolness of running 2 (or more) different operating systems on the same computer, another really beneficial aspect of virtualization is the wide variety of ways you can simulate networks between the virtual computers.
Virtual Machines, Virtual Networks.
We live in a networked world, and many features found in today’s operating systems are unusable unless those systems are connected to a network. Just like in a computer lab where 20 computers are all connected with Ethernet cables or through a Wi-Fi access point, virtualized operating systems can connect to each other and to internet resources via virtual networking.
By default, most virtualization software, like VMware makes the task of virtual networking trivial and transparent to the user. To quote a cheesy infomercial, you just “set it and forget it.” In this default mode the guest virtual machine can access then same resources as the host computer can because the network used by the virtual machine is “bridged” to the physical network. The key advantage of a virtual network is it can live in isolation from other virtual networks:
Configuration “A”:
Configuration “B”:
Notice that both configurations have the same 4 virtual machines using identical IP addresses. For example centos5 uses IP address 192.168.80.11 in both configurations. This is an example of a virtual network.
The last column in both configurations, displays the External IP. This corresponds to the physical network. This is a real IP address, and therefore cannot be duplicated. If you scan the external IP column for both configurations you’ll notice the external IP is unique for all 8 virtual machines.
So in summary, a virtual IP address needs to only be unique inside the configuration, but theexternal IP needs to be globally unique.
Exploring the Internal Virtual Network Setup
In this part we will execute commands in the command prompts we opened to verify the virtual network setup. The first two commands we learn are ifconfig and ping. Ifconfig shows you the TCP/IP configuration of the network interface, and ping verifies connectivity between your computer and a remote host.
Are you There, Centos5? It’s me. Margaret.
In the Cenots5 virtual machine, from the Bash prompt:
- Type ifconfig to display the IP address of the guest (from inside the VM). In linux the primary Ethernet adapter is labeled eth0. You should see this output:
- Make a note of your centos5 IP address. You’ve probably already noticed this same information (and well as the mysterious “External IP”) is displayed in the lab manager configuration summary:
It’s good these values match, but it should also come as no surprise to you!
The best way to verify network connectivity between two computers on the internet is with the ping command. Ping sends network packets to another computer on the network, and records information about the response. If you can ping a computer, then you know there aren’t any problems with the network between you and it.
- In the command prompt, type ping –c 4 to ping SU’s main web server 4 times. If things are set-up correctly you should get 4 replies, like this:
Note: the -c 4 option tells the ping command to send 4 pings. Leave it out, and you’ll send a flurry of pings until the Ctrl+Break key combination is pressed.
IMPORTANT: If things didn’t work for you, and you’re getting a “response timeout or 100% packet loss” error messages, you might not have deployed your virtual machine configuration properly. You need to un-deploy your configuration and re-deploy and check “connect virtual networks to physical networks.” Consult your professor for assistance. - Let’s try pinging an invalid host, just to see what happens. Enter ping –c 4 1.2.3.4 (don’t freak out – it takes some time for the ping command to time-out).
Other Useful Network Tools: Nslookup and Tracert
Two other extremely useful networking commands are Nslookup and tracert. Nslookup is a tool for resolving names to IP addresses and it useful for troubleshooting naming problems on a network. tracert follows the packet route between two hosts and it useful for troubleshooting network path and routing issues on a network. Let’s explore their use below.
From the terminal window of the Centos5 virtual machine:
- Type nslookup to view the IP address which corresponds to the name You should see output like this:
The canonical name corresponds to the real name for this host. So nslookupof tells us the following information:
- IP Address is 128.230.18.35
- Real Name (canonical name) is cwis01.syr.edu
- The name is analias, or alternate name. - Now, type tracert to see the path network packets take from this host to (128.230.18.35) You should see output like this:
The Tracertcommand is telling you:
- it takes 5 “hops” to get from this computer to A hop occurs when network traffic passes, or routes from one network to another.
- There are 3 timings for each hop. These give you a measure of network latency or the time it takes the network traffic to pass from one hop to the next. - Next, let’s see what happens when we tracert an invalid or unreachable host. Type tracert 1.2.3.4 you should see output like this:
The * * * let you know the trace is timing out. This means network traffic cannot reach the destination. The last known / good hop is a helpful indicator for where the trace breaks down.
Networking on Windows 7
Next let’s switch back to your windows 7 virtual machine, and try these network commands, from the command prompt:
- Type ipconfig(yes, that’s ipconfig, not ifconfig) to display the IPv4 address of the guest. You should see:
- Let’s try and ping the centos5 virtual machine. Type ping –n 4 192.168.80.11 and you see:
If you get a reply, then you’ve confirmed the virtual machines in your configuration can “talk” to each other! Good! - Finally, in the command prompt, let’s tracert to see this:
Yes, the output is a little different, but the results are the same. 5 hops from here to .
Questions
Q3.1 What is the command to display the IP address of a windows computer?
Q3.2 What is the command to display the IP address of a linux computer?
Q3.3 Ping and tracert perform similar tasks. How are they different?
Q3.4 How many hops is it from your centos5 host to
Q3.5 Whatis the real name (canonical name) of
Q 3.6 What command can be used to test for network connectivity between two hosts?How about the network latency between two hosts?
This Concludes Our Lab
Turn off the lights!!!
When you’ve completed you lab, you should shutdown your virtual machine configuration. To do this click on your configuration, and select Shut Down
Shut Down thurs off each virtual machine gracefully. Try to avoid using Power Off which is like pulling the plug on a computer.
Page 1