Wednesday, November 28, 2012

Homework has been marked

You can find it in the usual place. Results are not great, but there is a slight improvement compared to our previous homework.

This time the questions' goal was for you to go the extra mile. As only the foundations of sliding window protocols were presented in the classroom and I expected you to at least read the links provided before being able of answering the questions. Some of you did good but again, I am worried that others did not.

If we take into account that you could use any source of information and that there was plenty of time (IMHO) I would expect better results. Please remember that I am available and you can stop by my office (with an appointment) even if your questions are about pending homework.

Do not let your doubts hanging in there till the day before the exam!

On-line content

There is plenty of useful information on the Internet and not all universities close their content. Prof. Jain teaches a similar subject at Washington University in St. Louis. But unlike me, he has audio recordings of his lectures synchronized with the slides. It is a good idea to practice another English accent too.

Of course, this is not a rare event. You can find many other great universities with course material freely available.

Monday, November 26, 2012

Sixth lab: UDP Sockets

This lab teaches you taht the use of UDP sockets is quite different from TCP. While the service offered is simpler, the programming details become a bit awkward. There are three main classes involved:
  1. InetAddress used mostly for DNS queries and for representing destination addresses.
  2. DatagramSocket as the endpoint of each datagram exchange.
  3. DatagramPacket as the data exchanged through DatagramSocket objects.
InetAddress methods getByName and getAllByName will be used to obtain the IP adresses of a host. And send and receive methods of DatagramSocket objects will be used for exchanging DatagramPacket objects between hosts. 

Remember that UDP has not the concept of a connection, so a server can receive datagrams belonging to different conversations (with different clients) through the same socket. 

There is not such a thing as a DatagramServerSocket.

Friday, November 23, 2012

Network Programming projects

I have created a list of the assigned projects. While a single project may be developed by two groups, I rather prefer to avoid overlapping whenever possible. You may find some students with a project that is not from the list, this is ok as far as you get my approval to your proposal.

Wednesday, November 21, 2012

Sliding window protocols

You may want to review the details about sliding window protocols and how they use the Go-back-N or the Selective-Repeat approaches to deal with transmission errors before answering the following questions:

  1. What is the preferred window size (N) for each case (Go-back-N and Selective-Repeat) for a case where propagation delay is D seconds and link rate is R bps?
  2. Why a too large window is a bad idea?
  3. What is the relationship with the maximum size of the transmission window (N) and the number of bits used for the sequence numbers on both, Go-back-N and Selective Repeat?
  4. What is the interest of the delay-bandwidth product when choosing the window size?

This homework is due for the next lab, November 27th. 

Sample Solution

Monday, November 19, 2012

Fifth lab: Multithreading in Java

This new lab is about how can we create a Java program that can handle more than one execution flow (or thread). Sometimes we need our program to do two things are once (ie. wait for more clients while handling the one client already connected) and multi-thread programs can do this.

The idea is that a given class that inherits from Thread class can re-write the public void run() method with the desired code for a thread. Then you can instantiate and start several objects to run the same code.

Thursday, November 15, 2012

Network Programming Projects

The list of projects available is as follows:

  • POP3 client: that shows the list of messages available in a mailbox.
  • Redundant transmission: UDP data is sent twice to different ports to improve reliability
  • HTTPdownloader: creates a copy on your local filesystem of a given webpage.
  • Netcat: It is java-based clone of the nc command we have used in the lab.
  • MyLittleBitly: It is a url shrinker and redirector server.
  • Enable Wifi: It controls the enabling and disabling of your home wireless router.
  • HTTPproxy: It is basic proxy server.
  • Binary file dropbox: It receives binary files from clients and stores them in the filesystem.
  • scannerPlus: It is a basic port-scanning tool (using it in Finland is a felony).
  • TCPsensor: It is a tool for checking whether servers are alive or not.
  • Webcam grabber: It is a tool that will download images from a public webcam every few minutes.
You can get a file with the specifications of all the projects from our file repository. Projects can be developed individually or by a group of two people. Public presentation during the last two lab sessions of the lab is a must if you want to opt to the highest mark, peer assessment will be used then.

As I mentioned in the classroom, I am open to other proposals from you regarding personal projects you have been doing. Please note you need me to agree on your proposal before proceeding with it.

Reminder

Remember: this Friday we will have test in the classroom reviewing Chapter 2 concepts (mostly HTTP, SMTP, POP3 and DNS). It will be a short test.

Monday, November 12, 2012

Fourth lab

This lab is about iterative (aka sequential) TCP servers. You will learn how you can create server using SeverSocket class and what the basic structure of a sequential server is.

Iterative servers are those that only handle one client at a time (a bit like a shop attendendant). If two (or more) clients connect to the same server, only one will be serviced while the remaining clients wait for the former to be serviced. Once the server finishes serving one client, it will proceed with the next one.

Thursday, November 8, 2012

Yet another use of DNS service

A recent vulnerability has brought my attention to another use of DNS service I have not heard about before. I hope you will enjoy reading about it. Public key cryptography will be covered in the subject soon.

Here you have some hands-on experience about this vulnerability.

Tuesday, November 6, 2012

Next class (#8)

We are starting Chapter 4: Transport Layer and we will start reviewing UDP protocol, which provides the connectionless service. You can have a look at sections 3.1, 3.2 & 3.3 of the book. Yes we know our chapter name and the book's do not match, sorry about that.

This week lab we've started to learn how to use TCP & UDP using java. Now you know how to create one or thousands of connections. Use your knowledge wisely :-)

See you on Friday.

Monday, November 5, 2012

Sockets Labs

We missed the lab last week due to change of schedule, but we are going to start this week with Chapter 3: The sockets interface in the lab (covered in sections 2.7 & 2.8 of the book). You can download the slides. Or you can view them online below: Java Network Programming

We are covering the following topics in the upcoming labs:

  1. TCP clients
  2. TCP servers
  3. Muliple threads
  4. UDP services
  5. Multiprotocol servers