149 lines
13 KiB
Plaintext
149 lines
13 KiB
Plaintext
|
|
Episode: 351
|
||
|
|
Title: HPR0351: Network Basics
|
||
|
|
Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr0351/hpr0351.mp3
|
||
|
|
Transcribed: 2025-10-07 17:02:08
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
Shame on me to find out.
|
||
|
|
Hi everyone, welcome to Hacker Public Radio. My name is Klaatu and this is the first episode
|
||
|
|
in a dedicated series on how a network or how networking works. It is good to be aware
|
||
|
|
that this is all academic knowledge, not experiential. So I'm not that bearded unique
|
||
|
|
sadness who's been in the business for 35 years and with a dozen war stories. I'm not
|
||
|
|
going to be able to tell you how even though the spec says one thing in reality if you
|
||
|
|
do this, this and this, and you could achieve such and such. I really don't know about
|
||
|
|
that kind of stuff. I've got a couple of war stories just from odd jobs that I've had
|
||
|
|
working on, a network, or maybe from a few little experiments I've done at home, but most
|
||
|
|
of all of this is just going to be academic knowledge. But I think it's important to have
|
||
|
|
that underlying understanding of the functionality of, in this case, networking because from there
|
||
|
|
we can at least, we can use it as a leaping off point for our own experiments and for our
|
||
|
|
own understanding of how it really works. But this is everything about how it's supposed
|
||
|
|
to work, how it was designed, what all the terminology means, what the process is. So in
|
||
|
|
this first episode, I'm going to talk about the OSI model, which is a kind of mental framework
|
||
|
|
that a couple of standards groups, including the ISO, came up with so that there could be
|
||
|
|
a common basis for the networking process. So the OSI model is going to give us a good understanding
|
||
|
|
of what happens and when it happens in the chronology, the lifespan, and the topology of
|
||
|
|
a network. So it's a layered approach of understanding this and it covers everything from software
|
||
|
|
to hardware. And the topmost layer is called the application layer. And this is where most
|
||
|
|
users hang out. This is the user interface, essentially. It's the applications that we use
|
||
|
|
to interface with a network. So everyone's familiar with Firefox and maybe Opera and E-links.
|
||
|
|
Applications like that, IAM clients like Copetta, Pigeon, things like that. There's Thunderbird,
|
||
|
|
Evolution, FTP, there's GFTP, there's Filezilla, there's XChat, Chatzilla, IRSSI. All these
|
||
|
|
applications are the way that computer users from the most novice to the most geeky are interfacing
|
||
|
|
with the network because if you think about it, really practically all network activity is caused
|
||
|
|
from these applications. So if we're in Firefox and we request a web page, that's kind of
|
||
|
|
initiating a process on the network. If we're chatting with someone over IAM, then we're initiating
|
||
|
|
network activity when we send and receive messages. FTPing a file up to our server, or we're getting
|
||
|
|
getting a file off of our server. All that good stuff, network activity, those are the applications
|
||
|
|
we use. Now underneath the application layer, there's the presentation layer. And the presentation
|
||
|
|
layer is more or less the back end of those applications. This is the stuff that will take the data
|
||
|
|
and process it processes it for use on the network or use by the application. So if we're doing
|
||
|
|
SSH, for instance, the presentation layer is doing the encryption or HTTPS presentation layer,
|
||
|
|
doing all that stuff. So it's translating the data from the formats that they are going to be
|
||
|
|
in the application layer to what they need to be for everyone else to understand. You know,
|
||
|
|
you don't send an HTML page as is over a network. Obviously, you have to translate it into
|
||
|
|
plain ASCII or whatever it needs to be translated into. So that's presentation layer.
|
||
|
|
Underneath that is the session layer. And this is kind of assessing that keeps all the data
|
||
|
|
from the different user applications separate from it from one another. Now the place the
|
||
|
|
networking fund really starts for most of us is the transport layer. This is where, for instance,
|
||
|
|
TCP is located. This is, for instance, where TCP is located. The transport layer delivers the data.
|
||
|
|
It takes care of error correction and retransmission. It establishes, if it's TCP, it establishes
|
||
|
|
a virtual circuit between your computer and the other computer that you're going to be talking to.
|
||
|
|
It starts the sessions. It makes sure that the data gets from your computer to the next computer
|
||
|
|
or from that computer back to you. Now, and it does this, again, if it's TCP, it does this with a
|
||
|
|
handshake. So at first, it first creates a window and that's not a window on your screen. It's a
|
||
|
|
window of data. And it says, okay, these data packets are going to be sent within this window.
|
||
|
|
And it starts sending the information out to its destination. And it sends, and then it waits
|
||
|
|
for an acknowledgement. If it doesn't receive an acknowledgement, then it knows something went
|
||
|
|
wrong. There's been a lost segment. And so then it needs to rescind that segment. And that is
|
||
|
|
exactly what TCP does. It's a way for the computer to send the data and make sure every packet was
|
||
|
|
delivered reliably. Now, on the transport layer, there's also UDP, which doesn't do that kind of
|
||
|
|
handshake. It's not a reliable form of sending information. There are certainly uses for it,
|
||
|
|
but it doesn't do that. And that is also located on the transport layer. So it just depends on which
|
||
|
|
protocol you're using and see exactly what's going on in the transport layer. But the transport
|
||
|
|
layer does start is is responsible for sending the data. And sometimes confirming that the data
|
||
|
|
was received, depending on the protocol. And we'll go over all that stuff on future episodes.
|
||
|
|
This is just an overview of the of the model of networking. Underneath the transport layer is
|
||
|
|
the network layer. And this is the thing that takes care of the addressing, the logical addressing.
|
||
|
|
So if you've heard of, for instance, TCP slash IP, right? Common enough term. The TCP was on
|
||
|
|
the transport layer. And the IP is on the network layer. So IP and other protocols take care of
|
||
|
|
how each computer knows its address or how the routers know the addresses of the computers.
|
||
|
|
So it could be IP version four, it could be IP version six. It could be something completely
|
||
|
|
different. If a router, for instance, on your network receives a packet, it's going to check that
|
||
|
|
packet for what IP address it wants to go to. It's going to check that address and it's going to
|
||
|
|
check what it's aware of on the network. And as either going to forward that packet to the correct
|
||
|
|
interface or it's going to drop the packet because IP address isn't valid or it's not it's not
|
||
|
|
accessible via that router. So that's what that's what the networking layer does. The network layer
|
||
|
|
also deals with the sort of the awareness of the networking neighborhood. And there are protocols
|
||
|
|
specifically that simply go out and update the routers on the network about kind of what's
|
||
|
|
around them. So there's RIP and RIP version two and OSPS and all these little protocols who go
|
||
|
|
around to routers and update them on what's around them, kind of giving them updated maps,
|
||
|
|
street maps of their network. So those are important as well, although we don't really hear
|
||
|
|
about them too much, but there is good to be aware of and that again happens on the network
|
||
|
|
layer. So the network layer again just kind of by its very name kind of makes sense. It deals with
|
||
|
|
the layout of the land. Underneath that is the data link layer. And the data link layer really deals
|
||
|
|
with the data that's being sent. It combines packets into bytes that can be sent over the network.
|
||
|
|
It packages things into frames. It gathers MAC addresses of the different things being sent
|
||
|
|
around or rather of where they're going to be sent. It also does error detection, but it does not
|
||
|
|
do correction like the transport layer. But the data link layer will verify the data that it's
|
||
|
|
dealing with to make sure that it's not corrupt data. So the data link layer ensures that the data
|
||
|
|
is delivered to the proper device on a network because it knows the exact physical address of that
|
||
|
|
device. It knows the MAC address. The address that is burned into the networking card.
|
||
|
|
Now it's not to say you can't spoof a MAC address, but that notwithstanding. It's going to look
|
||
|
|
and make sure that the MAC address that the data got sent to is the MAC address that it thought it
|
||
|
|
was trying to deliver to. Now it also translates the messages from the network layer into bits,
|
||
|
|
little ones and zeros, for the physical layer to transmit because that's what the physical
|
||
|
|
layer can do. And in fact that brings us to the final layer, which is a physical layer. That's
|
||
|
|
the bare metal. That's the wires, the cables and networking cards and the computers and the cell
|
||
|
|
phones and the printers and everything that is on your network, hardware-wise. And physical
|
||
|
|
layer is really just the medium over which all this stuff is sent. So obviously the physical layer
|
||
|
|
cannot send anything but bits, just ones and zeros because that's what we deal with in the computer
|
||
|
|
world. So that cable that you've got from one computer to the router, that's the physical layer.
|
||
|
|
And if you cut that cable, the signal stops. So that's all the physical layer is. It's the actual
|
||
|
|
hardware over which all this stuff is being sent and that's what it's responsible for. It can do it
|
||
|
|
in a variety of different ways. It used to do with audio tones and things like that. You might do it
|
||
|
|
with varying levels of voltage or whatever, but that's what it does. And that's the trouble when
|
||
|
|
you're troubleshooting your network. If you're troubleshooting the hardware and stuff like that,
|
||
|
|
you're dealing with a physical layer. And that's that's the kind of thing that that a lot of us also
|
||
|
|
deal with in addition to the application layer. You know, if Firefox isn't responding and then you
|
||
|
|
check your i-hims and you're not getting any messages from there either and suddenly your
|
||
|
|
network manager says you're offline, maybe one of the things you do is you go and settle with wires
|
||
|
|
and cable and make sure that everything's plugged in securely or maybe you go restart your router
|
||
|
|
things like that. So a lot of us geeks do deal with the physical layer as well. The stuff kind of in
|
||
|
|
between all the networking layer and the data link layer and stuff like that, a lot of that is going
|
||
|
|
to be developed for the developer world because it's not really up to a network admin to say,
|
||
|
|
okay, well, is this, you know, is this protocol the correct choice for me for this program? Network
|
||
|
|
admins aren't really choosing between TCP and UDP for something. That's where the programmers do
|
||
|
|
their work for the application that they're writing. The network admin and the geeky computer user
|
||
|
|
are going to be the guys who are choosing the physical layer, choosing the gear, the best router for
|
||
|
|
the job, the best kind of cables for the job, et cetera, and then setting up the applications for
|
||
|
|
the users to interface with that network. So that's where we're going to be hanging out in real life,
|
||
|
|
but for the purpose of this, for these episodes, we will also be examining everything in between
|
||
|
|
because that's important stuff to understand so that if after you restart the router and you've
|
||
|
|
swapped out all the cables, something's still not working on a certain application, maybe it's
|
||
|
|
another problem, maybe something's wrong with that application or maybe you need to switch
|
||
|
|
out in routers or maybe your network is being congested because you don't have enough routers
|
||
|
|
and you're using hubs, whatever. So we will understand all that in due time, but for now,
|
||
|
|
that's really covered it. That is the OSI model. Quick review application layer is where the user
|
||
|
|
land applications are. Everything that interfaces with a network from the user is located in the
|
||
|
|
application layer. We need that as the presentation layer, which takes the data generated either by
|
||
|
|
or for the application layer. It figures out what format of data it needs to be in. The session
|
||
|
|
layer is beneath that and that keeps all your data organized and separate from one another,
|
||
|
|
make sure that you're getting data into the proper applications and things like that because
|
||
|
|
it establishes sessions so that data can be sent between different nodes on your network or within
|
||
|
|
the networking model. The transport layer is where TCP and UDP are located and it's the thing
|
||
|
|
concerned about sending the data out and receiving the data in to the computer. The networking layer
|
||
|
|
beneath that isn't seeing the deals with the layout of the network, figures out where different
|
||
|
|
nodes are located, where different devices are located on your network. Very important is basically
|
||
|
|
the place that logical addressing occurs. We need that as the data link layer, which worries about
|
||
|
|
things that are going to be sent over this network, whether it's addressed properly to the actual
|
||
|
|
physical device. This is dealing with a MAC address, not just the IP address, not the logical address,
|
||
|
|
but the actual physical address of the device. It combines all the data into whatever kind of data
|
||
|
|
it needs to be for the physical layer, which would be in the end bits, ones and zeros. Finally,
|
||
|
|
you do have the physical layer. That's the hardware. That's the hardware that you've chosen for your
|
||
|
|
network, maybe your home network, maybe your businesses network. It's the routers, the hubs,
|
||
|
|
the switches, the bridges, the cables, the computers, the cell phones, the printers, all that other good
|
||
|
|
stuff. That's your network. That's the OSI model of a network. I hope you've enjoyed this first
|
||
|
|
episode. In the next episode, we will be talking about actually routers, hubs and all that
|
||
|
|
other good stuff. So, thanks for listening.
|