Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Courses Tutorials Jobs Practice Sign In

Data Structures Algorithms Interview Preparation Topic-wise Practice C++ Java Python Competitive Programming Machine Learning HTML SDE Sheet Puzzles GF

Table of Contents

Computer Network
Fundamentals

Computer Network Tutorials


Layers of OSI Model
Basics of Computer Networking
Difficulty Level : Easy ● Last Updated : 30 May, 2022
Goals of Networks
OSI stands for Open Systems Interconnec tion. It has been developed by ISO –

Types of Network Topology


‘International Organization for Standardization‘, in the year 1984. It is a 7 layer

Types of area networks – LAN, architecture with each layer having specific functionalit y to per form. All these 7

MAN and WAN layers work collaboratively to transmit the data from one person to another across

the globe. 

Introduction of Mobile Ad hoc


Network (MANET)
Prerequisite: Basic s of Computer Networking 

Types of MANET in Computer


Network
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy

Got It !

Start Your Coding Journey Now! Login Register

L’immigration vers le Canada


reprend. Les premières rondes
d'invitations ont été lancées.
Accès Canada
1. Physical L ayer (L ayer 1) :

The lowest layer of the OSI reference model is the physical layer. It is responsible
WHAT'S NEW
for the actual physical connection between the devices. The physical layer

contains information in the form of bits. It is responsible for transmitting individual


Content
bit s from one node to the next. When receiving data, this layer will get the signal
Improvement
received and conver t it into 0s and 1s and send them to the Data Link layer, which
League 2022
will put the frame back together.   View Details

Data Structures &


Algorithms- Self
Paced Course
View Details

Complete Interview
Preparation
View Details

The functions of the physical layer are as follows:  

1. Bit synchronization: The physical layer provides the synchronization of the bit s

by providing a clock. This clock controls both sender and receiver thus

providing synchronization at bit level.

2. Bit rate control: The Physical layer also defines the transmission rate i.e. the

number of bit s sent per second. L'immigration est


3. Physical topologies : Physical layer specifies the way in which the dif ferent,
relancée
devices/nodes are arranged in a network i.e. bus, star, or mesh topology.

4. Transmission mode : Physical layer also defines the way in which the data flows

between the two connected devices. The various transmission modes possible

are Simplex, half-duplex and full-duplex.

Avec L’ Entrée Express


Fédérale, Les
* Hub, Repeater, Modem, Cables are Physical Layer devices. Francophones Sont
** Network Layer, Data Link Layer, and Physical Layer are also known Avantagés Et C'est Du
Rapide

2. Data Link L ayer (DLL) (L ayer 2) :

The data link layer is responsible for the node-to-node deliver y of the message.

The main function of this layer is to make sure data transfer is error-free from one

node to another, over the physical layer. When a packet arrives in a network, it is MOST POPULAR IN
the responsibilit y of DLL to transmit it to the Host using it s M AC address.  COMPUTER NETWORKS
Data Link L ayer is divided into two sublayers:  

1. Logical Link Control (LLC)


UDP Server-Client implementation in
2. Media Access Control (M AC)
C

The packet received from the Network layer is fur ther divided into frames
Socket Programming in Python
depending on the frame size of NIC(Network Inter face Card). DLL also

Differences between IPv4 and IPv6


encapsulates Sender and Receiver ’s M AC address in the header. 

The Receiver ’s M AC address is obtained by placing an ARP(Address Resolution Caesar Cipher in Cryptography
Protocol) request onto the wire asking “ Who has that IP address? ” and the

destination host will reply with it s M AC address.  


Socket Programming in Java

The functions of the Data Link layer are :  

1. Framing : Framing is a function of the data link layer. It provides a way for a

sender to transmit a set of bit s that are meaningful to the receiver. This can be

accomplished by attaching special bit patterns to the beginning and end of the

frame.

2. Physical addressing : Af ter creating frames, the Data link layer adds physical

addresses (M AC address) of the sender and/or receiver in the header of each

frame.

3. Error control: Data link layer provides the mechanism of error control in which

it detect s and retransmit s damaged or lost frames.

4. Flow Control: The data rate must be constant on both sides else the data may

get corrupted thus, flow control coordinates the amount of data that can be
MOST VISITED IN GATE
CS
sent before receiving acknowledgement.

