Continued writing
parent
8c841918d1
commit
b2a7c4c54a
@ -1,40 +1,110 @@
|
|||||||
You have probably found yourself in this position before: you search up something on Google, click on a link, and it takes you to a web page. Everyone who uses the internet (or is it
|
You have probably found yourself in this position before: you search up something on Google, click on a link, and it takes you to a web page. Everyone who uses the internet (or is it
|
||||||
the World Wide Web?) has done this before; odds are, that's how you got to this very web page. Have you ever wondered what goes on in this process? How is it that, upon clicking a link,
|
the World Wide Web?) has done this before; odds are, that's how you got to this very web page. Have you ever wondered what goes on in this process? How is it that, upon clicking a link,
|
||||||
you are automatically transported to the right web page. How does Google fetch the results in the first place? These questions, and many more, shall be answered in this beginner's guide
|
you are automatically transported to the right web page? How does Google fetch the results in the first place? These questions, and many more, shall be answered in this beginner's guide
|
||||||
to computer networking.
|
to computer networking.
|
||||||
|
|
||||||
|
The only thing that I ask of you, is that you are familiar with number systems, specifically, binary and hexadecimal. These are essential components of the networking world, and are
|
||||||
|
used heavily. A quick glance through the wikipedia articles should help familiarize you with them, as well as how to convert between binary, hexadecimal and decimal (the ordinary number
|
||||||
|
system).
|
||||||
|
|
||||||
Before we begin, I would like to show the model that I will be using to teach this: a model so perfect, so beautiful in its elegance, that it puts any other model to shame. I am talking,
|
Before we begin, I would like to show the model that I will be using to teach this: a model so perfect, so beautiful in its elegance, that it puts any other model to shame. I am talking,
|
||||||
of course, about the <link>OSI model</link> (what kind of model did you think I was talking about?). This will be my 'guiding document', so to speak.
|
of course, about the <link>OSI model</link>. This will be my 'guiding document', so to speak.
|
||||||
so to speak.
|
|
||||||
|
|
||||||
The OSI model is a 7-layer model, where every upper layer is an abstraction of a lower one. The layers of the OSI model build on each other, and none of the layers can exist without
|
The OSI model is a 7-layer model, where every upper layer is an abstraction of a lower one. The layers of the OSI model build on each other, and none of the layers can exist without
|
||||||
the help of all those below it.
|
the help of all those below it. I will start at the very bottom, the Physical layer, and leave you at the top, the Application level. Don't worry if some of the terms don't make sense
|
||||||
will start at the very bottom, the Physical layer, and leave you at the top, the Application level.
|
|
||||||
on't worry if some of the terms don't make sense
|
|
||||||
to you, they didn't make sense to me either, when I first started learning networking.
|
to you, they didn't make sense to me either, when I first started learning networking.
|
||||||
|
|
||||||
With all of that being said, let's jump straight in!
|
I hope you're familiar with the concept of binary: the system of 1's and 0's, the only language that a computer <i>really</i> understands. Every application you open,
|
||||||
|
every video you watch, every image you see, every web page you view, is ultimately, to the computer, just a bunch of 1's and 0's. This is similar to how networks work as
|
||||||
|
well: no matter what type of information you are sending across a network, it has to be converted into binary to be sent 'across the wire', that is, across networks. As an
|
||||||
|
example: if you wanted to view this web page (hopefully, that's why you're here!), you have to fetch the actual document that contains the web page from me, here in Texas.
|
||||||
|
Let's suppose you were living in New York. The document (which is stored on my computer), has to be converted into a stream of bits (1's and 0's), transported across the
|
||||||
|
country to you, and then 'reassembled' into an actual web page.
|
||||||
|
|
||||||
PART 1
|
And all of that, at the drop of a hat! Isn't it amazing?
|
||||||
|
|
||||||
Here we are, the physical layer! It's dark, dirty and grimy, and there's a distinct smell of solder55 in the air. pplication
|
In my example, I covered two very important processes, fundamental to computer networks: <b>encapsulation</b> is the process by which data is converted into bits, while
|
||||||
you open, every video game you play, every video you watch, every image you see, every web page you view, starts with a bunch of 1's and 0's. This is similar to how networks work as well:
|
<b>de-encapsulation</b> is the opposite: it is the conversion of bits, back into data. In the context of the OSI layer, encapsulation goes <i>down</i> the layers, while de-encapsulation
|
||||||
no matter what type of information you are sending across a network, it has to be converted into binary to be sent 'across the wire', that is, across networks. As an example: if you wanted
|
goes <i>up</i> the layers.
|
||||||
to view this web page (hopefully, that's why you're here!), you have to fetch the actual document that contains the web page from me, here in Texas. Let's suppose you were living in
|
|
||||||
New York. The document (which is stored on my computer), has to be converted into a stream of bits (1's and 0's), transported across the country to you, and then 'reassembled'
|
|
||||||
into an actual web page. And all of that, at the drop of a hat! Isn't it amazing?
|
|
||||||
|
|
||||||
With all of that being said, let's jump straight in!
|
Insert image here
|
||||||
|
|
||||||
|
Got it? If not, here's another example: when you requested this web page, your web browser encapsulated the request and sent the bits to my computer. My computer de-encapsulated
|
||||||
|
those bits, in order to decipher the original request. It fetches the web page (which is really just a file), and encapsulates it into bits. Those bits are sent to your web browser,
|
||||||
|
which de-encapsulates them in order to retrieve the original web page.
|
||||||
|
|
||||||
PART 1
|
This is, obviously, an oversimplification and as we will soon see, there are many 'middle-men' to help faciliate both processes.
|
||||||
|
|
||||||
Here we are, the physical layer! It's dark, dirty and grimy, and there's a distinct smell of solder in the air. It doesn't seem like much, but this, my friends, is where it all begins.ncapsulation</b> is the opposite, the conversion of the bits, back into the original data.
|
I want you to keep these two terms in mind, because they are crucial to understanding the OSI model, and networking as a whole.
|
||||||
|
|
||||||
With all of that being said, let's jump straight in!
|
With all of that being said, let's jump straight in!
|
||||||
|
|
||||||
|
|
||||||
PART 1
|
PART 1
|
||||||
|
|
||||||
Here we are, the physical layer! It's dark, dirty and grimy, and there's a distinct smell of solder in the air. It doesn't seem like much, but this, my friends, is where it all begins.
|
Here we are, the physical layer! It's dark, dirty and grimy, and there's a distinct smell of solder in the air. It doesn't seem like much, but this, my friends, is where it all begins.
|
||||||
|
|
||||||
|
The physical layer is honestly the least 'networking-esque' of the layers. Think of it as the foundation for our OSI layer: data can't be transferred through networks, and indeed,
|
||||||
|
networks wouldn't exist, if we didn't have the hardware to create them. The physical layer encompasses the actual cables and wires through which information flows. This is also where
|
||||||
|
the actual bits are transferred: once the data has been completely encapsulated (ie. once we have gone down the OSI layer), all we are left with is bits - these bits, through electrical
|
||||||
|
pulses, are transferred through wires. A '1' represents a high voltage, and a '0' represents a low voltage.
|
||||||
|
|
||||||
|
The maximum rate at which data can flow through a wire is called its 'bandwidth'. If you have a gigabit connection at home, all that really means is that 1 gigabit (a billion bits) can be
|
||||||
|
transferred into and out of your network every second. It is not the speed at which the bits travel (that is determined by physics) but rather the rate at which the bits are transmitted.
|
||||||
|
Bandwidth depends on a number of things, including the actual material used to create the cable. Copper is the most common one, but most ISP's (Internet Service Providers, think AT&T and
|
||||||
|
Verizon), are now switching to glass: this is the fiber-optic conection that some of you may have.
|
||||||
|
|
||||||
|
The key point to note is that bandwidth is the <i>maximum</i> capacity of your connection: don't expect anything more, but you can sure expect something less! The actual rate of data
|
||||||
|
transfer through a wire, is called it's 'throughput'. This can never be greater than the bandwidth, but it is often <i>less</i> than the bandwidth. This can occur due to a number of
|
||||||
|
reasons, including the amount of traffic that is flowing through a network.
|
||||||
|
|
||||||
|
The best way to visualize this is to imagine a highway. Bandwidth is the theoretical maximum rate at which cars can go through a highway, if everyone drove perfectly. It is determined
|
||||||
|
by factors such as the number of lanes and the condition of the road. However, as you probably know, most people are terrible drivers. This results in congestion and backed-up traffic.
|
||||||
|
At this point, the rate at which cars go through the highway, is the throughput. This is influenced by such factors as the number of cars and the types of cars that are going through
|
||||||
|
the highway. Notice the difference: bandwidth is independent of the actual data, while throughput is heavily influenced by it.
|
||||||
|
|
||||||
|
Another important term (that you may have heard before) is latency. This the amount of time, including any delays, that it takes for data to travel from one part of a network to another.
|
||||||
|
If you ever have a slow connection, that means you have a high latency. Latency can be caused by any number of factors, including congestion of traffic on the network.
|
||||||
|
|
||||||
|
If you're browsing this web page on your phone, you may notice that there are no wires that extend from your phone, and receive the web page. So how does the data get to your device?
|
||||||
|
This is where Wi-Fi comes in. Wi-Fi, or Wireless Fidelity, is a technology that allows information to be encoded in radio waves, and sent over the air. There are two standard bands
|
||||||
|
for Wi-Fi signals, 2.4 Gigahertz or 2,4G, and 5 Gigahertz, or 5G.
|
||||||
|
|
||||||
|
So that's the physical layer - it may be boring, but it is the foundation of the internet as we know it.
|
||||||
|
|
||||||
|
Now, let's go upwards - onto the next floor, where we see the data link layer.
|
||||||
|
|
||||||
|
|
||||||
|
PART 2
|
||||||
|
|
||||||
|
Ah, finally! Daylight! We're now in the Data Link layer, on the second step of our journey. There's a lot that happens here, and this is where we begin to notice some semblance to actual
|
||||||
|
networking.
|
||||||
|
|
||||||
|
The Data Link layer is how we address devices <i>physically</i>. You see, every device that communicates using a network needs to have a certain device, without which, network
|
||||||
|
communication cannot take place. This device is commonly known as a network card, but the technical term for it is a NIC (Network Interface Card).
|
||||||
|
|
||||||
|
INSERT IMAGE HERE
|
||||||
|
|
||||||
|
A NIC receives information through an ethernet port. You may have seen one of these on your PC, but most laptops, especially recent ones, have decided to forego this port. What this
|
||||||
|
means, is that the NIC only receives data wirelessly. But, all the same, every network-capable device must have a NIC, and at a fundamental level, all information must enter or leave
|
||||||
|
through a NIC.
|
||||||
|
|
||||||
|
But how does the data reach your NIC? Every NIC is identifiable by a certain address. This address is 'burned in' during the manufacturing process, and is globally unique (your NIC
|
||||||
|
is the only one in the world with that address). This address is known as a MAC address (not to be confused with the more well-known IP address). A MAC address is a physical address,
|
||||||
|
which means that it a) never changes, and b) refers to a specific device.
|
||||||
|
|
||||||
|
A MAC consists of 48 bits, although it is often written in hexadecimal. This results in 12 hexadecimal digits. The address is separated into six groups of two (separated by colons),
|
||||||
|
with the first three groups identifying the manufacturer of the NIC, and the next six groups identifying the device itself.
|
||||||
|
|
||||||
|
Keeping up so far? Here's an example of a MAC address.
|
||||||
|
|
||||||
|
AA:BB:CC:11:22:33
|
||||||
|
|
||||||
|
Notice the six groups of two. The first three groups (AA:BB:CC) are called the OUI (Organizationally Unique Identifier), and identify the manufacturer. The last three groups
|
||||||
|
(11:22:33) is an identifier that is unique to that specific NIC.
|
||||||
|
|
||||||
|
Every manufacturer has an OUI assigned to them by the IEEE (Institute of Electrical and Electronics Engineers), a global regulatory body. For example, one of Apple's OUIs is 6C:E5:C9.
|
||||||
|
A simple Google search will provide you with this information.
|
||||||
|
|
||||||
|
|
||||||
|
Now, let's tie this back into encapsulation. With every step in the encapsulation process (ie. with every layer that the data goes down), the layer adds relevant information to the data,
|
||||||
|
that will help the data be sent to the correct destination.
|
||||||
|
Loading…
Reference in New Issue