

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This lab assignment was submitted to Sir Nauman Shamim at Pakistan Institute of Engineering and Applied Sciences, Islamabad (PIEAS) for Computer Networks course. It includes: Data, Communication, Application, Layer, Processing, Communication, Input, Pass, Display
Typology: Exercises
1 / 2
This page cannot be seen from the preview
Don't miss anything!


Date: 3/9/ About this lab The objective of this lab is to understand the working of inter layer communication; understand its purpose and usefulness. During this lab you will analyze a real life system, will structure it as a multilayer function, and will implement it in C/C++ or Java, you have to submit a report as specified at the end of this document. You are provided with a client server program which simply connects a client to a server and is able to send a character array of 50 bytes, we will try to develop a layered communication architecture with the help of this code, first we will define our layers and their functionality , then we will define a problem and a solution, after doing that we will distribute its functionality over multiple layer. Layers a. Application Layer. b. Processing c. Communication Layer (We have discussed the working of these layers already) Hello Problem User sends a hello message and server displays it, for our interlayer communication we call hello message as our packet to be sent, application layer will receive input from user, processing layer will add extra information on it if required such as senders name, communication layer determines how to take message to the server (socket). The overall task is divided in following pieces Application layer
Each layer has at least two service primitives, we define them as Layer_primitive(parameter), application layer primitives are app_send(char data[], int length, Address) app_recive(char data[],int length,Address) Task‐ 1 Define complete service primitives for all layers in c/c++, try to send hello message using these primitives, at this point implement it as one way communication i.e. client will send and server will receive. Taks‐ 2 Extend task one and define hellox message where x=1,2,3,4. .. , each hellox message will have a meaning that you should also define, both client and server should know these messages, in this scenario , client will send only hello1 or hello2 or hellox message and server will display the message corresponding to that hello message Taks‐ 3 Extend task‐ 2 and add error processing and error adding logic at the processing layer, to add error simply insert zeros in message, to make it random use rand function Task‐ 4 Select a real life communication system, like traffic system, post system, working of an office environment, working of machine, execution of a program, any distributed application e.g. web, or conceive a new system, decompose its functionality and define service primitives and pseudo code for logic each layer. Submission A report explaining the system you selected, the architecture you defined, brief explanation of the classes you defined and flow of the data from top layer in sender to the top layer in receiver. Also provide answers to the questions given below. If you have completed the lab try to answer these questions 1 ‐ Was the system already working in layers? If your answer is yes don’t answer the next question 2 ‐ Is there any gain in terms of cost , complexity, efficiency , flexibility or dependency of the system if its functionality is multilayered (explain briefly) 3 ‐ Can there be more than one service primitives? 4 ‐ Can layered architecture wok for multiple job requests from different clients at the same time, (parallelism) 5 ‐ Your comments regarding this lab exercise?