Network Models OSI and TCP/IP

Submitted by sylvia.wong@up… on Mon, 06/27/2022 - 18:35

In this topic, we will discuss the OSI and TCP/IP (which you may already be familiar with) models for network communication and what each of the layers in these models is responsible for. We will also take a look at the difference between circuit and packet switching and the IEE 802.2 Ethernet frame format.

Sub Topics

The Open Systems Interconnection (OSI) model describes a seven-layer framework that computer systems use to communicate over a network. It was the first standard model for network communications and was adopted by all major computer and telecommunication companies in the early 1980s. OSI is widely used as it helps visualise and communicate how networks operate, helping to isolate and troubleshoot networking problems.

The OSI model is a protocol-independent, generic model that describes network communication in all its forms.

Advantages of OSI Model

The OSI model helps users and operators of computer networks:

Determine the required hardware and software to build their network.

Understand and communicate the process followed by components communicating across a network.

Perform troubleshooting by identifying which network layer is causing an issue and focusing efforts on that layer.

The OSI model helps network device manufacturers and networking software, vendors:

  • Create devices and software that can communicate with products from any other vendor, allowing open interoperability.
  • Define which parts of the network their products should work with.
  • Communicate to users at which network layers their product operates – for example, only at the application layer or across the stack.

OSI Network Layers

The following information presents a description of each of the layers in the OSI model in top-down order, with application as the uppermost layer.

A diagram showing the OSI model

The OSI Model: What It Is and Why It’s Important by Flash Gooden ©2022 Sparkbox.

7. The application layer

‘This is the only layer that interacts directly with user data. For example, web browsers and email clients rely on the application layer to establish communications. On the other hand, client software programmes are not part of the application layer; rather, the application layer is in charge of the protocols and data manipulation that the software uses to provide relevant data to the user. Hypertext transfer protocol (HTTP) and Simple Mail Transfer Protocol (SMTP) are examples of application layer protocols.

6. The presentation layer

Largely responsible for preparing data for use by the application layer; in other words, the presentation layer makes data presentable for application consumption. The presentation layer handles data translation, encryption, and compression.

Because two communicating devices may use different encoding techniques, layer 6 is responsible for converting incoming data into a syntax that the receiving device's application layer can comprehend.

The presentation layer is responsible for applying encryption on the sender's end and decoding encryption on the receiver's end. It may present the application layer with unencrypted, readable data if the devices interact via an encrypted connection.

Lastly, before transferring data to layer 5, the presentation layer is responsible for compressing data received from the application layer. Reducing the quantity of data exchanged aids in improving communication speed and efficiency.

5. The session layer

This layer is in charge of establishing and maintaining communication between the two devices. The session is the period of time between when a communication is initiated and when it is ended. The session layer guarantees that the session remains open for as long as necessary to send all the data being exchanged and then swiftly ends it to prevent wasting resources.

Data transfer is also synchronised with checkpoints by the session layer. The session layer may, for example, create a checkpoint every 5 megabytes if a 100-megabyte file is being transmitted. If a disconnect or crash occurs after 52 megabytes have been transmitted, the session can be continued from the previous checkpoint, requiring just 50 megabytes of data to be transferred. Without the checkpoints, the entire transfer would have to begin again from scratch.

4. The transport layer

The transport layer handles the end-to-end communication between two devices. Before transferring data to layer 3, data from the session layer is divided into segments and sent to layer 3. The receiving device's transport layer is tasked with reassembling the segments into data that the session layer can read.

The transport layer also handles flow control and error control. Flow control establishes the best transmission speed to prevent a sender with a fast connection from overwhelming a receiver with a slow connection. On the receiving end, the transport layer conducts error control by confirming that the data received is full and, if not, requesting a resend.

3. The network layer

The network layer is in charge of making data transmission between two networks easier. The network layer is not required if the two communicating devices are on the same network. On the sender's device, the network layer breaks up segments from the transport layer into smaller pieces called packets, which it then reassembles on the receiving device. Routing is a network layer function that determines the optimum physical path for data to reach its destination.

2. The data link layer

The data link layer is similar to the network layer in that it allows data to be sent between two devices, this time on the same network. The data link layer works by splitting packets from the network layer into smaller units known as frames. In intra-network communication, the data link layer, like the network layer, is responsible for flow control and error control (The transport layer only does flow control and error control for inter-network communications).

1. The physical layer

The physical equipment used in data transport, such as cables and switches, are included in this layer. This layer is where data is turned into a bit stream, a string of 1s and 0s. Both devices' physical layers must agree on a signal protocol to identify the 1s and 0s.’ 2

The two most extensively used networking models for communication are TCP/IP and OSI. There are some parallels and differences between them. One of the most significant distinctions is that OSI is a conceptual model that is not utilised in practice for communication. In contrast, TCP/IP creates a connection and communicates over a network.

The OSI model focuses primarily on services, interfaces, and protocols, with explicit distinctions, made between these categories. On the other hand, the TCP model cannot fully explain these ideas.’3