5. Access control: When a single communication channel is shared by multiple

devices, the M AC sub-layer of the data link layer helps to determine which

ACID Properties in DBMS


device has control over the channel at a given time.

Normal Forms in DBMS


* Packet in Data Link layer is referred to as Frame.
** Data Link layer is handled by the NIC (Network Interface Card) and Types of Operating Systems
*** Switch & Bridge are Data Link Layer devices.
Page Replacement Algorithms in
Operating Systems
3. Network L ayer (L ayer 3) :
Inter Process Communication (IPC)

The network layer work s for the transmission of data from one host to the other

located in dif ferent network s. It also takes care of packet routing i.e. selection of

the shor test path to transmit the packet, from the number of routes available. The

sender & receiver ’s IP addresses are placed in the header by the network layer. 

The functions of the Network layer are :  

1. Routing : The network layer protocols determine which route is suitable from

source to destination. This function of the network layer is known as routing.

2. Logical Addressing : In order to identif y each device on internetwork uniquely, L'immigration est
the network layer defines an addressing scheme. The sender & receiver ’s IP
relancée
addresses are placed in the header by the network layer. Such an address

distinguishes each device uniquely and universally.

* Segment in Network layer is referred to as Packet. Avec L’ Entrée Express


Fédérale, Les
Francophones Sont
Avantagés Et C'est Du
Rapide

** Network layer is implemented by networking devices such as routers

4. Transpor t L ayer (L ayer 4) :

The transpor t layer provides ser vices to the application layer and takes ser vices

from the network layer. The data in the transpor t layer is referred to as Segment s.

It is responsible for the End to End Deliver y of the complete message. The

transpor t layer also provides the acknowledgement of the successful data

transmission and re-transmit s the data if an error is found.

At sender ’s side : Transpor t layer receives the formatted data from the upper

layers, per forms Segmentation, and also implement s Flow & Error control to

ensure proper data transmission. It also adds Source and Destination por t

numbers in it s header and for wards the segmented data to the Network L ayer. 

Note : The sender needs to know the por t number associated with the

receiver ’s application. 

Generally, this destination por t number is configured, either by default or

manually. For example, when a web application makes a request to a web ser ver, it

t ypically uses por t number 80, because this is the default por t assigned to web

applications. Many applications have default por t s assigned. 

At receiver ’s side : Transpor t L ayer reads the por t number from it s header and

for wards the Data which it has received to the respective application. It also

per forms sequencing and reassembling of the segmented data. 

The functions of the transpor t layer are as follows:  

1. Segmentation and Reassembly: This layer accept s the message from the

(session) layer, break s the message into smaller unit s. Each of the segment s

produced has a header associated with it. The transpor t layer at the destination

station reassembles the message.

2. Ser vice Point Addressing : In order to deliver the message to the correct

process, the transpor t layer header includes a t ype of address called ser vice

point address or por t address. Thus by specif ying this address, the transpor t

layer makes sure that the message is delivered to the correct process.

The ser vices provided by the transpor t layer :  

A . Connec tion-Oriented Ser vice : It is a three-phase process that includes 

– Connection E stablishment 

– Data Transfer 

– Termination / disconnection 

In this t ype of transmission, the receiving device sends an acknowledgement, back

to the source af ter a packet or group of packet s is received. This t ype of

transmission is reliable and secure.

B. Connec tionless ser vice : It is a one-phase process and includes Data Transfer.

In this t ype of transmission, the receiver does not acknowledge receipt of a packet.

This approach allows for much faster communication between devices.

Connection-oriented ser vice is more reliable than connectionless Ser vice.

* Data in the Transpor t L ayer is called as Segments. 

** Transpor t layer is operated by the Operating System. It is a par t of the OS and

communicates with the Application L ayer by making system calls. 

Transpor t L ayer is called as Hear t of OSI model. 

5. Session L ayer (L ayer 5) :

This layer is responsible for the establishment of connection, maintenance of

sessions, authentication, and also ensures securit y. 

The functions of the session layer are :  

1. Session establishment, maintenance, and termination: The layer allows the

two processes to establish, use and terminate a connection.

2. Synchronization: This layer allows a process to add checkpoint s which are

considered synchronization point s into the data. These synchronization point s

help to identif y the error so that the data is re-synchronized properly, and ends

