main
February 3rd, 2012    

CISC 7332X 2172 W6
Main
Files
Syllabus
Links
Homeworks


Notes
0001

Networking PDFs
Intro
LAN Intro
Topologies
Comp Networks
Signals
Layers
Medium
Line Coding

DNS
E-Mail
Sockets
HTTP

MAC Layer
LLC Layer
Flow Ctrl
Ethernet
Token LAN
Multiplex
Err Detect
Err Correct
WAN Arch
Dist Sys
P2P
Security
Misc
Flash proxy

Midterm

Homeworks

You should EMAIL me homeworks, alex at theparticle dot com. Start email subject with "CISC 7332X HW# "

HW# 1 (due by 2nd class;): Email me your name, prefered email address, IM account (if any), major, and year.


HW# 2 (due by 3rd+1 class;): In any programming language of your choice (C prefered), write an NTP client. NTP is Network Time Protocol. Your program sends a UDP packet to the server. The server responds with a similarly formatted UDP packet with the current time. A public ntp server is: pool.ntp.org. This homework is part research part programming. Research part: Find the NTP specification, and determine what the UDP packet format is. Programming Part: Write a program to send the packet and recieve a response. When your program is executed, it will output the current time (recieved from NTP server) to standard output, in ``Wed Sep 24 07:29:23 EDT 2008'' format, (Note that since you're using UDP, not all packets will get through---so you might need to run the program a few times in order to get the correct time). You can lookup the format for the to/from message in ``NTP RFC'' (google for it)---the format is pretty simple. Your program should work similar to the unix utility ``ntptime''. Note that you should not use any "NTP" libraries---this homework is mostly about creating your own UDP packet and sending it via the regular socket API. [hw2 hint].


HW# 3 (due by 4th+1 class;): In any language, build a DNS client. This is similar to HW2 (feel free to reuse the code from hw2). Accept hostname as command line argument. Construct a UDP packet with hostname, and send it to a DNS server. Recieve a UDP packet as response, and display the IP address on standard output. Note, your program must not use any DNS libraries (such as `gethostbyname' functions, etc.). ie: In this homework, you are writing your own DNS library.


HW# 4 (due by 5th class;): In any language, write a program to send email. Do not use any SMTP libraries. (you can use DNS libraries). Given an e-mail address and the email text (read standard input?), your program will figure out what the MX for that e-mail is, and then connect directly to that machine to send the e-mail---all using a standard TCP connection.

HW# 5 (due by 6th class;): In any language, write programs to send a big (~1MB?) file from computer A to computer B using UDP. You will have two programs, a ``client'' (sending file), and ``server'' (recieving file). The client will chop up the file into 1000 byte chunks, package each chunk into a UDP packet, and send them as UDP packets. The server will get the packets, reconstruct them into the file, and save the file to disk. e.g. copy files over the network. Trick is to use UDP: your program needs to ensure packet sequencing and provide for flow control and retransmission (you'll probably want to do this via your own mini-header to each packet).

HW# 6 (due by Nth class;): In any language, write a program to cut a file into N (parameter) chunks. And another program to accept N-1 chunks of the file, and reconstruct the original file. Note that you cannot just make N copies of the original file---you need to use some sort of error-correction mechanism. e.g. Given 1 gig file, and a parameter N=20, your program will output 20 files, each ~50MB in size. You can erase one of those 50MB files. Call the program to reconstruct the original file, and you should get identical 1gig file back. I recommend using Hamming code, but feel free to invent your own.

HW# 7 (due by Nth class;): In any language/tool/utility of your choice (I suggest: bash, tar, gzip, gpg, rsync, scp, perl, etc.): Generate a public/private key pair. Password protect your private key. Write a script to archive your "home" folder into a file (e.g. backup-hostname.20111201.tar.gz), use your public key to encrypt it (e.g. backup-hostname.20111201.tar.gz.gpg), and transfer (sftp, with .ssh key login) the encrypted file along with the password protected private key (and public key) to two different computers (for homework, the two locations can be your computer). Submit the script to do this nightly (script and crontab line, etc.). Optional items: clean up script to run on the two backup computers: leave latest 5 files (ignore timestamp of last 5 days of files), and erase everything else that's older than 5 days (based on update time).



































© 2006, Particle