The OSI Model

The Internet is the worlds largest network of computers but without the magic of the OSI model, and protocols, it would be completely useless. The OSI, or the Open System Interconnection model is a networking framework made up of seven layers. The seven layers are split up into two sets; Application set, and Transport set. At each layer of the OSI model the data goes through several stages, similar to procedural programming which will not only prepare it for the next layer, but for transmission overall.

OSI Model

The seventh layer is Application. This layer interacts with the end-user and application processes. It will actually interact with the operating system and it identifies a range parameters including; communication partners, quality of service, user authentication, privacy and data syntax. The application layer is specific to the application in question including email and file transfers. Telnet and FTP are some of the protocols that only exist in this layer. The application layer will be the first layer data goes through when a user does any network related activity, such as file transfers, mail reading etc.

After the Application Layer there is the Presentation Layer. This layer takes the data from the previous layer and converts the data to a format that can be understood by other layers. It formats and encrypts (if encryption is required) data to be sent across a network and will prevent compatibility issues. It can be called the syntax layer as it is effectively changing the language the data is in.

The Session Layer is the last layer in the Application Set. It is used to establish, maintain and terminate communication with the receiving device. It deals with session and connection coordination.

The next part of the OSI model is the transport set. This layer is responsible for maintaining the flow of data during transportation. It will check to see if the data is originating from more than one application and if so, will merge each stream of data into one for compatibility with the physical network. It will also check for errors in the data between the devices and if necessary data recovery.

Layer 3 is the network. It involves switching and routing technologies to form logical paths between server and client, and node to node. The routing functions will involve addressing, as well as error handling and congestion control; to ensure that the link/node is not carrying too much data to prevent the data from degrading.

The second to last link is Data. This layer is probably the most complex layer of all. At this layer the data packets are assigned a protocol, which we will get into later, and the type of network is assigned. The data layer has two sub-layers the MAC-sub layer (Media Access Control) and the LLC (logical Link Control). The MAC sublayer is responsible for how a device on a network can gain access to data, and the permissions it has to transmit it. The LLC layer is more geared towards the running of the network, and is responsible for frame synchronisation; simply the method of detecting the beginning and end of a packet in a data stream, flow control and again, error checking.

The final layer of the OSI model is the Physical layer. This is the layer that moves the bit stream from point A to B, be this through the means of copper cable (electrical impulse), fiber optic (light), or radio signal, through the network at the very basic fundamental mechanical level. It is the physical hardware means of transceiving data through the desired medium, and this includes protocols as a component.

Protocols

The OSI model is simply a guideline to define a networking framework for the implementation of protocols. Protocols are a defined format used by all networks on earth. It defines the type of error checking which will be used, and also how the end of the message will be indicated. All protocols are different, some are more reliable than others, some are faster and some are more secure, some are simpler, and some have more features. protocols are implemented in both hardware and software, and both the client and the server must support the same ones to be able to communicate, as without them they can’t.

There is an infinite number of protocols being used today, with some being created and others being degraded to nothing all the time. Below is a list of a handful commonly used protocols today in the Internet Protocol Suite, with their definition, and what they are used for. Quite often protocols are related, in doing a similar task. For instance HTTP, HTTPS, SMTP and FTP are all different protocols, but at the end of the day they are all transfer protocols, achieving a similar goal.

Protocol

Layer

Definition

HTTP

Application Layer

HTTP, or Hypertext Transfer Protocol is the main protocol for the transfer of data on the world wide web. Hypertext is text which is structured in such a way that uses hyperlinks to connect nodes of text.

SSL

Application Layer

SSL, or Secure Socket Layer is a cryptographic protocol which are used to provide security for communication over the internet. SSL uses what's known as a cryptographic system to encrypt data using two keys; a Public key, which will be known to everyone, and a private key, which is private to the recipient only.

HTTPS

Application Layer

