Welcome back to our discussion on the OSI model. If you are just joining us, please click here to check out my previous post. In this week discussion, I will cover the 2nd part of the OSI model to include the transport & network Layer. We will rap up OSI model next week with Data link and Physical Layer.
The transport layer is responsible for building and segmenting data streams between the application layer and the network layer using different protocols. One of the most common protocols is Transmission Control Protocol (TCP) and Unit Data Protocol (UDP). The TCP protocol is considered a reliable service. A straightforward way to understand the differences between TCP and UDP is to use a real-world analogy. TCP connection is like watching Netflix. When you watch, and you get a moment of buffering its the TCP protocol putting the data back into order to ensure you don't miss any content. UDP is like watching a live stream. The video does not stop if there is a connection problem it continues to play without interruption. If you hear about the TCP and UDP protocol you will also hear about connection-oriented communication and connectionless.
TCP uses a three-way handshake. This ensures that the sender and the receiver are both on the same page when sending data. One of the benefits of the three-way handshake is flow control. Flow control is the reason why when your Netflix buffers you don't start your show all over. When either the sender or receiver is busy processing other streams sometimes there could be congestion. When the receiver can't handle the information, it will send a stop message to the sender. Once the receiver has resources back to process, it will send the start message and continue the stream.
The network Layer manages the addressing for devices to communicate. This is where the Internet Protocol (IP) address comes into play. So let's use another analogy. Inside your house you will have what's called your private address. Private addresses are used to communicate inside of your network or in this example your house. Private address can't communicate on the internet. Public address represents the address on the outside of your house. Let's say your address is 1234 Jeff's Way. This is how other people send you mail and works the same way in the digital realm. When you want to send a letter from inside your house (Private address) to your friend in San Francisco, you will use your (public address) as the source address or source IP, and your friends address as the destination IP. If you ever wanted to know what your public address is going to www.google.com and type "What's my IP?".
IP also comes in two versions, IPv4 and IPv6. IPv4 addresses are 32-bit address broken down into 4-octets. An example of an IPv4 address is 192.168.100.1 with a 32-bit addressing scheme there are only 4.2 billion unique addresses. In 2010 we ran out of IPv4 addresses and now established a new protocol in IPv6. IPv6 is a 128-bit address consists of eight segments using alphanumeric combinations. An example IPv6 address 2001:0db8:85a3:0000:0000:8a2e:0370:7334. IPv6 can support 340,282,366,920,938,463,463,374,607,431,768,211,456 addresses worldwide.
So let's review transport layer is responsible for creating and reassembling different data streams using TCP and UDP protocols. TCP is connection-oriented, and UDP is connectionless. Network Layer is where IP address live. There are two different types of address public and private. IP addresses also come in two versions IPv4 and IPv6. I hope you enjoyed this post! If you have any questions, please let me know.