of the messages are not cut prematurely and data loss is avoided.

3. Dialog Controller: The session layer allows two systems to star t

communication with each other in half-duplex or full-duplex.

**All the below 3 layers(including Session L ayer) are integrated as a single layer

in the TCP/IP model as “Application L ayer ”. 

**Implementation of these 3 layers is done by the network application it self.

These are also known as Upper L ayers or Sof tware L ayers. 

Scenario : 

Let us consider a scenario where a user want s to send a message through some

Messenger application running in his browser. The “Messenger ” here act s as the

application layer which provides the user with an inter face to create the data. This

message or so-called Data is compressed, encr ypted (if any secure data), and

conver ted into bit s (0’s and 1’s) so that it can be transmitted.  

6. Presentation L ayer (L ayer 6):

The presentation layer is also called the Translation layer. The data from the

application layer is extracted here and manipulated as per the required format to

transmit over the network. 

The functions of the presentation layer are : 

Translation: For example, A SCII to EBCDIC.

Encr yption/ Decr yption: Data encr yption translates the data into another form

or code. The encr ypted data is known as the cipher text and the decr ypted data

is known as plain text. A key value is used for encr ypting as well as decr ypting

data.

Compression: Reduces the number of bit s that need to be transmitted on the

network.

7. Application L ayer (L ayer 7) :

At the ver y top of the OSI Reference Model stack of layers, we find the Application

layer which is implemented by the network applications. These applications

produce the data, which has to be transferred over the network. This layer also

ser ves as a window for the application ser vices to access the network and for

displaying the received information to the user. 

Example: Application – Browsers, Sk ype Messenger, etc. 

**Application Layer is also called Desktop Layer.

The functions of the Application layer are :  

1. Network Vir tual Terminal

2. F TAM-File transfer access and management

3. Mail Ser vices

4. Director y Ser vices

OSI model act s as a reference model and is not implemented on the Internet

because of it s late invention. The current model being used is the TCP/IP model. 

OSI model in a nutshell

OSI model summarized (table form)

This ar ticle is contributed by Kundana Thiyari and Harshita Pandey. If you like

Geek sforGeek s and would like to contribute, you can also write an ar ticle using

write.geek sforgeek s.org or mail your ar ticle to review-team@geek sforgeek s.org.

See your ar ticle appearing on the Geek sforGeek s main page and help other Geek s. 

Please write comment s if you find anything incorrect, or you want to share more

information about the topic discussed above. 

Like 482

Previous Next

Let's experiment with TCP/IP Model


Networking

RECOMMENDED ARTICLES Page : 1 2 3

This is exactly why we still use Critique of OSI Model and


01 05
the OSI model when we have Protocols
TCP/IP Model 23, Jul 20

01, Jun 21

How Communication
Similarities between TCP/IP 06
happens using OSI model
02
model and OSI model 11, Feb 21

01, May 21

Working of ISO-OSI Model Physical Layer in OSI Model


03 07 01, Mar 21
24, Jan 20

OSI Model Full Form in Application Layer in OSI


04 08
Computer Networking Model
01, May 20 01, Jul 21

Ar ticle Contributed By :

GeeksforGeeks

Vote for di culty

Current di culty : Easy

Easy Normal Medium Hard Expert

Improved By : magbene, Vinod Yadav, mehulpatoriadnd, priyankashukla,


simmytarika5, tanwarsinghvaibhav, htanwar922, akhilabhilash01
Article Tags : Computer Networks, GATE CS
Practice Tags : Computer Networks

Improve Article Report Issue

Writing code in comment? Please use ide.geeksforgeeks.org, generate link and share the link here.

Load Comments

Company Learn News Languages Web Contribute


5th Floor, A-118, About Us Algorithms Python Development Write an Article
Sector-136, Noida, Uttar Pradesh - Top News
201305 Careers Data Structures Java Web Tutorials Improve an Article
Technology
feedback@geeksforgeeks.org In Media SDE Cheat CPP Django Tutorial Pick Topics to Write
Work &
Contact Us Sheet Golang HTML Write Interview
Career
Privacy Policy Machine C# CSS Experience
Business
learning Internships
Copyright Finance SQL JavaScript
Policy CS Subjects Video Internship
Lifestyle Bootstrap
Video Tutorials

@geeksforgeeks , Some rights reserved

You might also like