P2P Programming Assignment

Size: px
Start display at page:

Download "P2P Programming Assignment"

Transcription

1 P2P Programming Assignment Overview This project is to implement a Peer-to-Peer (P2P) networking project similar to a simplified Napster. You will provide a centralized server to handle cataloging the files available on the network, and you will write a client program that interfaces both with the central server and with other clients to achieve P2P file transfers. The project is divided into two phases the first phase is due April 27th, and the second phase will be due May 7th. The package should include three parts and you must name each of the part as the example blow shows. Please pack your project named as 学号 _ 姓名.rar and submit to cn_tju@163.com before the deadline. If you submit your homework after the deadline, your score will be 50% off. Example: Phase 1: Establishing Client-Server Communications--Mandatory In this phase of the project, you will learn how to write programs that communicate through TCP sockets in C/C++ under Unix/Linux or Windows OS. For now you will ignore the portion of the P2P architecture that consists of communications between peers on the network your task is to establish communications between your client and the centralized server. In this project, you will be programming using sockets to build a P2P client. In centralized P2P networking architectures, a single server exists to maintain a database (it's not a real database, in fact, you just need store the data in memory) of all files that exist on the network. Whenever a user wishes to search for a file on the network, they simply submit a query to the centralized server. The server runs the query on its central database, and returns a list of locations (specified by IP address and port number) where the file can be found. The user can then select which of these locations they wish to download the file from, and a direct connection is opened with the peer that has the file. Your P2P client will need to interface with the P2P server which you are being provided with to carry out the following tasks: 1) Authenticate with the server (provide a username and encrypted password) 2) Send a list of files to the server that you wish to share with other users 3) Submit a search query to the server for a file you wish to download 4) Receive the search results, parse them, and output them to the user

2 5) Log out The protocol you will use for client-server communications is defined as follows. Each packet contains ASCII characters only, as with HTTP, so the messages being passed will be in human-readable format. The first four bytes of every packet contain a header value which determines the type of the packet. The data field varies for each type of packet (specifics listed below), but in general fields are split using the character # as a delimiter, and all packets are terminated with a \n character. Specific packet structures are as follows: LGIN is the 4-byte header value corresponding to a login/authentication packet. You can set the username/password combination to use for the project. Note you may not send passwords as plain text over the internet. You will be using a simple encryption algorithm in which you randomly choose an encryption key (a single digit number from 0-9), and subtract this number from the ASCII value of each character in the password. For example, if the password is pass and the encryption constant randomly chosen is 2, the encrypted password would be n_qq (consult an ASCII table to verify this). In order for the server to know how to decrypt the password, it must be given the encryption constant. Therefore, you would transmit 2n_qq as the encrypted password (note the encryption constant is transmitted as an ASCII character 2, not a 4-byte integer). If your encryption constant is randomly chosen to be 0, you would transmit 0pass. For 1, transmit 1o`rr, etc. Your client should choose the encryption constant randomly (from 0-9) each time it connects to the server. When the server receives a LGIN packet from a client, it will return one of two responses. If the username/password is invalid, or if the LGIN packet does not conform to the protocol format, an EROR (error) packet will be returned: Whenever the server receives a malformed packet of any kind, it will return an EROR packet as shown above. If your client receives an EROR packet from the server at any time, it should print out the error message, close the socket, and exit gracefully. If the login packet is received correctly, the server will instead generate a LRES (login response) packet containing a welcome message: Once the client has successfully logged in, it should be able to specify a list of files to the server that it wishes to share (the server will add these files to its database of available files on the network). Files are shared using a SHRE packet sent to the server: This packet can be of variable length it is terminated by a \n character. The first field, port specifies the port number on which your client will listen for incoming connections in case anyone wants to download these files from you. The port number should be transmitted as an ASCII representation of the number, not an integer representation. The remaining fields in the packet are the filenames that you wish to share. You can assume that no filename has a # character in it. Also, note that the server will only accept filenames of the format *.txt. You can also assume all files are located in the working directory (no path specification required). If the format of any of the filenames is incorrect, has the wrong file extension, or if the packet does not follow the correct format, the server will return an EROR packet as before. Otherwise, the server returns a SHOK packet: Once you re logged in, the server is stateless for each connection this means you can send multiple SHRE packets (and multiple SRCH packets, described below) in any order, and the server will respond correctly. Now that you have shared some files, you may search the P2P network for files that you wish to

3 download. To do this, your client should allow you to send SRCH packets to the server containing search strings: Search results are returned one at a time in SRES packets as follows: As usual, the IP and port fields are returned as ASCII string representations of the IP address and port number, respectively. When the last search result has been returned, the server will return an empty SRES packet: Tip: during testing if you would like to figure out what all the files available on the network are, you can search for txt to return a listing of all files (since all files must be of the format *.txt). Finally, when the user wishes to close the connection with the P2P server, a QUIT message is sent: Upon receiving the QUIT message, the server removes all shared files for that user from its DB. Phase1 Testing: The flow of your program for phase 1 is as outlined on page 1 of this spec (5 numbered steps). The program should ask the user for a username and password. The password should be encrypted, and a LGIN packet should be sent to the server. The client should then listen for a response from the server. If an LRES packet is received, the user should be prompted for a list of filenames to be shared. Only *.txt file names should be accepted. These files should be shared by sending the names to the server in a SHRE packet (or multiple SHRE packets), along with a port number that your client will listen on for incoming connections to download these files (this part will actually be implemented in phase 2). The client should then prompt the user for a search string, and send a SRCH packet to the server with the terms entered by the user. SRES packets should be parsed and outputted to the screen until no more arrive. The user should be given a choice of searching again or quitting if the user quits, a QUIT message should log the client out from the P2P network. Phase 2: Establishing Peer-Peer Communications In this phase you will extend your work from Phase 1 to create a fully functional P2P client. Now that you have a client which can connect to the central P2P directory server, share files, and search the network for other shared files, the last step is to add functionality to actually transfer files with other peers on the network. The primary function of a classic P2P network is to share and transfer files between clients (or peers) on the network. This is accomplished in much the same way as the communications with the server; one peer opens a connection with another one by creating a socket, calling connect(), and following a defined protocol to request and receive the wanted file. There are four main components to phase 2: 1) Add functionality to send ping messages over UDP and listen for echo responses, in order to estimate the round trip time to another peer.-- Mandatory 2) Add functionality to respond to ping messages from other peers.-- Mandatory 3) Add functionality to connect to another peer and download a file.--optional 4) Add functionality to make your peer a file server, so that other peers may connect and--optional download files from you. Furthermore, you will need to code your peer to allow concurrent execution of its various tasks. In other words, your user should be able to share, search, and download files at the same time that other users are downloading from you, or sending ping messages to you. More details on accomplishing this are included below.

