Introduction to Computer Network – Part 1

Introduction : A computer network is a telecommunications network that enables sharing of resources and information. Nodes in a network are connected with each other using either cable or  wireless media and use a system of digital rules for data exchange. Data is transferred in the form of a packet, a formatted unit of data.+

Since you are reading this on the Internet, your computer is a part of the biggest network in the world – the Internet. If you have access to the Internet at home, your devices  are part of a LAN (Local Area Network).The computer can send and receive data on the Internet using Internet protocols such as HTTP and DNS.

OSI reference model

The Open Systems Interconnection (OSI) model was created by the International Organization for Standardization (ISO), the world’s largest developer of voluntary international standards. It is a layered model that was created to enable different networks to communicate reliably between disparate systems. The OSI model provides a framework for creating and implementing networking standards and devices and describes how network applications on different computers can communicate through the network media.+

The OSI model has seven hierarchical layers. Each layer describes a different network function. The layers are:+

  • Application
  • Presentation
  • Session
  • Transport
  • Network
  • Data Link
  • Physical

The layers are usually numbered from the last one, which means that the Physical layer is the first layer. A mnemonic can be used to remember the seven layers: Please Do Not Throw Sausage Pizza Away+

Application – Away
Presentation – Pizza
Session – Sausage
Transport – Throw
Network – Not
Data Link – Do
Physical – Please+

Here is a description of each layer in the OSI model:+

1. Physical – defines how to move bits from one device to another. It deals with the physical characteristics of the transmission medium, describing connectors, pins, cables,  connectors, and network interface cards.+

2. Data Link – combines packets into bytes and bytes into frames. Each frame has a header and a trailer. A header contains the source and destination MAC address. A trailer  contains the Frame Check Sequence field, used for errors detection. The Data Link layer is divided into two sublayers: Logical Link Control – used for flow control and error detection and
Media Access Control – used for hardware addressing and controlling the access method.+

3. Network – provides logical addressing used by routers for path determination. Logical addressing is used to identify a host on a network (for example, by its IP  address).+

4. Transport – provides reliable or unreliable delivery and error recovery and flow control.+

5. Session – determines how to establish, control and terminate a session between the two systems.+

6. Presentation – defines data formats. Processes such as compression and encryption are handled at this layer+

7. Application – provides a user interface and enables network applications to communicate with other network applications.+

The following list shows which protocols reside on which layer:+

  • Application – HTTP, Telnet, FTP
  • Presentation – MIME
  • Session – SSL, NetBIOS
  • Transport – TCP, UDP
  • Network – IP, ICMP
  • Data Link – PPP, HDLC, Ethernet
  • Physical – Ethernet

TCP/IP reference model

The TCP/IP model is the network model used by computer networks today. It was created in the 1970s by DARPA (Defense Advance Research Project Agency) as an open, vendor-neutral, public networking model. Just like the OSI reference model, the TCP/IP model provides general guidelines for designing and implementing network protocols.+

The TCP/IP model has fewer layers than the OSI model, just four. These layers describe different network functions and have their own standards and protocols. The layers are:+

  • Application
  • Transport
  • Internet
  • Link
The Link layer is sometimes referred to as the Network access layer. The Transport layer is sometimes called the Host-to-Host layer.


Here is a brief description of each layer:+

  • Link – defines the protocols and hardware required to deliver data across a physical network.
  • Internet – defines the protocols for the logical transmission of packets over the network.
  • Transport – defines protocols for setting up the level of transmission service for applications. This layer is responsible for reliable transmission of data and the the error-free delivery of packets.
  • Application – defines protocols for node-to-node application communication and provide services to the application software running on a computer.

Differences between the TCP/IP model and OSI model+

The TCP/IP model and the OSI model are similar in concept, but have a different number of layers, sometimes with different names:+

tcp ip osi model comparison+

As you can see from the picture above, the Application, Presentation, and Session layers of the OSI model are merged in only one layer – the Application layer, in the TCP/IP model. The Physical and Data Link layers of the OSI model are merged into one layer, the Link layer, in the TCP/IP model.+

The following list shows which protocols reside on which layer:+

  • Application – HTTP, POP3, SMTP
  • Transport – TCP, UDP
  • Internet – IP
  • Link – Ethernet, PPP

Data encapsulation

The term encapsulation describes a process of putting headers (and sometimes trailers) around some data. Each layer adds its own header (Data Link protocols also add a trailer) to  the data supplied by the higher layer. This process can be explained with the five-layer TCP/IP model (the Link layer of the TCP/IP model is sometimes divided into two  layers, Data Link and Physical, hence the five-layer TCP/IP model), with each step corresponding to the role of each layer.+

Consider the following example. Let’s say that you are browsing a web site. The web server on which the website is hosted will create and encapsulate the application data with the Application layer headers. For example, the HTTP OK message will be stored in the header, followed by the requested content of the web page.+

The encapsulated data will then be  forwarded to the next layer, the Transport layer. The Transport layer will add its own header around the encapsulated data. In the case of the TCP protocol, this can be something like the source and destination ports or the sequence number.+

The data will then be forwarded to the next layer – the Network layer. The Network layer will  store the source and destination IP addresses in its header and forward the data to the Data Link layer. The Data Link layer is the only layer that uses both the header and trailer.+

The data is then sent through a  physical network link.+

Here is a graphical representation of these five steps:+

encapsulation process

Each data packet (header + encapsulated data) defined by a particular layer has a specific name:+

  • Frame – encapsulated data defined by the Network Access layer. A frame can have both header and trailer.
  • Packet – encapsulated data defined by the Network layer. A header contains the source and destination IP addresses.
  • Segment – encapsulated data defined by the Transport layer. Information such as the source and destination ports or sequence and acknowledgment numbers are included in the header.


The term decapsulation describes a process of removing headers and trailers as data passes from a lower to the upper layer. This process transpires on a computer that is receiving data.

Data encapsulation in the OSI model

In the previous lesson we have learned that the term encapsulation describes the process of putting headers (and sometimes trailers) around some data. Like with the TCP/IP layers, each OSI layer asks for services from the next lower layer. The lower layer encapsulates the higher layer’s data between a header (Data Link protocols also add a trailer). While the TCP/IP model uses terms like segment, packet and frame to refer to a data packet defined by a particular layer, the OSI model uses a different term: protocol data unit (PDU).+

A PDU represent a unit of data with headers and trailers for the particular layer, as well as the encapsulated data. Since the OSI model has 7 layers, PDUs are numbered from 1 to 7, with the Physical layer being the first one. For example, the term Layer 3 PDU refers to the data encapsulated at the Network layer of the OSI model.+

Here is a graphical representation of the PDUs in the OSI model:+

enapsulation pdu


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.