OSI model & TCP-IP suite

Networking model

  • categorizes and provides a structure for networking protocols/standards (set of rules, logical rules, defining how network devices and software should work together)

  • if Dell and Apple made their own networking model with their own protocols, they would be able to communicate within their own ecosystem but not with one another

OSI model

  • Open Systems Interconnection

  • conceptual model that categorizes and standardizes the different functions in a network

  • an attempt at standardizing network communications (not in use nowadays)

  • functions are divided into 7 layers

  • top 3 :

    • Application, Presentation, Session

    • application developers work with these top layers to connect their applications over networks

  • bottom 4 :

    • Transport, Network, Data Link, Physical

    • network engineers work with the bottom layers

7. Application layer

  • closest to end user

  • interacts with software applications like web browsers

  • eg: HTTP, HTTPS, [[DHCP]]

  • identifies communication partners and synchronizes communication

  • Note: Layer 7 doesn't include the application itself, but rather the protocols that interact with the application like HTTPS

  • Functions:

    • Identifying communication partners

    • Synchronizing communication

Adjacent layer interaction

  • interaction between different layers of the OSI model

  • eg: encapsulation and de-encapsulation

Same layer interaction

  • eg: communication between the application layers of 2 different systems

  • this same layer interaction between application layers is what allows the application layer to perform its functions of identifying communication partners, syncing communications etc

6. Presentation layer

  • data in application layer is in 'application format'

  • translates data to the appropriate format (between application and network formats)

  • also translates between different application layer formats

  • eg: encryption of data when sent to this layer and decryption when received

5. Session layer

  • controls dialogues (sessions) between communicating hosts

  • establishes, manages and terminates connections between local application (web browser) and remote application (youtube)

  • eg: youtube servers are used by countless people at every moment, so there has to be a way to manage all of these sessions

4. Transport layer

  • adds a header in front of the data

  • Segment: data + L4 header

  • eg: UDP

  • segments and reassembles data for communication between end hosts

  • breaks large pieces of data into smaller segments which can be easily sent over the network and are less likely to cause transmission problems, if error occurs

  • provides host-to-host communication (end-to-end communication), process-to-process communication for applications

  • if data being sent is large enough, it will be segmented into smaller parts, and a Layer 4 header will be added on to each segment

3. Network layer

  • provides connectivity between end hosts on different networks (outside of the LAN)

  • provides logical addressing ( source and destination IP addresses)

  • Packet: data + L4 header + L3 header

  • eg: OSPF

  • provides path selection between source and destination (in complex networks like internet, there can be many different possible paths to a destination)

  • routers operate at layer 3

  • provides node-to-node connectivity and data transfer (eg: PC to switch, switch to router, router to router)

  • defines how data is formatted for transmission over a physical medium (eg: copper UTP cables)

  • detects and possibly corrects Physical layer errors

  • Layer 2 addressing (separate from L3)

  • switches operate at Layer 2 (switches look at destination L2 address to determine where to send the data)

  • Frame : L2 trailer + data + L4 header + L3 header + L2 header

  • eg: STP

  • This frame is sent over the connection, whether it is electrical signals over a wire or wireless signals in case of wifi.

1. Physical layer

  • defines physical characteristics (voltage levels, max transmission distances, physical connectors, cable specs) of the medium used to transfer data between devices

  • Digital bits are converted into electrical (for wired connections) or radio (for wireless connections) signals.

  • Everything in [[Interfaces and cables]] is related to this layer

Protocol Data Units (PDU)

  • Segment is Layer 4 PDU, Frame is a Layer 2 PDU

  • at Layer 1, the PDU is bit

Data flow

  • A software application interacts with application layer and wants to send some data to the system on the right.

  • This data is processed through the OSI stack (Layer 7 to Layer 1), each layer adding something to the original data. This is called encapsulation, as the original data is encapsulated inside this additional information which is added on. ^encapsulation

  • By the time it reaches the physical layer, it is electrical signals on wire and is sent to the neighboring system.

  • The neighboring system performs the opposite process - the additions of each layer are stripped off until the data reaches the application layer of the neighboring system. This process is called de-encapsulation ^de-encapsulation

TCP / IP suite

  • similar structure to OSI model, but with fewer layers

  • used in internet and other modern networks

  • developed by US Department of Defense

  • 4 layers:

    • application, presentation, session layer of OSI model are equivalent to the Application layer in TCP/IP model. (actually this is how network engineers perceive, as they won't work above Transport layer)

    • but the numbering is used from OSI model. eg: Layer 4 problem means OSI's layer 4 (transport layer) and not TCP/IP's layer 4 (application layer)

    • Transport layer is shared between the both models

    • Network layer of OSI is equivalent to Internet layer in TCP/IP model

    • DataLink and Physical layer of OSI is mapped to Link layer in TCP/IP

Last updated