4 The four components are described below in more detail. It is recommended for ease of testing that you implement the components in the order presented here, but you are free to do as you please. Next to each component title is an estimate of approximately how long you should budget to work on each component. You have a little over five weeks to work on this phase of the project, and if you leave it until the last week you will have trouble finishing. 1) Sending UDP PING Messages-- Mandatory In this component of phase 2, you will gain some experience with socket programming for UDP sockets. When your user submits a SRCH query and receives SRES messages in response, you will add functionality which will send a PING message to each of the peers listed in the responses. The reason for doing so is to ensure that the peer is in fact online. PING messages are fairly straightforward: Upon receiving a PING message, the server will echo back a PRES message to the same port from which you sent your PING message (this port will be assigned by the OS when you called sendto(), and it is also bound implicitly by the sendto() call so that you can receive from it using recvfrom()): Be aware, UDP does not guarantee delivery of packets. While you will most likely never drop a packet while just transmitting between two machines, you must code for this possibility (we will test for it). This is important because if your peer calls recvfrom() and waits for a packet which has been dropped, your program will hang indefinitely. There is a function called select() which will allow you to establish timeouts for your recvfrom() calls. 2) Responding to UDP PING Messages-- Mandatory As a complement to the functionality above, your peer will also need to be able to respond to incoming PING messages. This will require more concurrent programming, since you need to be able to do this in the background while simultaneously supporting all of the other functionalities described above. Your UDP ping server component will also need to have a specifically assigned port to listen on. 3) Downloading Files--Optional In phase 1, you wrote a program that allowed your user to connect to a P2P directory server, share some files, and search the shared file listings for available files. In this component of phase 2, you will give users the option to download files that are returned as search results. As usual, you will need to follow a specific protocol in order to accomplish successful transfers with other peers. You will use the information returned in the SRES message (IP, port) to open a connection with the peer who has the file. Then, you will need to identify yourself to the peer, in order to allow the other peer to decide whether or not to allow a transfer. You will do this with a simplified version of the LGIN message from phase 1: Note, you don t need to send a password to the other peers, just your username. The peer you ve connected to will respond with one of two messages. If your LGIN message was of the incorrect format you will receive an EROR message: Otherwise, if the peer decides to allow your connection, you will receive an LRES message: Assuming you receive an LRES message, you may proceed with the file request message: You will either receive an EROR message (if the file is not actually being shared, if the filename is incorrect, or if the GETF message was formed incorrectly), or you will receive a FILE message

5 containing the file itself: This message deserves some explanation. First, the four byte message type is simply FILE this is nothing new. After FILE, the message contains a 7-byte preamble, followed by the file contents, followed by the same exact preamble (repeated), followed by the newline character. The preamble is used as a means of delimiting the end of the file itself; since files can contain newline characters themselves, it s not possible to use \n as the delimiter for the end of the FILE message. Therefore, when transferring a file, each peer will randomly generate a preamble code which is seven characters in length, containing all 0 and 1 characters. This same preamble will be affixed to the beginning and the end of the file when transmitted as a FILE message. Therefore, when receiving a FILE message, you will need to read in the 7-byte preamble, store it, and scan for that pattern while reading in the file contents. When you find the preamble repeated, this will indicate that the entire file has been transmitted and that the following \n delimits the end of the FILE message. For this project, you can assume that we will only be transferring plain ASCII text files (with *.txt extensions, as in phase 1). When receiving a file, you should create a file with the specified name (the file name was contained in the SRES message, so you already know it) in your current working directory. If a file of the same name already exists in that directory, you may either prompt your user for the desired action or simply overwrite the old file (either choice is acceptable). The file contents transmitted to you should be written out to the newly created file, so that when the transmission is complete you have an exact replica of the file in your local directory. The file should NOT contain the preamble bytes, or the trailing \n character that delimited the end of the FILE message. Note that files may be of any size, and even though they will be carried in a single FILE message, this does not guarantee that you will be able to receive the entire FILE message in a single recv() call. As with receiving partial messages in phase 1, you ll need to continue calling recv()until you get the entire message. After you ve successfully received the file, your client should close the connection with the other peer. If you want to download multiple files from the same peer, you ll need to open a connection for each file request. 4) Adding File Server Functionality--Optional Your peer will also need to be able to transfer files to other peers who request them. The protocol for accomplishing this is exactly as outlined in the previous section, and will not be repeated here (you will need to generate all the server messages exactly as listed in section 1 above). Your server must handle all error conditions properly; if a peer sends you a malformed message, you should be able to recognize this and generate an appropriate EROR message. Make sure you test your server s ability to handle all types of errors, including when a connected peer crashes the connection (without a graceful socket close). A second pitfall to be careful of is the partial send. In phase 1, this wasn t much of a consideration (although you were instructed to code for it) because your messages were always relatively small. However, when sending a file your message may be arbitrarily long (100KB, 1MB, even 100MB files should all theoretically work). As a result, you will need to be careful to check that your server actually sends the entire message; this will most likely require multiple calls to send(). There is also another major consideration for this component. The user of your peer software should be able to share, search, and download files without interruption but at the same time

