Вы находитесь на странице: 1из 7

University Of Dhaka

Data and Telecommunication


Lab Report - 1
Submitted by:
Abir Mahmud Pavel
Roll: 94
3rd year,1st semester

Submitted to:
Dr. Md. Abdur Razzaque
Submission date:
03 April, 2016

1
Emulator of Layered OSI Model

1 Introduction
The Open System Interconnection (OSI) model defines a networking framework to implement
protocols in seven layers. In the OSI model, control is passed from one layer to the next, starting
at the application layer in one station, and proceeding to the bottom layer, over the channel
to the next station and back up the hierarchy. The model is a product of the Open Systems
Interconnection project at the International Organization for Standardization (ISO), maintained
by the identification ISO/IEC 7498-1.

2 Theory
The OSI model takes the task of internetworking and divides that up into what is referred to as
a vertical stack that consists of the following 7 layers : (1) Physical Layer, (2) Data link Layer,
(3) Network Layer, (4) Transport Layer, (5) Session Layer, (6)Presentation Layer and lastly (7)
Application Layer. The data transmission starts at the 7th layer and then passes through every
layer upto 1st layer, which is Application layer. After each layer, a header is added, and a trailer
is also added after data link layer. This headers and trailer contain some additional information
about the data.
After the formatted data has passed through physical layer, it is transformed into an electro-
magnetic signal and then transported through a physical link.
When the signal reaches its destination, it is transformed back to formatted digital data after
reaching at layer 1 or physical layer. Then, again the formatted data passes through all the
layers in an opposite order compared to the previous ones upto application layer and the header
and in one case the trailer is removed from the data. So, by the time the data has reached in
application layer, its appropriate for the application and then made available to the user.

3 Approach
In order to emulate the Layered OSI model, we wrote two classes named Sender and Re-
ceiver. Sender class emulated the data transmission process through seven layers from the
sender device and Receiver class emulated the same, but in case of Receiver device. Lets break
the whole process down into three parts. First one is sending, second one is binary conversion
and the last one is receiving.

Sending: As an emulator of OSI model, we are using two text files as the sender and
receiver of data. Their will be 7 methods in the sender class. From the sender text file
each line will be read and then each method will add a header or in case of data link layer,
a header and a trailer, A temporary file will be created as a container of formatted data.
Binary conversion: When data is transmitted, it is of course in a digital format. So
to emulate this the formatted data will be converted to binary numbers and then this
temporary file will act as a transmission medium.
Receiving: This class will also have a method which will convert the binary data read
from the temporary file back to its formatted form, and 7 methods which will remove the

2
headers and trailers from the formatted data. So the data will again be in its original form
and then will be written in an output text file.

Figure: OSI Model

3
4 Result

Figure 01:Input text file

5 Discussion
As its being our first experiment;we have learnt how to tarnsfer data through 7 layers of OSI
model.We have also leart how to transform data into its binary form and again get back the text
form from it.

6 Conclusion
OSI model ensures the security of data by adding headers and trailers which contain additional
information about it. So this original model shows the very fundamental concept of data trans-
mission.

4
Figure 02:Binary text file

5
Figure 03:Output text file

6
References
[1] Data Communications and Networking By Behrouz A.Forouzan
[2] http://www.google.com
[3] http://www.wikipedia.org
[4] http://www.stackexchange.com

Вам также может понравиться