Key Differences

  • ‘OSI has 7 layers, whereas TCP/IP has 4 layers.
  • The OSI Model is a logical and conceptual model that defines network communication used by systems open to interconnection and communication with other systems. On the other hand, TCP/IP helps you to determine how a specific computer should be connected to the internet and how it can be transmitted between them.
  • OSI header is 5 bytes, whereas TCP/IP header size is 20 bytes.
  • OSI refers to Open Systems Interconnection, whereas TCP/IP refers to Transmission Control Protocol.
  • OSI follows a vertical approach, whereas TCP/IP follows a horizontal approach.
  • OSI model, the transport layer, is only connection-oriented, whereas the TCP/IP model is both connection-oriented and connectionless.
  • OSI model is developed by ISO (International Standard Organization), whereas TCP Model is developed by ARPANET (Advanced Research Project Agency Network).
  • OSI model helps you to standardise router, switch, motherboard, and other hardware, whereas TCP/IP helps you to establish a connection between different types of computers.’4
A comparison between OSI and TCP/IP models

Testing Next Generation Networks – A Look at OSI and TCP/IP Models By Nicole Faubert © Keysight Technologies 2000–2022 TCP/IP Network Layers

A network protocol is a collection of rules that govern how computer network devices format, send, and receive data, ranging from servers and routers to endpoints, regardless of their underlying infrastructures, designs, or standards.

The TCP/IP protocol suite was designed by Defense Advanced Research Projects Agency (DARPA) scientists in the 1970s and is now the most popular network protocol globally.

TCP/IP, or Transmission Control System/Internet Protocol, is the standard Internet communications protocol that allows computers to interact across great distances. The internet is a packet-switched network. Data is split down into small packets and delivered separately via many routes simultaneously before being reassembled at the receiving end.

TCP is in charge of collecting and reassembling data packets, whereas IP ensures that the packets are delivered to the correct location.

The Internet Engineering Task Force (IETF), which is divided into several working groups, implements changes. Requests for Comments (RFCs) may be found at tools.ietf.org/html.

TCP/IP is implemented in all consumer-oriented operating systems.

The following information describes each TCP/IP model layer in top-down order, with Application as the uppermost layer.

A diagram showing TCP/IP protocols

TCP/IP Model: What are Layers & Protocol? TCP/IP Stack by Lawrence Williams © Copyright - Guru99 2022

Application

The Application layer interacts with software applications to implement communication.

This layer performs the functions of the top three layers of the OSI model: Application, Presentation and Session Layer.

Protocols

‘Some of the protocols present in this layer are:

  1. HTTP and HTTPS – HTTP stands for Hypertext transfer protocol. The World Wide Web uses it to manage communications between web browsers and servers. HTTPS stands for HTTP-Secure. It is a combination of HTTP with SSL (Secure Socket Layer). It is efficient in cases where the browser needs to fill out forms, sign in, authenticate and carry out bank transactions.
  2. SSH – SSH stands for Secure Shell. It is a terminal emulations software similar to Telnet. SSH is preferred because of its ability to maintain an encrypted connection. It sets up a secure session over a TCP/IP connection.
  3. NTP – NTP stands for Network Time Protocol. It synchronises the clocks on our computer to one standard time source. It is very useful in situations like bank transactions. Assume the following situation without the presence of NTP. Suppose you carry out a transaction, where your computer reads the time at 2:30 PM while the server records it at 2:28 PM. The server can crash very badly if it is out of sync.’5

Read for more information on protocols in the Application layer.

Transport

‘This layer is similar to the OSI model's Transport layer. It is in charge of end-to-end communication and error-free data transfer. It protects upper-layer applications from data complexity. The following are the two primary protocols found in this layer:

  • Transmission Control Protocol (TCP) – This protocol is notable for ensuring error-free and reliable communication between end systems. It does data segmentation and sequencing. It also features an acknowledgement function and uses a flow control method to govern data flow. It is a very effective protocol, but because of these qualities, it has a lot of overhead. Increased overhead translates to higher costs.
  • User Datagram Protocol (UDP) – On the other side, it lacks these capabilities. If your application does not require dependable transmission, this is the protocol to use because it is relatively cost-effective. UDP is a connectionless protocol, unlike TCP, which is a connection-oriented protocol.’6
An IT professional checking something on a laptop

Internet

‘The functions of this layer are similar to those of the OSI Network layer. It specifies the protocols that are in charge of logical data transfer across the whole network. The following are the key protocols found at this layer:

  • IP – stands for Internet Protocol, and it is in charge of sending packets from a source host to a destination host based on the IP addresses in the packet headers. IP comes in two flavours: IPv4 and IPv6. The majority of websites presently uses the IPv4 protocol. However, IPv6 is becoming more popular as IPv4 addresses become scarce compared to the number of users.
  • ICMP – the Internet Control Message Protocol is responsible for supplying hosts with information about network faults and is contained within IP datagrams.
  • ARP – Address Resolution Protocol determines a host's hardware or Media Access Control (MAC) address from a known IP address.’7

Network Interface

This layer is the OSI model's combination of the Data Link Layer and the Physical Layer. It looks for hardware addressing, and the protocols at this layer enable data to be physically sent.

