Lesson 2 - Network Concepts
In this chapter we're going to learn all about protocols, the rules of networking. We'll also learn how to work with binary numbers.
What is a Protocol?
We're used to the idea of a protocol. A protocol is a set of rules or standards that everybody agrees to. When we go to the store and purchase a lamp we know the plug will work with your outlets at home. The outlets at home all follow the same rules, so any electronic device will work.
In the networking world we have the same idea. We have a series of rules that we've all agreed to follow. These rules are called protocols. If both sides of the connection use the same rules then we have communication. This is the equivalent of a common language when we refer back to our elements of communication from Lesson 1.
If you have wireless at home all your wireless devices connect to the network easily. You may have to type in a complicated password, but once entered the device is on the network. Guests are able to connect to your network easily. This is because we have those standards, or protocols, that everyone agreed to. If we didn't have these protocols we would have the situation in the cartoon.
Without standards, or protocols, each vendor would have to create their own solution for connecting devices together. This would cause things to be incompatible with each other. Without these protocols the Internet as we know it wouldn't be possible.
Sending the Data
On a computer everything is represented by either a 0 or 1. A 0 or 1 is referred to as a bit, or binary digit. 8 bits together are called a byte. When devices are networked together they are sending bits, or 1's and 0's back and forth.
The protocols are used to describe how bits get from one device to another. When we look at the different devices we use we can see they connect multiple ways. We may have a tablet that connects wirelessly, or a desktop with a network cable. Each connection type has it's own set of protocols.
A computer connected with a cable uses different voltages to represent 1's or 0's. On a wireless network different frequencies are used. In order to have successful communication both sides have to agree what the voltage and frequencies represent. Encoding is the process of converting data into these voltages and frequencies.
Splitting the Data
Sadly computers and network equipment/cabling are not perfect. We can't assume all the data we send will arrive correctly. There's a chance some 1's will change to 0's or visa versa. There is also the chance some 1's and 0's will get lost or dropped along the way. If we send a very long stream of data and it fails along the way we would have to send the entire stream again. Instead of sending the entire stream of data in one burst we split the data into smaller chunks and send them separately. We will generically refer to this chunk of data as a packet for now.
With the data split into packets we can now easily do error recovery. Error recovery is when you're expecting a certain number of packets, but some in the middle are either missing or damaged and steps are taken to request the missing packets. For example if you're sending data that needs to be split into 5 packets they'll be labeled (1 of 5), (2 of 5), (3 of 5), (4 of 5), and (5 of 5). If the receiving computer is missing (2 of 5) it will ask for packet 2 to be retransmitted.
In later lessons you'll need to know how to work with binary numbers. We're used to a base 10 system, or decimal, where we have 10 digits to work with. (0-9) In the decimal system each digit represents how many of each place value are present. In the decimal number 42 we have 4 10's and 2 ones. 40 + 2 = 42. Each place value is a multiple of 10, as you move to the left each place value 10 times the previous value.
Binary is a base 2 numbering system where we only have two digits to work with. (0-1) We have place values just like a decimal number, but they represent different values. In binary as you move left each place value is 2 times the previous value starting with 1.
Since we only have two digits in the binary system each place value can only be a 0 or 1, or turned on, or off. If you want to convert a binary number to decimal you take the bits that are turned on, or 1's, and add them together. The binary number 101 is 5 in decimal because the 4 place and 1 place are both turned on, or 1. We add 4 + 1 to get 5.
Here are a few more examples of binary numbers converted to decimal. In each example the place values with 1's are added together giving use the decimal value.
Converting from decimal to binary is also an easy task. Find the largest binary value you can turn on then subtract it out and repeat the process with the result until you hit zero. All remaining place values are set to 0, or off.
For example if you're given the number 42 and you want to convert it to binary you would find the biggest binary place value that fits. In this case 64 is too big so we use 32. Turn off 128, and 64 by placing 0's then turn on 32 by placing a 1 in the 32 place value. Then subtract 32 from 42.
Now we repeat the process with the result. Find the largest place value we can subtract from 10. 16 is too large, but 8 will work. Let's turn off 16 and turn on 8 and subtract 8 from 10.
Now we're left with 2. We know we can't use 4 so turn it off and turn on 2. Then subtract 2 from 2.
The result is 0, this is how you know you're done. Place 0's for all the remaining value and you'll have the binary value that represents the decimal number 42. 00101010
The Many Layers of Networking
Protocols go through a process before they become standards. The IETF or Internet Engineering Task Force represents the group of individuals responsible for maintaining the specifications of these protocols. Before a protocol is adopted as a standard a proposal is written up and published for review. The published proposal is called an RFC or Request For Comment. Others will make suggestions and identify problem areas and the RFC will be updated. Once the members of the IETF agree on all the specifications the standard will become official.
Many people have heard the term TCP/IP before now. TCP/IP is the name given to a collection of protocols all working together to provide network connectivity. Two of the protocols in the TCP/IP suite of protocols are TCP and IP.
TCP (Transmission Control Protocol) is a protocol known for its error recovery abilities. It's the protocol responsible for asking for packet (3 of 5) to be retransmitted when it doesn't make it.
IP (Internet Protocol) is responsible for moving your 1's and 0's around the Internet. Without IP you'd never be able to leave your LAN.
TCP/IP is a layered network model. Each layer represent the general functions that need to be accomplished. The layers function independently from each other and can be swapped out as needed. The Application Layer takes the network request from your applications and put them in the correct format. Next is the Transport Layer which takes the data and splits it into packets and adds the labels (1 of 5), (2 of 5) etc. Each packet is sent to the Internetwork Layer where information is added to help move the data around the network. Then it's send to the Data Link Layer where more information is added. Finally the data reaches the Physical Layer where it's encoded and sent on its way.
The layered approach to networking and protocols when combined together make life a lot easier for the network community. Developers don't have to be concerned with how you connect to the network, only that you are connected to the network. We don't have applications that won't function because you're using a wireless connection instead of a wired connection. We don't have to worry about what how to put a signal on a wire, or send data wirelessly. We just tell the system to send data and it does.
The ISO (International Standards Organization) was working on their own layered approach to networking around the same time TCP/IP was being developed. TCP/IP became the dominant standard and is what's used by all our devices, but there is a lot of crossover between the two models. The OSI Model (Open System Interconnect) is a 7 layer networking model used primarily as an educational tool and discussion point when referring to the layers. Anyone in the networking world need to know about the OSI model.
As you work in the different layers of the TCP/IP and OSI models there will be some terms that change depending on the layer on which you're working. The name of the addresses, and the chunks of data created are different at each layer. So far we have been referring to the chunks of data as packets, but you will find that is not an entirely accurate term at each layer. As we progress through the course make sure you're able to identify the data names and address types at each layer. The image below will be filled out with more information as the course progresses. It will be important to know this information.
The next 5 lessons cover each of the 5 layers of the TCP/IP model. We will look at the Physical Layer followed by the Data Link Layer. After that we'll jump to the top and look at the Application Layer and work our way down, hitting the Transport Layer, and finally the Internetwork Layer.