Sunday, 19 May 2019

Internet Protocols

Basically protocols are the backbone of how the internet works. The thing is that protocols are what you could consider to be a set of standards that everybody follows. I'm not sure if law is the way that you could describe it, procedure is probably a better word. Look, you could do things differently if you really wanted to but in the end your system, unless it is adopted by everybody, simply won't work. You get that in a corporate or office environment - the company has their specific procedures, and if you don't follow those procedures it isn't as if you are going to cause any actual damage, it is just that things won't get done as efficiently as normal - actually, that is probably a bad example considering some company's protocols are pretty poorly designed and implemented, but I hope you understand what I mean - it is more procedure as opposed to law.

The internet has actually been around for quite a while - dating back to 1969 when the United States Department of Defense wanted to develop a way to have computers speak to each other. Actually, the whole idea was to create a system where information could be distributed across a whole region and that the connections would provide a system of redundancy. You could say that it was to create something that could provide a failsafe against a nuclear attack, meaning that if one node was taken out, there would not only be backups, but the other nodes could continue to speak with each other and share information.

From this comes the TCP/IP protocols, or more specifically the Transport Control Protocol/Internet Protocol, and it is this that we will be looking at over these various posts. Mind you there are other protocols out there, but TCP/IP is the standard that basically our world wide web uses to enable you to order a pizza from that really awesome pizza shop on the other side of town (though whether they will actually deliver it to you is another story). Another protocol, UDP, or User Datagram Protocol, is also commonly used, but this protocol really only comes into play when we are doing something like a Facebook Live, namely because it is much more concerned with speed as opposed to accuracy.

Networks

In a nutshell a network is a collection of nodes that are connected by communication links. A node could basically be anything - well not anything because I'm not sure if you could turn a pineapple tree into a node, though honestly, with this internet of things revolution going on, pretty much anything is possible these days. However, in the traditional sense, a node could be anything computer related, such as a computer, a printer, or even a remote storage device. However, as mentioned, this revolution with the internet of things does mean that there are going to be many, many more devices being added to the network in the coming years.

So, we can split networks into three types: Local Area Networks (LAN), Medium Area Networks (MAN), and yes, Wide Area Networks (WAN). Local Area Networks really only exist within an organisation, and are probably referred to as being the Intranet, particularly if you are working for a largish company, as I used to. Generally LANs require access, whether it being physically present within the location, or being invited to use it from the outside. LANs tend to be connected to each other through the use of VPNs, or Virtual Private Networks. This is why many companies are now able to offer the ability for their employees to work from home. Mind you, these VPNs can actually be ridiculously slow at times.

Medium Area Networks sort of sit in the middle ground between the LAN and the WAN. The one major thing with regards to these networks (and this applies to LANs as well) is that they are incredibly fast. Sure, it may sound as if the internet in your local area may be a MAN, but the thing is that they don't actually rely upon the services of the local telephone company. One of the reasons is that with everybody using the service then congestion can be pretty high (try using the wi-fi in a hotel and you will know what I mean). They can be public networks, but can also be private, and generally appear in large corporations or even government entities. For instance, that free wi-fi that the local council offers is probably a MAN.

Finally we have the WAN, which could basically be the internet itself. Yet it might not actually be the case, because these networks are so huge that the mind itself boggles. For instance, the network used by a multi-national corporation could quite easily be a WAN. The thing with WANs is that they don't necessarily provide connection to the nodes across the internet - they might actually have their own private connections that they use, whether it be cable or even satellite (though satellite isn't all that reliable, you know, sunspots and all that).

So, these are the three network types, so let's finish off by looking at the OSI model.

Open Systems Interconnection (OSI) Model

The OSI model was created by the International Standards Organisation as a framework for providing a way for computers to be able to communicate with each other. The model works on the principle that each of the layers has its own functions to perform, and that any changes that occur in one layer will not concern any of the other layers. Basically, the layers will pass a packet down through them, and each of the layers add their own header until such a time that it is sent across the internet. Each of the layers are basically not concerned with what as gone on above, or what will go on below - they are only interested in the functions that occur in their own layer.

As data is passed down through a layer, the layer will add its own header to it, and when the receiver receives the data, each of the layers will strip off the header associated with it and then pass the data up to the next layer, until it reaches the top. Basically each layer relies on the lower layers to perform the more primitive functions, while each of the layers also provides services to the next higher layer. This diagram from my lecture notes may help explain it:

So, let us now go over each of the layers:

Application Layer: this is basically where the program that you are utilising sits. Say, you are sending an email, then the email program is what sits at the application layer, as does the browser that you may be using it through.

Presentation Layer: The data is turned into a human readable form in this layer, though on the way down it is where it is packaged into machine readable form. You could say it is also translation, but it also works to make it pretty. This layer is also where data is compressed to make it's journey across the internet much faster, and more efficient.

Session Layer: This is where each of the sessions are opened, maintained, and closed. It is probably not all that noticeable these days, but back when I was younger, when we would log onto a computer using programs like Telnet, these functions that opened a connection between my computer and the university server occurred at the session layer. In fact, I was doing this much more recently, when I would mount the server onto my computer to enable me to work on my assignments without having to download and upload on a way too regular basis.

Transport Layer: Now, this is where we start to get into the actual communication aspect of the internet. Where as the session layer establishes the connection, the transport layer is where the connection is maintained. Also, it is here that the data is divided into packets to be passed down through to the lower layers, and then across the internet.

Network Layer: It is here that the decisions are made as to where the packets are sent. Basically when a packet hits a node it is passed up to this layer where the ultimate destination is read, and it is then determined which node the packet will then be passed on to.

Data Link Layer: One of the problems with passing data through the internet is that they don't always arrive in the same way that they were sent. This layer is where the error control is handled and it is here where the package is determined whether there is an error or not. This layer is also where the medium access control is located, or the MAC address (more on that later, but every device has its own, unique MAC address).

Physical Layer: Needless to say this is where all of the wires and radio waves are located. However it is more than that because it is here where the transmission medium is decided, and also where the bits are translated into signals, whether it be a radio wave, or simply being passed through a copper, or optical wire.

Source: Understanding the Seven Layers of Computer Networking
The thing is that networks are incredibly complicated beasts, and are made up of routers, software, packages, links, and lots and lots of other things. This is why protocols are required because without them nothing would happen, and nothing would be passed through to another. As such, we wouldn't be able to book the doggy hotel for our pets, or order that drone from an electronics firm. For the internet to work, there needs to be co-operation.

So, this is where the TCP/IP model comes into play. While it is similar to the OSI model, there are new differences. TCP/IP is responsible for adding headers to data and to the packets. However, TCP is only implemented in the end systems, namely your computer and that Google server that you might be accessing to perform your search. The IP however is responsible for getting the data from one end system to the other, and is applied not only in the end systems, but also in all the routers in between. So, the TCP passes the data down to the IP and the IP passes it down to the network. The TCP will add a TCP header, which will turn the data into a TCP segment, and the IP will add an IP header to turn it into an IP datagram. Finally the network will add a network header to turn it into a network packet, which is then sent into the wild world of the internet.

This following diagram will explain the relationship to the two models.

So, that is the basics of the internet protocols. Next we will look at data transmission and sampling.

Creative Commons License

Internet Protocols by David Alfred Sarkies is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.. This license only applies to the text and any image that is within the public domain. Any images or videos that are the subject of copyright are not covered by this license. Use of these images are for illustrative purposes only are are not intended to assert ownership. If you wish to use this work commercially please feel free to contact me

No comments:

Post a Comment