OSI Model

From Network Security Wiki

Brief OSI Model

  • OSI Layer Control information and Functions:

OSI Model
PDU Layer Function Examples
Data 7. Application * Supports Application and End-User processes.
* Provides Application services for file transfers, e-mail, and other network software services.
6. Presentation * Provides independence from differences in data representation (e.g., encryption) by translating from application to network format, and vice versa.
* Works to transform data into the form that application layer can accept.
* This layer formats and encrypts data to be sent across a network, providing freedom from compatibility problems.
5. Session * Establishes, manages and terminates connections between applications.
* Sets up, coordinates, and terminates conversations, exchanges, and dialogues between the applications at each end.
* It deals with session and connection coordination.
Segments 4. Transport * Provides transparent transfer of data between end systems, or hosts, and is responsible for end-to-end error recovery and flow control.
* It ensures complete data transfer.
Packet/Datagram 3. Network * Provides routing technologies and handles logical addressing.
* Routing and forwarding are functions of this layer, as well as addressing, internetworking, error handling, congestion control and packet sequencing.
IPv4, IPv6, IPsec, AppleTalk, ICMP
Bit/Frame 2. Data link * Handles Physical Addressing.
* Data packets are encoded and decoded into bits.
* It is divided into two sub layers: Media Access Control (MAC) layer and Logical Link Control (LLC) layer.
* The MAC sub layer controls how a computer on the network gains access to the data and permission to transmit it.
* The LLC layer controls frame synchronization, flow control and error checking.
PPP, IEEE 802.2, L2TP, MAC
Bit 1. Physical * Conveys the bit stream - electrical impulse, light or radio signal — through the network at the electrical and mechanical level.
* Provides the hardware means of sending and receiving data on a carrier, including defining cables, cards and physical aspects.


  • A network that is formed from the combination of two or more networks (or subnets) with a common Classless Inter-Domain Routing (CIDR) prefix.
  • It must not contain other prefixes of networks that do not lie in the same routing path.
  • Also called Supernetting, Prefix Aggregation, Route Aggregation, or Route Summarization.

Steps for calculating a Supernet

  • Addresses are converted to binary format:
Address First Octet Second Octet Third Octet Fourth Octet 11000000 10101000 01100010 00000000 11000000 10101000 01100011 00000000 11000000 10101000 01100100 00000000 11000000 10101000 01100101 00000000 11000000 10101000 01100110 00000000 11000000 10101000 01101001 00000000
  • Bits at which the common pattern of digits ends are located.
  • The number of common bits is counted.
  • The summary route is found by setting the remaining bits to zero,
  • It is followed by a slash and then the number of common bits.
First Octet Second Octet Third Octet Fourth Octet Address Netmask
11000000 10101000 01100000 00000000 /20
  • The summarized route is The subnet mask is
  • This summarized route also contains networks that were not in the summarized group:
  • It must be assured that the missing network prefixes do not exist outside of this route.

  • An ISP is assigned a block of IP addresses by a regional Internet registry (RIR) of to
  • The ISP might then assign subnetworks to each of their downstream clients, e.g:
Customer A will have the range to
Customer B would receive the range to
Customer C would receive the range to, and so on. 
  • Instead of an entry for each of the subnets 172.1.1.x and 172.1.2.x, etc., the ISP could aggregate the entire 172.1.x.x address range and advertise the network on the Internet community, which would reduce the number of entries in the global routing table.


  • OSPF is a layer 4 protocol
Encapsulated in an IP Packet(Protocol no 89)
Uses Acknowledgement
  • RIP is a layer 7 protocol(uses UDP port 512)
  • BGP is a layer 7 protocol (uses Port no 179)
  • A PC can have only 1 Default Gateway configured. Other Interfaces will generally not have any default gateway.


{{#widget:DISQUS |id=networkm |uniqid=OSI Model |url=https://aman.awiki.org/wiki/OSI_Model }}