6 they should be able to concurrently support file download requests from other peers. Furthermore, your peer should be able to simultaneously handle incoming file requests from multiple peers. As a result, this will require learning a little about concurrent programming techniques. You probably have never written a program that requires concurrent execution. The basic idea is that since your program needs to do multiple things at the same time, it will need to spawn separate threads of execution (or child processes) in order to handle the various tasks simultaneously. There are two ways you can accomplish this using fork() to create child processes or by using the pthread library to create multiple threads within your main process. For details on how to use fork(). The basic structure of a concurrent server is as follows (incidentally, this is also the basic structure of the P2P server you ve been connecting to). The main execution thread creates a socket, binds to a port on which it will listen for incoming connections, and enters a loop. Inside the loop the server calls accept(), which blocks and waits for incoming connection requests. Upon receiving an incoming connection request, accept() will return a new socket descriptor which will be used for the new connection. The server then immediately spawns a separate process using fork() (or a separate thread using pthreads), and the new process/thread handles the new connection. Meanwhile, the main execution thread immediately returns to the top of the loop, calling accept() to allow another incoming connection. Inside the child process, communications with the connecting peer take place as described with the protocol above, and the file can be transferred. Once the file transfer is complete, the child process terminates. Your peer software will have several concurrent execution threads. Upon starting the program, the main thread will first connect and LGIN to the P2P server as in phase 1. Once connected, your peer should immediately spawn a separate process/thread to listen for incoming connections. Whenever another peer tries to connect to you, your server thread will need to spawn another process/thread to handle that incoming connection. Therefore, for this component alone you may have a large number of concurrent processes/threads at any time depending on how many users are connected to you simultaneously. One thing that you ll need to figure out is how to deliver information to the various child processes so that they know which files are actually being shared. In your main execution thread, your user will send SHRE messages to the server as in phase 1, to indicate the availability of files to other peers. Your file server component will also need to have this information, so that incoming GETF requests can be handled appropriately (if a user requests a file that you haven t explicitly shared, or a file that doesn t exist, you should return an EROR of some type). You will have a specific port number assigned to you for the file server component of your peer for this project. In phase 1, you were allowed to choose any arbitrary port number to put in the first field of your SHRE messages being sent to the server. In phase 2, the port number you place in the SHRE message will need to be the port number that your file server is actually listening on. Other peers will receive this port number in SRES messages, and will attempt to open up connections with you on that port. Phase2 Testing: The expected flow of your peer software is as follows. Upon running the peer, it should first attempt to connect and LGIN to the P2P server as in phase 1. Once connected, you should immediately spawn processes/threads to handle incoming PING requests and incoming file transfer connections. Your file server component should be capable of handling multiple

