Communication Networks/OSI Reference Model

This page will discuss the OSI Reference Model

What It Does
The OSI model allows for different developers to make products and software to interface with other products, without having to worry about how the layers below are implemented. Each layer has a specified interface with layers above and below it, so everybody can work on different areas without worrying about compatibility.

Packets
Higher level layers handle the data first, so higher level protocols will touch packets in a descending order. Let's say we have a terminal system that uses TCP protocol in the transport layer, IP in the network layer, and Ethernet in the Data Link layer. This is how the packet would get created:

1. Our application creates a data packet
 * Data|

2. TCP creates a TCP Packet:
 * TCP Header|Data|

3. IP creates an IP packet:
 * IP Header|TCP Header|Data|CRC|

4. Ethernet Creates an Ethernet Frame:
 * Ethernet Header|IP Header|TCP Header|Data|CRC|

On the receiving end, the layers receive the data in the reverse order:

1. Ethernet Layer reads and removes Ethernet Header:
 * IP Header|TCP Header|Data|CRC|

2. IP layer reads the IP header and checks the CRC for errors
 * TCP Header|Data|

3. TCP Layer reads TCP header
 * Data|

4. Application reads data.

It is important to note that multiple TCP packets can be squeezed into a single IP packet, and multiple IP packets can be put together into an Ethernet Frame.

Introduction
Network Layer is responsible for transmitting messages hop by hop. The major internet layer protocols exist in this layer. Internet Protocol (IP) plays as a major component among all others, but we will also discuss other protocols, such as Address Resolution Protocol (ARP), Dynamic Host Configuration Protocol (DHCP), Network Address Translation (NAT), and Internet Control Message Protocol (ICMP). Network layer does not guarantee the reliable communication and delivery of data.

Network Layer Functionality
Network Layer is responsible for transmitting datagrams hop by hop, which sends from station to station until the messages reach their destination. Each computer should have a unique IP address assigned as an interface to identify itself from the network. When a message arrives from Transport Layer, IP looks for the message addresses, performs encapsulation and add a header end to become a datagram, and passes to the Data Link Layer. As for the same at the receive side, IP performs decapsulation and remove network layer header, and then sends to the Transport Layer. The network model illustrates below:



Figure 1 Network Layer in OSI Model

When a datagram sends from the source to the destination, here are simple steps on how IP works with a datagram travels:


 * 1) Upper-layer application sends a packet to the Network Layer.
 * 2) Data calculation by checksum.
 * 3) IP header and datagram constructs.
 * 4) Routing through gateways.
 * 5) Each gateways IP layer performs checksum.  If checksum does not match, the datagram will be dropped and an error message will send back to the sending machine.  Along the way, if TTL decrements to 0, the same result will occur. And, the destination address routing path will be determined on every stop as the datagram passes along the internetwork.
 * 6) Datagram gets to the Network Layer of destination.
 * 7) Checksum calculation performs.
 * 8) IP header takes out.
 * 9) Message passes to upper-layer application.



Figure 2 IP Characteristic in Network Layer

In Network Layer, there exist other protocols, such as Address Resolution Protocol (ARP) and Internet Control Message Protocol (ICMP), but, however, IP holds a big part among all.



Figure3 Internet Protocol in Network Layer

In addition, IP is a connectionless protocol, which means each packet acts as individual and passes through the Internet independently. There is sequence, but no sequence tracking on packets on the traveling, which no guarantee, in result of unreliable transmission.

Other Reference Models
TCP/ IP model