HTTPS, or Hypertext Transfer Protocol Secure is not strictly a protocol in the sense it is  simply HTTP layered on top of SSL, to provide a secure connection which is encrypted.  HTTPS however is the future of HTTP, and is worth a mention. This has commonly been associated with security sensitive tasks such as online banking, and logging into web based email, however more and more websites are implementing their own secure systems, to keep its users secure.

IMAP

Application Layer

The Internet Message Access Protocol is a protocol designed for email retrieval. It is used by email clients such as Microsoft Outlook and Mozilla Thunderbird to access email on a remote server.

SMTP

Application Layer

The Simple Mail Transfer Protocol is used for the transmission of e-mail messages across the internet. It is the main way of sending a message on a server level. At a user client level SMTP will only be used for the sending of emails, and IMAP or POP (Post Office Protocol - Now Obsolete) to receive.

FTP

Application Layer

FTP or File Transfer Protocol is used for the transfer of files across a TCP based network, namly the Internet. FTP uses a strict client-server rule, and clients will usually have to login to access data on the server, using a FTP client such as FileZilla. FTP is commonly used for uploading/downloading website files. FTP is often secured with SSL, FTPS, not to be confused with SFTP which is SSH File Transfer Protocol. Both are used in the same way, but are completely different.

IRC

Application Layer

IRC or Internet Relay Chat is a protocol used for the transfer of live interactive text messaging. It is used for group discussion on forums, and one to one messaging using private messages. It is also capable of chat and data transfer, which means it's capable of file sharing.

DHCP

Application Layer

The Dynamic Host Configuration Protocol is a protocol used by a DHCP server to allocate IP's to clients. It is often part of a router and allocates internal IP's to its clients without the need of a network administrator to manually do it. This leads to a more efficient use of IP addresses, and prevents them from being allocated to a device that doesn't exist.

DNS

Application Layer

The Domain Name System is a naming system for assigning domain names to IP's. A full explanation of the DNS system can be found here on our web architecture article.

TCP

Transport Layer

The TCP, or Transmission Control Protocol is the, or one of the, core protocols of the internet. It is so commonly used that the IP Suite is often called TCP/IP Suite, as they are both the main workhorses of the Internet as we know it today. TCP is used by two hosts, to establish a connection and exchange streams of data. TCP also has sufficient error checking to guarantee the delivery of data, and that they will always be delivered in the exact same order as they were sent.

UDP

Transport Layer

The User Datagram Protocol is another fundamental core of the Internet. it is a connectionless protocol which runs, like TCP on top of the IP networks. UDP, unlike TCP does not however have very many error recovery services, but is more of a direct way to transceive messages over networks, but has a main use of broadcasting messages, where 100% accuracy is not critical.

IP

Internet Layer

The Internet Protocol  is the main communications protocol on the internet. It is the format of packets (datagrams) and the IP addressing scheme. IP itself is similar to a postal system. Once you address a packet and send it to the host but will not open a direct link between the server and client. TCP/IP will do the above and more as it will establish a virtual connection between the server and client allowing them to send data back and forth for a specified amount of time. The current version of IP used in mainstream today is IPv4. These addresses look something like 31.170.166.179 (the IP of this webserver) and consist of four sets of three deciamal characters, but have an issue of there not being enough. IP addresses are finite, and there are only 3,706,452,992 in the public domain, meaning that the time will come, and it will be soon, that the world will decay into anarchy when we run out. The solution is to move to IPv6 which instead use hexadecimal characters and look somthing like 2001:5c0:1000:11::2 (an IPv6 nameserver). There are 2^128 (using prime factorisation) possible IPv6 addresses which in layman's terms is a whole 340,282,366,920,938,463,463,374,607,431,768,211,456 of them. Safe to say that although IPv6 is not Infinite, it's close enough not to matter.

MAC

Link Layer

Media Access Control is a sublayer of the data-link layer and is responsible for moving packets to and from a NIC, Network Identity Card across a shared channel. Different MAC protocols are used for different network topologies such as Ethernet (Star), Bus, Ring and of course WAN.