7 (theoretically unlimited) simultaneous connections therefore it will need to spawn a new child process/thread to handle each incoming connection. In your main thread, you will present a menu to the user and allow them to choose between sharing files, searching for files, or quitting. If they choose to share, the file server processes must have access to this information as well so that they know which files are available for incoming GETF requests and which are not to be transferred. If the user submits a search, SRES messages should be parsed and PING messages should be sent to each host (if a single host yields multiple search results, you may choose whether to PING that host once per file or once only). Estimates of the RTT to each host should be displayed with each search result. The user should then be given the option to download any of the files returned as search results. Your downloads do not have to run in the background if you don t want to implement this if a user chooses to download a file, you may wait until the file is received before returning control to them. NOTE: Your application should completely hide the underlying application layer protocol from the user. Messages should not be printed out in raw format they should always be parsed and interpreted, so that user-friendly messages can be generated. Furthermore, user input should never be required to be in the format of the protocol (in other words, a user should never have to input a message type such as SRCH or a # sign; your application needs to insert this data into the messages without the user s knowledge). As with phase 1, your project must be implemented in C/C++ under UNIX/Linux or Windows OS. Grading: Grades will be assigned based on the following criteria: Program Correctness and Functionality: 60% Code design & Program Structure: 10% Documentation: 30% Turn in: You must submit your report in Word document for the mandatory part, we will provide the Word template to you. In particular, you should describe the socket code in detail so that it is clear you understand what each line is for, and you also should describe how you decided to implement concurrency (processes, threads, how did you share information between them). You must also submit your electronically report and commented code to my before the deadline.

CS 118 Project Phase 2 P2P Networking

CS 118 Project Phase 2 P2P Networking CS 118 Project Phase 2 P2P Networking Due Monday, March 15 th at 11:59pm Boelter Hall 4428, Box D3/C4 and via Electronic Submission Overview In this phase you will extend your work from Phase 1 to create

More information

Overview. Exercise 0: Implementing a Client. Setup and Preparation

Overview. Exercise 0: Implementing a Client. Setup and Preparation Overview This Lab assignment is similar to the previous one, in that you will be implementing a simple clientserver protocol. There are several differences, however. This time you will use the SOCK_DGRAM

More information

CSCI 4210 Operating Systems CSCI 6140 Computer Operating Systems Homework 4 (document version 1.0) Network Programming using C

CSCI 4210 Operating Systems CSCI 6140 Computer Operating Systems Homework 4 (document version 1.0) Network Programming using C CSCI 4210 Operating Systems CSCI 6140 Computer Operating Systems Homework 4 (document version 1.0) Network Programming using C Overview This homework is due by 11:59:59 PM on Thursday, April 26, 2018.

More information

Lab 2: Threads and Processes

Lab 2: Threads and Processes CS333: Operating Systems Lab Lab 2: Threads and Processes Goal The goal of this lab is to get you comfortable with writing basic multi-process / multi-threaded applications, and understanding their performance.

More information

Overview. Exercise 0: Implementing a Client. Setup and Preparation

Overview. Exercise 0: Implementing a Client. Setup and Preparation Overview This Lab assignment is similar to the previous one, in that you will be implementing a simple client server protocol. There are several differences, however. This time you will use the SOCK_DGRAM

More information

Programming Assignment 3

Programming Assignment 3 UNIVERSITY OF NEBRASKA AT OMAHA Computer Science 3550 Section 002 Communication Networks Spring 2018 Programming Assignment 3 Introduction Having created a TCP client in programming assignment 2, it s

More information

Server algorithms and their design

Server algorithms and their design Server algorithms and their design slide 1 many ways that a client/server can be designed each different algorithm has various benefits and problems are able to classify these algorithms by looking at

More information

COMP/ELEC 429/556 Project 2: Reliable File Transfer Protocol

COMP/ELEC 429/556 Project 2: Reliable File Transfer Protocol COMP/ELEC 429/556 Project 2: Reliable File Transfer Protocol Assigned: Thu, 28 September Due: 11:55pm, Tue, 24 October 1 Description The objective of this project is to give you hands-on experience with

More information

OPEN BASE STATION ARCHITECTURE INITIATIVE

OPEN BASE STATION ARCHITECTURE INITIATIVE OPEN BASE STATION ARCHITECTURE INITIATIVE Conformance Test Specification Appendix H UDPCP Test Cases Version.00 Issue.00 (38) FOREWORD OBSAI description and specification documents are developed within

More information

The basic server algorithm. Server algorithms and their design. Problems with the simple server? Servers. overview ofaserver

The basic server algorithm. Server algorithms and their design. Problems with the simple server? Servers. overview ofaserver Server algorithms and their design slide 1 The basic server algorithm slide 2 many ways that a client/server can be designed overview ofaserver each different algorithm has various benefits and problems

More information

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition ELEC / COMP 177 Fall 2014 Some slides from Kurose and Ross, Computer Networking, 5 th Edition Project #1 Starts in one week Is your Linux environment all ready? Bring your laptop Work time after quick

More information

Peer to Peer Instant Messaging

Peer to Peer Instant Messaging Peer to Peer Instant Messaging Assignment in Computer Networks I, Department of Information Technology, Uppsala University. Overview In this assignment you will implement an instant messaging system that

More information

Introduction to computer networking

Introduction to computer networking Introduction to computer networking First part of the assignment Academic year 2017-2018 Abstract In this assignment, students will have to implement a client-server application using Java Sockets. The

More information

CS 450 Introduction to Networking Spring 2014 Homework Assignment 1 File Transfer and Data Bandwidth Analysis Tool

CS 450 Introduction to Networking Spring 2014 Homework Assignment 1 File Transfer and Data Bandwidth Analysis Tool CS 450 Introduction to Networking Spring 2014 Homework Assignment 1 File Transfer and Data Bandwidth Analysis Tool Due: Monday 17 February. Electronic copy due at 10:30 A.M., Optional paper copy may be

More information

Creating a Shell or Command Interperter Program CSCI411 Lab

Creating a Shell or Command Interperter Program CSCI411 Lab Creating a Shell or Command Interperter Program CSCI411 Lab Adapted from Linux Kernel Projects by Gary Nutt and Operating Systems by Tannenbaum Exercise Goal: You will learn how to write a LINUX shell

More information

Project 1: Snowcast Due: 11:59 PM, Sep 22, 2016

Project 1: Snowcast Due: 11:59 PM, Sep 22, 2016 CS168 Computer Networks Fonseca Project 1: Snowcast Due: 11:59 PM, Sep 22, 2016 Contents 1 Introduction 2 2 Protocol 2 2.1 Client to Server Commands................................ 2 2.2 Server to Client

More information

CS344/444 Spring 2007 Project 1 Instant Messaging Client and Server

CS344/444 Spring 2007 Project 1 Instant Messaging Client and Server CS344/444 Spring 2007 Project 1 Instant Messaging Client and Server Sandeep Sarat Andreas Terzis February 19, 2007 1 Introduction For your first project you will have to write a client and a server for

More information

CS 455 / Computer Networks Fall Using an Echo Application to Measure TCP Performance Due: THURSDAY, October 2, 2014 (1pm)

CS 455 / Computer Networks Fall Using an Echo Application to Measure TCP Performance Due: THURSDAY, October 2, 2014 (1pm) CS 455 / 655 - Computer Networks Fall 2014 Using an Echo Application to Measure TCP Performance Due: THURSDAY, October 2, 2014 (1pm) [See posted grading criteria.] To be completed individually. In this

More information

The Specification of Project-1

The Specification of Project-1 The Specification of Project-1 EE122 Introduction to Communication Networks, Fall 2002 Weidong Cui, Karthik Lakshminarayanan, Khian Hao Lim Revision : 1.23 1 Overview In this project, you will build a

More information

Project 2 Reliable Transport

Project 2 Reliable Transport Project 2 Reliable Transport UC Berkeley CS 168, Fall 2014 Version 1.0 Due: 11:59am (noon), November 2nd, 2014 In this project, you will build a simple reliable transport protocol, BEARS TP (BTP). Your

More information

TFTP and FTP Basics BUPT/QMUL

TFTP and FTP Basics BUPT/QMUL TFTP and FTP Basics BUPT/QMUL 2017-04-24 Agenda File transfer and access TFTP (Trivial File Transfer Protocol) FTP (File Transfer Protocol) NFS (Network File System) 2 File Transfer And Access 3 File Transfer

More information

Interprocess Communication Mechanisms

Interprocess Communication Mechanisms Interprocess Communication 1 Interprocess Communication Mechanisms shared storage These mechanisms have already been covered. examples: shared virtual memory shared files processes must agree on a name

More information

shared storage These mechanisms have already been covered. examples: shared virtual memory message based signals

shared storage These mechanisms have already been covered. examples: shared virtual memory message based signals Interprocess Communication 1 Interprocess Communication Mechanisms shared storage These mechanisms have already been covered. examples: shared virtual memory shared files processes must agree on a name

More information

Installation & Configuration Guide Version 1.6

Installation & Configuration Guide Version 1.6 TekConSer Installation & Configuration Guide Version 1.6 Document Revision 2.0 http://www.kaplansoft.com/ TekConSer is built by Yasin KAPLAN Read Readme.txt for last minute changes and updates which can

More information

Memory-Mapped Files. generic interface: vaddr mmap(file descriptor,fileoffset,length) munmap(vaddr,length)

Memory-Mapped Files. generic interface: vaddr mmap(file descriptor,fileoffset,length) munmap(vaddr,length) File Systems 38 Memory-Mapped Files generic interface: vaddr mmap(file descriptor,fileoffset,length) munmap(vaddr,length) mmap call returns the virtual address to which the file is mapped munmap call unmaps

More information

ACS 5.x: LDAP Server Configuration Example

ACS 5.x: LDAP Server Configuration Example ACS 5.x: LDAP Server Configuration Example Document ID: 113473 Contents Introduction Prerequisites Requirements Components Used Conventions Background Information Directory Service Authentication Using

More information

The Client Server Model and Software Design

The Client Server Model and Software Design The Client Server Model and Software Design Prof. Chuan-Ming Liu Computer Science and Information Engineering National Taipei University of Technology Taipei, TAIWAN MCSE Lab, NTUT, TAIWAN 1 Introduction

More information

CSMC 412. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala Set 2. September 15 CMSC417 Set 2 1

CSMC 412. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala Set 2. September 15 CMSC417 Set 2 1 CSMC 412 Computer Networks Prof. Ashok K Agrawala 2015 Ashok Agrawala Set 2 September 15 CMSC417 Set 2 1 Contents Client-server paradigm End systems Clients and servers Sockets Socket abstraction Socket

More information

CS519: Computer Networks. Lecture 5, Part 1: Mar 3, 2004 Transport: UDP/TCP demux and flow control / sequencing

CS519: Computer Networks. Lecture 5, Part 1: Mar 3, 2004 Transport: UDP/TCP demux and flow control / sequencing : Computer Networks Lecture 5, Part 1: Mar 3, 2004 Transport: UDP/TCP demux and flow control / sequencing Recall our protocol layers... ... and our protocol graph IP gets the packet to the host Really

More information

Job Reference Guide. SLAMD Distributed Load Generation Engine. Version 1.8.1

Job Reference Guide. SLAMD Distributed Load Generation Engine. Version 1.8.1 Job Reference Guide SLAMD Distributed Load Generation Engine Version 1.8.1 December 2004 Contents 1. Introduction...3 2. The Utility Jobs...4 3. The LDAP Search Jobs...11 4. The LDAP Authentication Jobs...22

More information

COMS3200/7201 Computer Networks 1 (Version 1.0)

COMS3200/7201 Computer Networks 1 (Version 1.0) COMS3200/7201 Computer Networks 1 (Version 1.0) Assignment 3 Due 8pm Monday 29 th May 2017. V1 draft (hopefully final) Note that the assignment has three parts Part A, B & C, each worth 50 marks. Total

More information

CSCI 466 Midterm Networks Fall 2013

CSCI 466 Midterm Networks Fall 2013 CSCI 466 Midterm Networks Fall 2013 Name: This exam consists of 6 problems on the following 7 pages. You may use your single-sided hand-written 8 ½ x 11 note sheet and a calculator during the exam. No

More information

Kea Messages Manual. Kea Messages Manual

Kea Messages Manual. Kea Messages Manual Kea Messages Manual i Kea Messages Manual Kea Messages Manual ii Copyright 2011-2015 Internet Systems Consortium, Inc. Kea Messages Manual iii Contents 1 Introduction 1 2 Kea Log Messages 2 2.1 ALLOC Module....................................................

More information

IPv4 and ipv6 INTEROPERABILITY

IPv4 and ipv6 INTEROPERABILITY IT2351-NPM/UNIT-4/ 1 IPv4 and ipv6 INTEROPERABILITY Till the time, IPv6 is established all over the world, there is a need for one to host dual stacks that is both IPv4 and IPv6 are running concurrently

More information

CIS 505: Software Systems

CIS 505: Software Systems CIS 505: Software Systems Fall 2017 Assignment 3: Chat server Due on November 3rd, 2017, at 10:00pm EDT 1 Overview For this assignment, you will implement a simple replicated chat server that uses multicast

More information

CSE 461: Computer Networks John Zahorjan Justin Chan Rajalakshmi Nandkumar CJ Park

CSE 461: Computer Networks John Zahorjan Justin Chan Rajalakshmi Nandkumar CJ Park CSE 461: Computer Networks John Zahorjan zahorjan@cs Justin Chan jucha@cs Rajalakshmi Nandkumar rajaln@cs CJ Park cjparkuw@cs Course Staff Grading Assignments/Projects/Homeworks: 55% Midterm: 15% Final:

More information

Internet Technology. 06. Exam 1 Review Paul Krzyzanowski. Rutgers University. Spring 2016

Internet Technology. 06. Exam 1 Review Paul Krzyzanowski. Rutgers University. Spring 2016 Internet Technology 06. Exam 1 Review Paul Krzyzanowski Rutgers University Spring 2016 March 2, 2016 2016 Paul Krzyzanowski 1 Question 1 Defend or contradict this statement: for maximum efficiency, at

More information

COMP 321: Introduction to Computer Systems

COMP 321: Introduction to Computer Systems Assigned: 3/29/18, Due: 4/19/18 Important: This project may be done individually or in pairs. Be sure to carefully read the course policies for assignments (including the honor code policy) on the assignments

More information

Internet Technology 3/2/2016

Internet Technology 3/2/2016 Question 1 Defend or contradict this statement: for maximum efficiency, at the expense of reliability, an application should bypass TCP or UDP and use IP directly for communication. Internet Technology

More information

Kea Messages Manual. Kea Messages Manual

Kea Messages Manual. Kea Messages Manual Kea Messages Manual i Kea Messages Manual Kea Messages Manual ii Copyright 2011-2018 Internet Systems Consortium, Inc. ("ISC") Kea Messages Manual iii Contents 1 Introduction 1 2 Kea Log Messages 2 2.1

More information

Server Edition USER MANUAL. For Mac OS X

Server Edition USER MANUAL. For Mac OS X Server Edition USER MANUAL For Mac OS X Copyright Notice & Proprietary Information Redstor Limited, 2016. All rights reserved. Trademarks - Mac, Leopard, Snow Leopard, Lion and Mountain Lion are registered

More information

Configuration Manager

Configuration Manager CHAPTER 7 This chapter describes how to perform routine Cisco VXC Manager configuration management tasks using the Administrator Console. It provides information on managing the configuration settings

More information

Contents: 1 Basic socket interfaces 3. 2 Servers 7. 3 Launching and Controlling Processes 9. 4 Daemonizing Command Line Programs 11

Contents: 1 Basic socket interfaces 3. 2 Servers 7. 3 Launching and Controlling Processes 9. 4 Daemonizing Command Line Programs 11 nclib Documentation Release 0.7.0 rhelmot Apr 19, 2018 Contents: 1 Basic socket interfaces 3 2 Servers 7 3 Launching and Controlling Processes 9 4 Daemonizing Command Line Programs 11 5 Indices and tables

More information

Barracuda Terminal Server Agent Debug Log Messages

Barracuda Terminal Server Agent Debug Log Messages Barracuda Terminal Server Agent Debug Log Messages The Barracuda TS Agent writes a debug log to help you monitor activity on your server and identify possible problems. Viewing the Debug Log To view the

More information

Operating Systems Design Exam 3 Review: Spring 2011

Operating Systems Design Exam 3 Review: Spring 2011 Operating Systems Design Exam 3 Review: Spring 2011 Paul Krzyzanowski pxk@cs.rutgers.edu 1 1. Why does an IP driver need to use ARP, the address resolution protocol? IP is a logical network. An IP address

More information

CHETTINAD COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF MCA QUESTION BANK UNIT 1

CHETTINAD COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF MCA QUESTION BANK UNIT 1 CHETTINAD COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF MCA QUESTION BANK SUBJECT: NETWORK PROGRAMMING/MC9241 YEAR/ SEM: II /I V 1 CCET UNIT 1 1. What are the steps involved in obtaining a shared

More information

CS354/CS350 Operating Systems Winter 2004

CS354/CS350 Operating Systems Winter 2004 CS354/CS350 Operating Systems Winter 2004 Assignment Three (March 14 VERSION) Design and Preliminary Testing Document Due: Tuesday March 23, 11:59 am Full Assignment Due: Tuesday March 30, 11:59 am 1 Nachos

More information

SCS3004 Networking Technologies Application Layer Protocols

SCS3004 Networking Technologies Application Layer Protocols SCS3004 Networking Technologies Application Layer Protocols Dr. Ajantha Atukorale University of Colombo School of Computing (UCSC) 2 TCP/IP Suit Applications and application-layer layer protocols Application:

More information

A Client-Server Exchange

A Client-Server Exchange Socket programming A Client-Server Exchange A server process and one or more client processes Server manages some resource. Server provides service by manipulating resource for clients. 1. Client sends

More information

Group-A Assignment No. 6

Group-A Assignment No. 6 Group-A Assignment No. 6 R N Oral Total Dated Sign (2) (5) (3) (10) Title : File Transfer using TCP Socket Problem Definition: Use Python for Socket Programming to connect two or more PCs to share a text

More information

Program Assignment 2

Program Assignment 2 Program Assignment 2 CMSC 417 Fall 2014 September 16, 2014 1 Deadline September 30, 2014. 2 Objective In this assignment you will write the server program which will communicate using sockets with the

More information

Configuring LDAP. Finding Feature Information

Configuring LDAP. Finding Feature Information This chapter describes how to configure the Lightweight Directory Access Protocol (LDAP) on Cisco NX-OS devices. This chapter includes the following sections: Finding Feature Information, page 1 Information

More information

Configuring Health Monitoring

Configuring Health Monitoring CHAPTER1 This chapter describes how to configure health monitoring on the ACE to track the state of a server by sending out probes. Also referred to as out-of-band health monitoring, the ACE verifies the

More information

Homework 1. Hadachi&Lind October 25, Deadline for doing homework is 3 weeks starting from now due date is:

Homework 1. Hadachi&Lind October 25, Deadline for doing homework is 3 weeks starting from now due date is: Homework 1 Hadachi&Lind October 25, 2017 Must Read: 1. Deadline for doing homework is 3 weeks starting from now 2017.10.25 due date is: 2017.11.15 5:59:59 EET 2. For any delay in submitting the homework

More information

Networks and distributed computing

Networks and distributed computing Networks and distributed computing Hardware reality lots of different manufacturers of NICs network card has a fixed MAC address, e.g. 00:01:03:1C:8A:2E send packet to MAC address (max size 1500 bytes)

More information

Configuring attack detection and prevention 1

Configuring attack detection and prevention 1 Contents Configuring attack detection and prevention 1 Overview 1 Attacks that the device can prevent 1 Single-packet attacks 1 Scanning attacks 2 Flood attacks 3 TCP fragment attack 4 Login DoS attack

More information

Project Manager User Manual

Project Manager User Manual Project Manager User Manual Overview Welcome to your new Project Manager application. The Project Managaer is implemented as a web site that interfaces to an SQL database where all of the project and time

More information

HTTP Server Application

HTTP Server Application 1 Introduction You are to design and develop a concurrent TCP server that implements the HTTP protocol in the form of what is commonly called a web server. This server will accept and process HEAD and

More information

FortiTester Handbook VERSION 2.5.0

FortiTester Handbook VERSION 2.5.0 FortiTester Handbook VERSION 2.5.0 FORTINET DOCUMENT LIBRARY http://docs.fortinet.com FORTINET VIDEO GUIDE http://video.fortinet.com FORTINET BLOG https://blog.fortinet.com CUSTOMER SERVICE & SUPPORT https://support.fortinet.com

More information

Figure 1: Graphical representation of a client-server application

Figure 1: Graphical representation of a client-server application CS/EE 145a : Networking Lab #1 http://www.its.caltech.edu/ eecs145/ Due: October 24, 2007 1 Introduction The development of network-based software has been around for many years. Since its conception,

More information

True Potential Client Site

True Potential Client Site True Potential Client Site New Login Process Including the iphone & ipad app process 1 P a g e Account Activation & New Login Process We re changing the way you log into your account on the True Potential

More information

Operating Omega ATS and Lynx ATS. QUOTE TRANSFER PROTOCOL (QTP) SPECIFICATION v 1.05

Operating Omega ATS and Lynx ATS. QUOTE TRANSFER PROTOCOL (QTP) SPECIFICATION v 1.05 Operating Omega ATS and Lynx ATS QUOTE TRANSFER PROTOCOL (QTP) SPECIFICATION v 1.05 Revision History Date Revision Description of Change April 15, 2016 1.00 Created April 27, 2016 1.01 Edits made to document.

More information

HP 830 Series PoE+ Unified Wired-WLAN Switch Switching Engine

HP 830 Series PoE+ Unified Wired-WLAN Switch Switching Engine HP 830 Series PoE+ Unified Wired-WLAN Switch Switching Engine Network Management and Monitoring Configuration Guide Part number: 5998-3936 Software version: 3308P26 Document version: 6W101-20130628 Legal

More information

Desktop & Laptop Edition

Desktop & Laptop Edition Desktop & Laptop Edition USER MANUAL For Mac OS X Copyright Notice & Proprietary Information Redstor Limited, 2016. All rights reserved. Trademarks - Mac, Leopard, Snow Leopard, Lion and Mountain Lion

More information

Reliable File Transfer

Reliable File Transfer Due date Wednesday, Mar 14, 11:59pm Reliable File Transfer CS 5565 Spring 2012, Project 2 This project is worth 100 points. You may form teams of up to two students for this project. You are not required

More information

COMP 4337/ Securing Wireless Networks Implementation Assignment (V1.0)

COMP 4337/ Securing Wireless Networks Implementation Assignment (V1.0) COMP 4337/9337 - Securing Wireless Networks Implementation Assignment (V1.0) April 28, 2016 Change Log a. Version 1.0 released on April 29th, 2016 Due Date: 30th May 2016, 11:59 pm Total Marks: 20 (towards

More information

PROGRAMMING ASSIGNMENTS 3 & 4 TAO

PROGRAMMING ASSIGNMENTS 3 & 4 TAO PROGRAMMING ASSIGNMENTS 3 & 4 TAO INTRODUCTION Create network programs using Socket APIs Language is not limited C, Python, Java, Your program will interact with the CSE3300 server Server is hosted at

More information

Configuring TACACS+ Information About TACACS+ Send document comments to CHAPTER

Configuring TACACS+ Information About TACACS+ Send document comments to CHAPTER 4 CHAPTER This chapter describes how to configure the Terminal Access Controller Access Control System Plus (TACACS+) protocol on NX-OS devices. This chapter includes the following sections: Information

More information

DISCLAIMER COPYRIGHT List of Trademarks

DISCLAIMER COPYRIGHT List of Trademarks DISCLAIMER This documentation is provided for reference purposes only. While efforts were made to verify the completeness and accuracy of the information contained in this documentation, this documentation

More information

Internet Control Message Protocol

Internet Control Message Protocol Internet Control Message Protocol The Internet Control Message Protocol is used by routers and hosts to exchange control information, and to inquire about the state and configuration of routers and hosts.

More information

Software Update C.09.xx Release Notes for the HP Procurve Switches 1600M, 2400M, 2424M, 4000M, and 8000M

Software Update C.09.xx Release Notes for the HP Procurve Switches 1600M, 2400M, 2424M, 4000M, and 8000M Software Update C.09.xx Release Notes for the HP Procurve Switches 1600M, 2400M, 2424M, 4000M, and 8000M Topics: TACACS+ Authentication for Centralized Control of Switch Access Security (page 7) CDP (page

More information

Programming Assignment 1

Programming Assignment 1 CMSC 417 Computer Networks Spring 2017 Programming Assignment 1 Assigned: February 3 Due: February 10, 11:59:59 PM. 1 Description In this assignment, you will write a UDP client and server to run a simplified

More information

Managing External Identity Sources

Managing External Identity Sources CHAPTER 5 The Cisco Identity Services Engine (Cisco ISE) integrates with external identity sources to validate credentials in user authentication functions, and to retrieve group information and other

More information

Perceptive Matching Engine

Perceptive Matching Engine Perceptive Matching Engine Advanced Design and Setup Guide Version: 1.0.x Written by: Product Development, R&D Date: January 2018 2018 Hyland Software, Inc. and its affiliates. Table of Contents Overview...

More information

Programming Standards: You must conform to good programming/documentation standards. Some specifics:

Programming Standards: You must conform to good programming/documentation standards. Some specifics: CS3114 (Spring 2011) PROGRAMMING ASSIGNMENT #3 Due Thursday, April 7 @ 11:00 PM for 100 points Early bonus date: Wednesday, April 6 @ 11:00 PM for a 10 point bonus Initial Schedule due Thursday, March

More information

Development of reliable protocol Sliding window protocols. C = channel capacity in bps I = interrupt/service time + propagation delay

Development of reliable protocol Sliding window protocols. C = channel capacity in bps I = interrupt/service time + propagation delay Outline Development of reliable protocol Sliding window protocols Go-Back-N, Selective Repeat Protocol performance Sockets, UDP, TCP, and IP UDP operation TCP operation connection management flow control

More information

CS 326: Operating Systems. Networking. Lecture 17

CS 326: Operating Systems. Networking. Lecture 17 CS 326: Operating Systems Networking Lecture 17 Today s Schedule Project 3 Overview, Q&A Networking Basics Messaging 4/23/18 CS 326: Operating Systems 2 Today s Schedule Project 3 Overview, Q&A Networking

More information

Programming Assignment 1

Programming Assignment 1 CMSC 417 Computer Networks Fall 2017 Programming Assignment 1 Assigned: September 6 Due: September 14, 11:59:59 PM. 1 Description In this assignment, you will write a UDP client and server to run a simplified

More information

Pemrograman Jaringan Web Client Access PTIIK

Pemrograman Jaringan Web Client Access PTIIK Pemrograman Jaringan Web Client Access PTIIK - 2012 In This Chapter You'll learn how to : Download web pages Authenticate to a remote HTTP server Submit form data Handle errors Communicate with protocols

More information

Common JSON/RPC transport

Common JSON/RPC transport Version Date Author Description 0.1 2.3.2010 SV First draft. 0.2 4.3.2010 SV Feedback incorporated, various fixes throughout the document. 0.3 5.3.2010 SV Clarification about _Keepalive processing, changed

More information

Basic Reliable Transport Protocols

Basic Reliable Transport Protocols Basic Reliable Transport Protocols Do not be alarmed by the length of this guide. There are a lot of pictures. You ve seen in lecture that most of the networks we re dealing with are best-effort : they

More information

Table of Contents 1 AAA Overview AAA Configuration 2-1

Table of Contents 1 AAA Overview AAA Configuration 2-1 Table of Contents 1 AAA Overview 1-1 Introduction to AAA 1-1 Authentication 1-1 Authorization 1-1 Accounting 1-2 Introduction to ISP Domain 1-2 Introduction to AAA Services 1-2 Introduction to RADIUS 1-2

More information

CSCI 4210 Operating Systems CSCI 6140 Computer Operating Systems Homework 4 (document version 1.1) Sockets and Server Programming using C

CSCI 4210 Operating Systems CSCI 6140 Computer Operating Systems Homework 4 (document version 1.1) Sockets and Server Programming using C CSCI 4210 Operating Systems CSCI 6140 Computer Operating Systems Homework 4 (document version 1.1) Sockets and Server Programming using C Overview This homework is due by 11:59:59 PM on Monday, December

More information

Design and Implementation of A P2P Cooperative Proxy Cache System

Design and Implementation of A P2P Cooperative Proxy Cache System Design and Implementation of A PP Cooperative Proxy Cache System James Z. Wang Vipul Bhulawala Department of Computer Science Clemson University, Box 40974 Clemson, SC 94-0974, USA +1-84--778 {jzwang,

More information

Programming with TCP/IP. Ram Dantu

Programming with TCP/IP. Ram Dantu 1 Programming with TCP/IP Ram Dantu 2 Client Server Computing Although the Internet provides a basic communication service, the protocol software cannot initiate contact with, or accept contact from, a

More information

Computer Networks Prof. Ashok K. Agrawala

Computer Networks Prof. Ashok K. Agrawala CMSC417 Computer Networks Prof. Ashok K. Agrawala 2018Ashok Agrawala September 6, 2018 Fall 2018 Sept 6, 2018 1 Overview Client-server paradigm End systems Clients and servers Sockets Socket abstraction

More information

Configuring SSL. SSL Overview CHAPTER

Configuring SSL. SSL Overview CHAPTER 7 CHAPTER This topic describes the steps required to configure your ACE appliance as a virtual Secure Sockets Layer (SSL) server for SSL initiation or termination. The topics included in this section are:

More information

Configuring Switch-Based Authentication

Configuring Switch-Based Authentication CHAPTER 7 This chapter describes how to configure switch-based authentication on the switch. Unless otherwise noted, the term switch refers to a standalone switch and to a switch stack. This chapter consists

More information

Computer 2 App1. App3 API Library. App3. API Library. Local Clipboard

Computer 2 App1. App3 API Library. App3. API Library. Local Clipboard System Programming (MEEC/MEAer) Project Assignment 2016/2017 In this project the students will implement a simple distributed clipboard. Applications can copy and past to/from the distributed clipboard

More information

Company System Administrator (CSA) User Guide

Company System Administrator (CSA) User Guide BMO HARRIS ONLINE BANKING SM FOR SMALL BUSINESS Company System Administrator (CSA) User Guide Copyright 2011 BMO Harris Bank N.A. TABLE OF CONTENTS WELCOME... 1 Who should use this guide... 1 What it covers...

More information

Structured Streams: A New Transport Abstraction

Structured Streams: A New Transport Abstraction Structured Streams: A New Transport Abstraction Bryan Ford Computer Science and Artificial Intelligence Laboratory Massachusetts Institute of Technology ACM SIGCOMM, August 30, 2007 http://pdos.csail.mit.edu/uia/sst/

More information

Interprocess Communication

Interprocess Communication Interprocess Communication Nicola Dragoni Embedded Systems Engineering DTU Informatics 4.2 Characteristics, Sockets, Client-Server Communication: UDP vs TCP 4.4 Group (Multicast) Communication The Characteristics

More information

Moodle Tutorial. Tak Auyeung. April 5, 2006

Moodle Tutorial. Tak Auyeung. April 5, 2006 Moodle Tutorial Tak Auyeung April 5, 2006 1 Self Enrollment Moodle allows you to self enroll with courses. Depending on the class, you may or may not require a password. This section guides you through

More information

CSC 2209: CLOUD STORAGE FINAL PROJECT

CSC 2209: CLOUD STORAGE FINAL PROJECT CSC 2209: CLOUD STORAGE FINAL PROJECT DAVID SOLYMOSI AND JIMMY ZHU 1. High Level Overview We implemented a backup and sync service with a focus on minimizing network traffic at the cost of local storage

More information

TECHNICAL NOTE. Oracle Protocol Agent Overview. Version 2.5 TECN04_SG2.5_

TECHNICAL NOTE. Oracle Protocol Agent Overview. Version 2.5 TECN04_SG2.5_ Version 2.5 TECHNICAL NOTE Oracle Protocol Agent Overview Stonesoft Corp. Itälahdenkatu 22A, FIN-00210 Helsinki Finland Tel. +358 (9) 4767 11 Fax. +358 (9) 4767 1234 email: info@stonesoft.com Copyright

More information

Quick guide to the SmartSimple on-line portal (making an application)

Quick guide to the SmartSimple on-line portal (making an application) EPA Research Programme 2014-2020 Quick guide to the SmartSimple on-line portal (making an application) POWERED BY SMARTSIMPLE Disclaimer Please read this document carefully prior to using the on-line portal.

More information

Assignment 1: Plz Tell Me My Password

Assignment 1: Plz Tell Me My Password Assignment 1: Plz Tell Me My Password Part I Due: 11:59 pm, September 23, 2013 Part II Due : 11:59 pm, September 27, 2013 1 Introduction The objective of this assignment is to gain experience in: socket

More information

CMSC 201 Spring 2017 Lab 01 Hello World

CMSC 201 Spring 2017 Lab 01 Hello World CMSC 201 Spring 2017 Lab 01 Hello World Assignment: Lab 01 Hello World Due Date: Sunday, February 5th by 8:59:59 PM Value: 10 points At UMBC, our General Lab (GL) system is designed to grant students the

More information

Project 1: Remote Method Invocation CSE 291 Spring 2016

Project 1: Remote Method Invocation CSE 291 Spring 2016 Project 1: Remote Method Invocation CSE 291 Spring 2016 Assigned: Tuesday, 5 April Due: Thursday, 28 April Overview In this project, you will implement a remote method invocation (RMI) library. RMI forwards

More information

CS 2604 Minor Project 1 DRAFT Fall 2000

CS 2604 Minor Project 1 DRAFT Fall 2000 RPN Calculator For this project, you will design and implement a simple integer calculator, which interprets reverse Polish notation (RPN) expressions. There is no graphical interface. Calculator input

More information