Skip to content

rexwangcc/ComputerNetworks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Computer Networks Projects Collection

This repository is a collection of my Computer Networks projects as showed below. All projects are implemented in Java, although some of statistics charts are generated by R-lang.

Project 0 - Simulation of FIFO and Fair Queuing (FQ) Algorithms

A router output port can be modeled as a packet queue that is serviced using a certain service discipline, the simplest being first-in-first-out (FIFO). However, the FIFO discipline does not provide any throughput or delay guarantees that may be required in high-performance networks. Significant research and development has been done to rectify this problem by devising alternate service disciplines, collectively termed "Fair Queuing Disciplines" (algorithms). In fact, many commercial routers, such as Cisco's, now implement FQ-type algorithms. The aim of this project is to simulate and study FIFO queuing and two fair queuing algorithms, namely packet-by-packet round robin (RR) and deficit round robin (DRR), and compare their performance under different traffic arrivals.

** Instructions for running the codes **

How to run simulator:

Our simulator has only one ".java" file, when start to simulate, use "javac" command to compile this java file, and there will be several ".class", use" java" command to run the "simulator" class, and input M value, packets number and Start to start the simulation.

How to run graph generator:

The program plot.R is a graph generator written by R language’s ggplot2 engine. It reads in the outputs of our simulator, rebuilds the data structure and produces difference against different values of M, average latency against different values of M for each source. hat’s more, according to our several simulations, after selecting the normal quantiles, we plot 90% confidence interval in the graphs. To run the graph generator, use R and set work path and just run the plot.R script.

For more about this project, see Project Report and Project Requirement.

Project 1 - Using an Echo Application to Measure TCP Performance

  • Part I - Writing an Echo Client-Server Application

This part implements a client and a server that communicate over the network using TCP. The server is essentially an echo server, which simply echoes the message it receives from the client.

** Instructions for running the codes **

Client.java and Server.java are included in a package called "part I", they can be compiled with command: java Client.java java Server.java When we want to run the program, cd to the upper directory, and use: java part1.Client java part1.Server

Argument Specification:

When using client, and user wants to specify Server IP address and port number, just run the client with command arguments like (use whitespace between IP and port): java part1.Client 192.168.1.1 58669

  • Part II - Performing RTT and Throughput Measurements

This part extends the echo application implemented in part I to measure the round trip time (RTT) and throughput of the path connecting the client to the server.

** Instructions for running the codes **

Client2.java and Server2.java are included in a package called "part2", they can be compiled with command: javac Client2.java javac Server2.java When we want to run the program, cd to the upper directory, and use: java part2.Client2 java part2.Server2

Argument Specification:

When using Client2, it required you to input several arguments to finish the experiment:

  • Input Server IP address: port number like: pcvm2-19.utah.geniracks.net:2000
  • Input experiment type like: "rtt" or "tput" (without quotation mark and must be either rtt or tput)
  • Input delay number like: 0
  • Input number of probes (at least 10 times) like: 10
  • In another hand, when using Server2, it required you to appoint a port number to run on, like: 58669

For more about this project, see Project Report and Project Requirement.

Project 2 - Implementing Reliable Transport Protocols

This project mainly implements 3 different transport protocols in Java:

  • Stop-and-Wait
  • Go-Back-N
  • Selective Repeat

** Instructions for running the codes **

we created separate folders for each transport method. Set Go-Back-N as example, as main () function is included in Project.java, to compile, use javac Project.java. To start simulator, use java Project. The compilation processes of S&W and SR are very similar except cd in different directories.

Additionally, we produced a graph generator to produce statistical images to show our simulation results. This generator is made by R language and used ggplot2, lattice R packages to plot. To run this generator, it is important to revise the setwd function: setwd ("~/Google Drive/courses/Networks/PHW2/Graph Generator") to your own workspace and copy data files to the same directory. The result images should be produced in the same directory.

For more about this project, see Project Report and Project Requirement.

Project 3 - Implementing Routing Protocols

This project mainly implements 3 different routing protocols in Java:

  • Basic Routing (Distance Vector)
  • Split Horizon with Poison Reverse

** Instructions for running the codes **

we created separate folders for each routing method. Set Basic DV Routing as example, since main() function in Project3.java, to compile, use javac *.java to compile all the java files. To start, use java Project3. The compilation process of the other routing algorithm is very similar except cd in different directories. (Also note that our default pseudorandom seed is 3322)

For more about this project, see Project Report.

About

Computer Networks Projects Collection

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors