Serial Line Internet Protocol (SLIP) | TCP/IP Data Link Layer

Share this blog with others!

In this blog we will look at one of the link-layer protocols, i.e. Serial Line Internet Protocol, which is responsible for addressing the physical layer, Media Access Control (MAC) and also framing the datagrams obtained from the layer 3 protocol i.e. Internet Protocol (IP).

The Physical Layer is the lowest layer on the OSI Reference Model. In the TCP / IP Model the physical layer, together with the data link layer, is called the network interface layer, or just the link layer.

There is a gap between the layer 3 and layer 2 in the OSI Model. IP serves its purpose at layer 3, but we need a protocol that can read the IP datagram and translate it to frames that the physical layer can pass to.

Read about TCP/IP Model and Architecture.

There are two protocols available that help us fill the gap in the OSI Model between layer 3 (IP) and layer 2 (Data Link Layer).

  • SLIP – Serial Line Internet Protocol
  • PPP – Point to Point Protocol

SLIP is a very simple layer 2 protocol that provides basic frames for IP Datagrams, while the Point-to-Point Protocol is a more sophisticated, fully-featured data link layer protocol that provides frames as well as additional features that enhance security and performance.

Remember in TCP/IP Model, layer 3 is an Internet layer, and layer 2 is a Data Link Layer (compared to OSI Model Layer 2 the physical layer and the data link layer are aggregated).

Need For Data Link Layer Protocols

First of all, we should know what the need for a layer 2 protocol is.

Lets you understand this by an example, Suppose you wrote a mail and sent it to a friend of yours. The mail program that you are using is the TCP/IP Model application layer. The mail data, along with the application layer headers, is then received by the transport layer, which creates a connection between you and the mail server. The Internet layer adds logical addresses and fragments of the data, if necessary.

Just below the Internet layer is the Data Link layer whose duty is to send IP datagrams via a network. We need some kind of protocol to convert IP datagrams to frames that machines understand and can pass.

There comes the SLIP and the PPP, the protocols for layer 2.

Serial Line Internet Protocol (SLIP)

The following section addresses the need for the Serial Line Internet Protocol, i.e. the Data Link Layer Protocol.

SLIP was developed in the early 1980s as a Data Link Layer Protocol but has never been specified as a formalized protocol.

It was classified as non-standard because it was designed as a very primitive temporary fix to provide layer 2 frames. Another reason for its non-standardization is its simplicity.

SLIP Data Framing

The primary role of SLIP is to convert IP Datagrams to frames that allow machines to move data.

Let’s see IP Datagrams are converted to Frames by SLIP.

SLIP splits the IP datagrams into bytes and sends those bytes over the bridge one at a time. This applies a special byte value, a decimal value of 192, to the last of the IP Datagram, also known as the SLIP END Character. This END Character acts as the delimiter.

That’s SLIP in a nutshell. quite simple right!

But this earlier version of SLIP had some issues like there was no clear indication from where the data starts and if the value 192 is in the data itself, the SLIP thought it as the END Character and the rest of the data is lost.

In the next version, SLIP was enhanced by adding an END character also at the beginning, which gave a clear indication of where the data starts and ends.

One problem that was not yet addressed was the presence of the END Character in the data, which contributed to data loss.

To avoid this, an escape character has been defined, which has a value of 219 in decimal and the value of DB in hex.

When a value of 192 appears in the data part, the sender replaces it with the Escape Character followed by a value of 220 in decimal. Therefore, a single 192 is 219 220 or DB DC, in Hex.

The recipient machine reverses the process and translates 219 220 back to 192. Thus solving the problem.

Learn More about Serial Line Internet Protocol (SLIP) from Wikipedia.

0 0 votes
Article Rating

Share this blog with others!
Notify of
Inline Feedbacks
View all comments
Scroll to Top