Packet switching

‘In packet-switched networks, data is moved in separate, tiny pieces – packets – based on the destination address in each packet. When packets are received, they are reassembled in the correct order to form the message.

The internet and the TCP/IP protocol suite is a packet-switched networking technology.’8

A diagram showing packet-switched network technology

Simplified Solutions for Network Emulation, Performance Testing, & Network Traffic Generation by Apposite technologies ©2022 Apposite Technologies.

‘Advantages of packet switching over circuit switching:

  • aMore efficient than circuit switching
  • Data packets can find the destination without the use of a dedicated channel
  • Reduces lost data packets because packet switching allows for resending of packets
  • More cost-effective since there is no need for a dedicated channel for voice or data traffic

Disadvantages of packet switching:

  • Not ideal for applications that are in constant use, such as high-volume voice calls
  • High-volume networks can lose data packets during high-traffic times; those data packets cannot be recovered or resent during transmission
  • There is a lack of security protocols for data packets during transmission’9

Circuit switching

‘Circuit switching was created for voice communication and is not as appropriate for data transmission. Before the transmitter and receiver communicate via circuit switching, a dedicated channel must be established between them.

The most common use of circuit switching is in telephone systems that require a dedicated physical path.’10

A diagram showing circuit switching

Simplified Solutions for Network Emulation, Performance Testing, & Network Traffic Generation by Apposite technologies ©2022 Apposite Technologies.

‘Advantages of circuit switching over packet switching:

  • Decreases the delay the user experiences before and during a call
  • The call will be done with a steady bandwidth, dedicated channel, and consistent data rate
  • Packets are always delivered in the correct order.

Disadvantages of circuit switching:

  • Great for only voice communication
  • Doesn’t use resources efficiently
  • Dedicated channels for circuit switching are unavailable for any other use
  • There is a higher cost to dedicate one channel per use.’11

Virtual circuit switching

It is a network where a virtual connection is established between the source and the destination. Through this network, packets will be transferred during any call. The path established between two points appears as a dedicated physical circuit. Therefore, it is called a virtual circuit. It is a type of packet switching.

It is a connection-oriented service, where the first packet goes and reserves the resources for the subsequent packets.

A diagram showing how circuit switching works

Circuit switching by Ben Lutkevich Copyright 2000 - 2022, TechTarget

Advantages

  • Packets are delivered in the same order as they all follow the same route between the source & the destination.
  • The overhead is smaller as a full address is not required on each packet as they all follow the same established path.
  • The connection is more reliable as it is one to one connection.
  • Fewer chances of data loss.

Disadvantages

  • The switching equipment should be powerful.
  • Re-establishment of the network is difficult as if there is any failure, all calls need to be re-established.

Ethernet Frame Format

Before discussing the ethernet frame format, it is a good idea to understand a little about the different protocol data units (PDUs) and the associated layers.

Protocol Data Units (PDU)

A protocol data unit (PDU) is a concept used in the OSI model to describe information added or withdrawn by a layer. Each layer in the model communicates using the PDU, which can only be read by the peer layer on the receiving device before being passed on to the next layer.

Control information, address information, and data are all in a PDU.

PDUs for each layer in the OSI have a different name.

  1. The PDU of the Transport Layer is called a Segment.
  2. The PDU of the Network Layer is called s a Packet.
  3. The PDU of the Data-Link Layer is called a Frame.

Ethernet Frame

‘The Ethernet frame structure is defined in the IEEE 802.3 standard. Here is a graphical representation of an Ethernet frame and a description of each field in the frame:

preamble SFD Destination MAC Source MAC Type Data and Pad FCS
7 Bytes 1 Byte 6 Bytes 6 Bytes 2 Bytes 46-1500 Bytes 4 Bytes
  • Preamble – informs the receiving system that a frame is starting and enables synchronisation.
  • SFD (Start Frame Delimiter) – signifies that the Destination MAC Address field begins with the next byte.
  • Destination MAC – identifies the receiving system.
  • Source MAC – identifies the sending system.
  • Type – defines the type of protocol inside the frame, for example, IPv4 or IPv6.
  • Data and Pad – contains the payload data. Padding data is added to meet the minimum length requirement for this field (46 bytes).
  • FCS (Frame Check Sequence) – contains a 32-bit Cyclic Redundancy Check (CRC) which allows the detection of corrupted data.

The FCS field is the only field present in the Ethernet trailer. It allows the receiver to discover whether errors occurred in the frame. Note that Ethernet only detects in-transit data corruption – it does not attempt to recover a lost frame. Other higher-level protocols (e.g. TCP) perform error recovery.’12

Activity - OSI Model layer

List the OSI model layers and briefly define at-least two functions of each OSI Model Layer.

Note: Follow the correct order starting from Layer 7 to Layer 1.

After your list and definitions are completed, compare and contrast the OSI model layers with the TCP/IP model layers.

Once you are done, share your list and definitions with your peers in the forum.

Module Linking
Main Topic Image
A room filled with a network of computers
Is Study Guide?
Off
Is Assessment Consultation?
Off