CSCI 257: Fundamental UNIX System Administration
Class Project for Spring 2003
The goal of the class project is to provide students with practical experience
to administer Linux installation and administration on a computer shared
with Windows.
Laboratory Assignment 8
ASSIGNMENT DUE: 12:00 NOON, April 9, 2003.
Assignment Description:
As a system administrator, it is necessary to understand networking. This
assignment will introduce you to some networking utilities. This assignment
also includes some archiving basics.
Goal:
The goal of this assignment is to introduce students
to the use of networking utilities available on Unix and to make sure everyone can do some basic archiving tasks.
Objectives:
- Learn ping
- Learn traceroute
- Learn nslookup
- Learn command line ftp
- Learn about ifconfig
- Learn about whois
- Learn about some configuration files.
- Learn about finger, who, and w (not really networking commands but they seemd to fit).
- Learn about archiving: tar, gzip, bzip2, md5sum
Expected Outcome:
- Students will follow the instructions in this lab.
- DO THIS LAB ON TIGLON (ect-unix.ecst.csuchico.edu) NOT ON YOUR LINUX BOX
- TURN-IN
- This lab with questions answered and YOUR NAME
Things to do on tiglon (ect-unix.ecst.csuchico.edu)
- (Why tiglon? It is hard to come up with a networking lab when not everyone has the Linux boxes networked).
- (On the other hand doing this stuff on tiglon kind of sucks because
then you can't learn about commands like netstat, route, dig).
- ping
- ping sends a small packet to a server which the server then sends back.
- ping lets you test things like if a host is alive.
- Typing ping www.google.com should respond with a message like "www.google.com is alive"
- Now try typing ping -s www.google.com (Type <Ctrl>-c to exit).
- The "-s" option gives you statistics.
- How many milliseconds does it take to ping www.google.com from tiglon?
- min________________________
- max________________________
- average_____________________
- How many packets were transmitted?______________________________
- How many packets were recieved?_________________________________
- (After typing <Ctrl>-c you will see ping statistics)
- Now try ping -s 132.241.82.24
- How many milliseconds does it take to ping 132.241.82.24 from tiglon?
- min________________________
- max________________________
- average_____________________
- What is the human readable host name of 132.241.82.24?__________________________________________
- nslookup
- nslookup is for looking up hostnames corresponding to ip addresses and vice versa
- There are two parts to the output
- The nameserver that responded, hostname and ip
- The hostname and ip address(es) of the host you wanted to lookup
- Try nslookup www.hotmail.com
- What is the name of the server that answered you?_________________________________________________
- What are the IP addresses of www.hotmail.com?___________________________________________________
___________________________________________________________________________________________
- Try nslookup www.csuchico.edu
- What is the name of the server?____________________________________________________
- What is the ip address?___________________________________________________________
- What is the alias name?___________________________________________________________
- What is the IP address of steriod (steriod is one of the schools Unix servers in case you didn't know)?
- ______________________________________________________________________________
- Try nslookup 207.46.134.222 to find out the domain name for this address
- What is the domain name?________________________________________________________
- ifconfig
- ifconfig is for configuring and finding out information about network interfaces.
- Type ifconfig -a to see information about all of tiglon's network interfaces
- Tiglon's ethernet card is called hme0 (on Linux this would be called eth0)
- What is the IP address of hme0?____________________________________
- What is the netmask?_____________________________________________
- What is the broadcast address?______________________________________
- The loopback interface has the IP address 127.0.0.1
- What is loopback interface name (like hme0 except something else)?_______________________
- traceroute
- traceroute displays the route between your computer and another
- Try traceroute www.whitehouse.gov
- How many computers/routers are between tiglon and www.whitehouse.gov?______________________
- Try traceroute www.shocking.com
- How many computers/routers are between tiglon and www.shocking.com?________________________
- Try traceroute www.csuchico.edu
- How many computers/routers are between tiglon and www.csuchico.edu?________________________
- Try traceroute www.sunset.net
- How many computers/routers are between tiglon and www.sunset.net?___________________________
- whois
- whois lets you query the whois database to find out who different domains are registered to.
- Try whois google.com
- This gave me two results (you will have to scroll up to find these results)
- GOOGLE.COM.SUCKS.FIND.CRACKZ.WITH.SEARCH.GULLI.COM
- GOOGLE.COM
- (One result is actually google and the other is some other funky domain).
- To find out information about google.com type whois =google.com (look near the top of the output)
- Who is the registrar for google.com?_______________________________________________
- What is the name server(s) for google.com?_________________________________________
_____________________________________________________________________________
- When was the creation date for google.com?_________________________________________
- What is the expiration date for google.com?_________________________________________
- Try whois csuchico.edu
- Who is the registrar for csuchico.edu?___________________________________________________
- When was the creation date for csuchico.edu?_____________________________________________
- When was it last updated?_____________________________________________________________
- /etc/services
- This file contains a list of network services and which port they are on
- The format of this file is "service-name port-number/protocol aliases"
- Look at this file to find what port the following services listen on
- ftp?__________________________
- ssh?__________________________
- telnet?________________________
- smtp?_________________________
- time?_________________________
- finger?________________________
- http?__________________________
- sftp?__________________________
- https?_________________________
- finger
- finger lets you find out information about a user on a particular host.
- finger requires a finger service to be running on the target machine to provide information.
- This service isn't used very much any more.
- (any service is a potential security hole so people don't run things they don't need).
- Try finger lisonbee@freeshell.org
- On my freeshell acount
- What is my default shell (give the full path)?__________________________________________
- What is the secret phrase in my .plan file?_____________________________________________
- who
- who tells you who is on the system
- run who on tiglon to see who is on the system
- What is in the column to the furthest right?_________________________________________________
- w
- w is a command similar to who except w also tells you what command a user is running
- What information does the third column provide?_________________________________________________
- What information does the right most column provide?____________________________________________
- ftp
- I am sure everyone is familar with ftp, most people don't know how to use it at the command line though.
- Type ftp to begin
- This will give you a prompt like ftp>
- Type help to see a list of available commands.
- Type open ftp.kernel.org to connect to a server.
- Login with username "anonymous" and use your email address as a password ( "me@email.com" ).
- Use ls to list files
- Change to the pub directory ( type "cd pub" ).
- Type ls to list the files.
- Download the README file ( type "get README" ).
- Now type quit to exit
- You have downloaded the README file, read it and find an email address for "comments on this site"
- What is the email address?___________________________________________________________
- Start ftp again, type ftp
- Type help to see a list of available commands, find out about a specific commnand by typing help <command name>
- What is put for?_______________________________________________________________
- What is mget for?______________________________________________________________
- What is lcd for?________________________________________________________________
- What is pwd for?_______________________________________________________________
- What is ascii for?_______________________________________________________________
- What is binary for?_____________________________________________________________
- Note that commands are similar for sftp (secure ftp).
- lynx
- lynx is a text only browser that you can run inside a terminal
- Text only browsers can be useful when you don't have X, otherwise they pretty much suck.
- Run lynx by typing lynx
- This will bring you the homepage for lynx
- Go to google by typing "g" and then "http://www.google.com"
- After being prompted if you want to accept cookies you should see google's homepage ( a little different than normal).
- Use the up and down arrows to switch between links and the "right arrow" or "enter" to follow a link.
- What key do you type in lynx for
- help?_________________________________________________________
- options?______________________________________________________
- /etc/resolv.conf
- resolv.conf contains a list of name servers for to consult for name resolution
- View /etc/resolv.conf
- How many name servers are listed?________________________________________________________
- What is the IP address of the first name server listed?__________________________________________
- /etc/hosts
- This file contains static host information. There is always at least one entry in this file.
- There are two name servers listed here on tiglon, what are their names? (hint: under DNS/NIS)
- _____________________________________________________________________________________
- _____________________________________________________________________________________
- What is the address for localhost?______________________________________________________________
- /etc/nsswitch.conf
- Gives the order of consultation for when doing lookups
- View this file and find the "hosts" entry.
- An entry such as "hosts: dns files" means the system will try a DNS server and then /etc/hosts to find an IP address
- An entry such as "hosts: files dns" means the system will try /etc/hosts and then DNS to find an IP address
- Which order is it on tiglon?______________________________________________________________
Basic Archiving (you can do these on tiglon or your Linux box)
- Give the command to create a tar file named some.tar which includes the contents of /etc
- __________________________________________________________________________________________
- (If you are on your Linux system actually create this file, otherwise create a tar of some directory in your home directory).
- Create a copy of some.tar called some2.tar
- Now compress some.tar with gzip
- And compress some2.tar with bzip2
- Give the file sizes (ls -l)
- some.tar.gz__________________________________________________
- some2.tar.bz2________________________________________________
- What commands would you use to uncompress these files?________________________________________________
________________________________________________________________________________________________
- Create a text file with anything in it.
- Create a copy of this text file and then run md5sum on both files to see if there md5sum's are the same or different.
- (type "md5sum file1 file2")
- Does chaging the name of a file change its md5sum? (Are they the same or different?)_________________
- What is an md5sum?______________________________________________________________________
_______________________________________________________________________________________