Files
Lee Hanken 7c8efd2228 Initial commit: HPR Knowledge Base MCP Server
- MCP server with stdio transport for local use
- Search episodes, transcripts, hosts, and series
- 4,511 episodes with metadata and transcripts
- Data loader with in-memory JSON storage

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 10:54:13 +00:00

309 lines
19 KiB
Plaintext

Episode: 357
Title: HPR0357: Network Basics Part 2
Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr0357/hpr0357.mp3
Transcribed: 2025-10-07 18:47:06
---
Music
Last time on Basic Networking.
Today we're going to go over the OSI model a framework for us to understand the life of
a network event or the structure of a network.
At the top is the application layer, which is the applications that we use on every day,
basis like email clients, FTP clients, IRC clients, web browsers.
Beneath that is the presentation layer, which formats, converts, encodes, and, I guess,
presents data so that the software in the application layer can actually use it.
Below that is the session data, and that sets up manages and stops sessions between
different applications and helps exchange data between presentation layer entities.
Underneath that is the transport layer, this is what brings us reliable communication
between end nodes over the network.
The important thing to remember is certainly about transport layer, is that it's where
TCP and UDP reside.
Below that is the network layer, that's where all scenes IP are, including routing and
logical addressing.
Below that is data link layer, which ensures the data flow over the physical layer, which
is the bottom of the layer, is talks MAC addresses rather than IP or logical addresses.
And finally, the bottom layer is physical layer, and that converts the frames that the
data link layer produces to electrical signals.
Essentially, this is the bare metal.
Hi, everyone.
Welcome to Hyper Public Radio.
My name is Clad2, and this is basic networking.
So what is internet work?
If you think about it, you got computers, but obviously there's other stuff on the
modern network.
Certainly, there are printers, but there are also cell phones, internet tablets.
There are media centers, GPS units, all kinds of things.
It's a pretty diverse environment at this point.
Important thing to remember about all those devices is that inside of them, there's some
kind of network card or network interface.
This is important to remember because there is this concept of a MAC address, media access
control, and that is burned into the network card itself.
And it's just helpful to remember that your device is not necessarily, I mean, your device
is many different parts put together.
And one of those parts, when we're talking about networking, this is probably one of the
most important parts, is the network card.
So just keep that in mind.
And there might be a different MAC address on your wire, but there will be a different MAC
address on your wireless card as opposed to your Ethernet card, for instance.
So when you're setting things up or something goes wrong, the good thing to remember.
Ethernet cables.
There are Ethernet cables, right, because from one computer to the router, where it goes
from a router to a hub or whatever.
And then finally, the things that are to kind of bring all these different components together
are the routers, the hubs, the switches, and apparently there were bridges at one point,
although I've never used one, and don't know much about them, but it was, I guess, a switch
from the days of your.
So we're going to talk about mostly the routers, the hubs, and the switches, because these
are distinct devices that need to communicate on your network, and they communicate in a
very distinct kind of way.
And it's really important that we understand what exactly they're doing and what exactly
they don't do, so that we can better design the network for optimal performance and also
troubleshoot when something goes wrong.
So a router is a switch, actually.
No, not every switch is a router, but a router is a kind of switch, and it operates specifically
on layer three of the OSI model.
And if you think from when you might be able to just yell out what layer three is, but if
you can't, I'll go through it really quick.
There's physical layer at the very, very bottom, right?
That's the bare metal, the wires, the cards, network cards, things like that.
Above that is the data link layer, and then above that is the network layer, which is
the IP and the logical addressing and stuff like that.
Well, guess what?
That's one, two, three, so that's the networking layer.
So routers are just switches that operate on layer three or the network layer.
Routers are concerned with the location of a network, and that's an important distinction
from other kinds of devices, because other devices are more concerned about the location
of a device, according to that address, to the IP address or whatever.
But routers are concerned with the location of a network, and when they get a packet,
they look at the packet, and they figure out, okay, what neighborhood is this address located
in?
It's not trying to find a house.
It's just trying to find the basic, the neighborhood, so the router takes a network
and networks it to a network.
So it's got little neighborhoods of devices, and it can just kind of, it forwards the packets
onto the right neighborhood, according to the IP address.
They do not forward packets by default, and that's an important concept, because other
devices will.
Certain devices will, if it receives a packet, they have been sent out over the network,
it will forward it through to the rest of the network, no matter what.
It doesn't matter where the packet is destined, it will just send it out to everything, and
everything has to look at it, and decide whether it's meant for it or not.
It would be like, if I mailed the letter to Enigma and the postman, brought that letter
to every house between me and Enigma, asking if it was for them, so that would be pretty
complex.
It would take a long time to get to Enigma, and it would really bug a lot of people from
here all the way down to where Enigma lives, so that wouldn't be very efficient.
So routers, they look at the address, whether it's 192.168.100, or whether it's 68.204.100.93,
and it says, oh, I know where this is, it's in this network way over here, and it forwards
that packet just to that network.
So essentially they do four things.
They do packet switching, meaning that they'll take packets and forward them to some other
port.
They'll do packet filtering, which, like I said, it'll get a packet, it'll see if it
really needs to be sent to every single thing on a network, or whether it can just go straight
to network X.
It does network to network communication, and it does patch selection, and patch selection
is just a fancy way of saying that it's going to find the shortest number of hop over to
another network.
So if you've ever done like a trace route, and if you haven't, we can do one really quick
just type in trace, T-R-A-C-E-R-O-U-T-E, this is in your terminal.
And let's do, well, you know what, let's do it this way.
Let's do trace route, and then if you have another computer on your network, do a trace
route to that, if you happen to know the IP address, I'm going to do one that I'm pretty
sure I know the address to, and then hit return.
So I just put trace route 192.168.100.201, and that's on my local, that's right here on
my local network.
So I'm typing that in, I hit return, it takes a moment to ping that computer, and sure
enough, it finds that computer, and it just gives me one line, which is basically a reiteration
of the name of that computer, web inbox.fubar.com, and then the IP address, and the data of
how long it took, things like that.
So that was one hop.
It only took one hop to get over to that computer, and that's pretty fast.
So now let's do something a little bit more complex.
So I'm going to type in trace route, space, hacker, public, radio.org, and I'll hit return.
And the first line that I see right away is my own IP address.
Next line is three asterisk, which means that the device in question has been configured
to drop ICNP packets, that is, pings, rather than respond to them.
It doesn't mean it's not hitting that device, it just means that it's not responding to
that ping.
And then after that, I get out to my ISP's IP address.
That's the one I would see if I went to what's my IP.org, and looked at what IP address
I'm actually broadcasting to the world, and there's some statistics on how long it takes
to respond to that ping, you know how many milliseconds.
And then under that, I got a whole bunch of things I'm bouncing around within Comcast.
And then by line nine, I found the carohosting.com server, which is the fine hosting service
that hacker, public, radio, uses.
And then by line 10, it's more carohosting, and then I've got some other lines of dropped
ICNP packets.
And that's what a Tracer does.
It shows you how many times your little packet needs to hit different devices in order to
get to the server that you actually want to talk to.
So a router's job is to find the fastest way to get to that server.
And that is called patch selection.
And lastly, the important thing about a router is to remember that it does create a separate
broadcast domain.
And broadcast domains are important because they're the things that allow you to send data
over your network and not broadcast that information to every single node on your network, which
is important for those big networks that companies.
So if I have a Gort neighborhood, a little Gort network hooked up to a router and I've got
a Clot 2 network, and Clot, there's activity on the Clot 2 network, that router isn't going
to forward all that activity over to Gort as well.
I don't mean unless I'm sending a message to Gort in which case the router will forward
it over to Gort.
But if it's not meant for Gort, Gort's never going to know that anything ever happened
over on the Clot 2 network.
And that's really important because that reduces activity on your network.
And that's why it's good to have a couple of routers on a big network so that it can
kind of insulate groups of computers from each other's activity.
So that's a router.
So let's go over something completely different just to get our minds off of routers for
moment.
Another kind of device you'll see a lot of times are called hubs, and sometimes people
refer to a router as a hub mistakenly.
You see something with a bunch of ports on it, and people who maybe don't think about
routers and hubs and switches all day every day, they might say, oh, that's your hub.
Or vice versa, they might look at a hub and think it's a router, but hubs are very,
very different.
Nothing really fancy going on in a hub.
It is basically an amplifier or a multi-report repeater, that's what a lot of people will
correctly call it.
It receives a digital signal from some device on a network.
It amplifies that digital signal and passes that signal on to other ports, and that's
what it does.
It just amplifies the signal.
So if you've got a really big network and you're running lots of cable, Ethernet cable
does have attenuation, so you're going to lose signal quality after a while, signal strength.
So slap a hub in there and that will boost all those signals so that you've got a nice
healthy, strong network.
It does, because all it's doing is repeating every signal that it receives, it does not
create a new collision domain and it does not include, it does not create a separate
broadcast domain.
So if you see a hub, it's just, it's the same broadcast domain and it's the same collision
domain.
Both of those terms I will go over in a little while.
Okay, so that's a hub, pretty different.
Switches are going to feel a little bit like routers at first.
And like I say, routers are switches, so switches will filter packets that are being sent
to it.
So the destination address and it either packages them as a frame to be sent out to a specific
address or it drops the packet if the address is to some unknown device.
That's what a switch does.
It works on the data link layer.
So it's going to create a separate collision domain, but not a separate broadcast domain,
meaning that a packet gets sent to it.
It will forward that packet on to the rest of the network in order to find out if that
packet is meant for that device.
And that's what it does.
It essentially, it switches frames from one port to another.
You know, it gets information in.
It looks at the address, it packages up at a frame and switches it over to another port
to be sent over the network to some other device.
Now if you know what a collision domain is and you're listening to this, you probably
can see that this does break up the collision domain because you're getting input from
one cable and you're taking it off that line and switching it over to another cable.
So that's breaking up collision domains.
It's not breaking up broadcast domains, but it does break up collision domains.
So it's a good thing to have on a network as well.
A lot of times, at least in the networks that I've seen and this is by no means best practices
or anything like that.
This is just what I've seen.
They'll have a cluster of computers all hooked up to a switch and in that switch, they'll
have hooked into a router because that way you get the ability to talk among that
little cluster of computers more efficiently because you don't have the same kind of,
you don't have a lot of collisions, as many collisions with a switch.
And then you've got that big switch which kind of defines that network neighborhood.
You've got that hooked into a router which isn't going to break up your collision domain,
but it does, at least keeps that separate, that little neighborhood network separate
from the next door neighbor cluster of computers.
The main goal of a switch is to optimize the network so that each client on the network
has more bandwidth.
That's the big deal about switches and apparently bridges do basically the same thing.
I've never seen a bridge, never used one.
So those are the physical elements of the network between all the different devices and
all the different cables.
You've got your hubs to amplify your signal, you've got your routers to talk from network
to network and filter out things that aren't meant for every single little cluster of computers
in your big network.
You've got your hubs to amplify the signals, you've got your routers to enable a network
to talk to another network.
You've got switches to filter out packets and make sure that information isn't colliding
and getting into each other's way.
But let's go over some basic terminology that I've kind of hinted toward and have not
necessarily given a complete definition.
It's the question of broadcast domain versus collision domain.
A collision is what happens when two nodes on a network broadcast something and the data
frames collide.
That's a bad thing because the data gets damaged.
So what happens when something's about to occur on a network is that your computer looks
out on the wire and sees if anything is being transmitted.
If the path is clear, it will go ahead and transmit.
Now should somehow two devices transmit at the same time, then the data on that network
will run into each other, it will collide and it will damage the data and it sends out
a signal to all the devices on the network to wait.
It just waits, everything waits for a predetermined amount of time and then they try to retransmit.
And that's how collisions are dealt with.
It doesn't sound that big of a deal if, you know, in my apartment, I've got like, you
know, maybe six computers and I'm only one person, it's just not that big of a deal.
But imagine this kind of collision occurring on a big network where hundreds and hundreds
of people are trying to go to websites and send emails and all kinds of things all day
long.
If you had collisions on that, on such a network, everyone would come to a standstill
pretty soon, it would just be such a horrible network to try to work on.
And that's why you want to break up what would be called your collision domain, meaning
that that's sort of the little local area network where collisions are kind of aware of
themselves.
That's where collisions would be detected and you can break these up by putting a switch
or a bridge there and that will, that will help break up the collision domain because
it reduces the collisions.
Broadcast is a data frame or a packet that is transmitted to every node on your local
network.
You'll know a broadcast by their broadcast address, which is a destination network and
host address with all the bits turned on.
So specifically, a broadcast domain would be a group of devices that do receive broadcast
frames from any of the devices within that little group.
So again, that's just kind of like where the router comes in handy because routers don't
have forward broadcast frames.
So a broadcast domain is going to be insulated from another broadcast domain.
This will mean that like I said earlier, if there's activity going on over here in the
Clatoon Network and that cluster of computers is eventually coming back to some kind of router
and then out of that router, there's another cluster of computers called the Gort Network.
Those are two separate broadcast domains and something on the Clatoon Network that sends
out a broadcast frame to all of those computers on Clatoon Network, but it's never going to
be heard by Gort Network.
It's just going to be completely self-contained and it won't have to worry about.
Gort will never know that there was activity over there at all and that's a good thing.
You want that kind of minimization of network activity.
Why waste Gort Networks bandwidth with stuff that doesn't never need to get out of the
Clatoon Network?
Worst case scenario is that something that I've sent on Clatoon Network is destined for some
other website completely, like Google.com and so it'll go through the Clatoon Network
up to the router, it'll get sent over to whatever big network Google.com exists on, it'll get
sent to their router and it'll get forward to the proper specific server of where the information
that I need is saved.
But again, Gort Network has never been aware that I've made a request to Google.com.
Google sends information that I've just requested back, eventually it'll hit my router and
again, instead of it's not going to send that signal back to the entire network knocking
on every door to see if it's the computer that asked for that information, it's going
to send it over to the Clatoon Network and the data link layer will sort through all that
stuff and figure out which MAC address it's destined to and so on and so on.
So that's what a broadcast domain is, that's what a collision domain is.
Again, routers create separate broadcast domains, switches create different collision domains,
hubs do neither, but hubs do amplifier signal and strengthen the overall signals on your
network.
Probably not necessary, it's a small network for those bigger networks or for networks
that stretch a physical, physically a long distance.
You might need a hub to take that signal and keep it alive.
Other than that, that's it.
Those are the elements of a network, a network topology.
That's what you're going to see on the physical level.
So the main important thing that we have not discussed on this map of the network yet
is the Ethernet stuff, the stuff that the Roads that actually connect to the bustling cities
of networks together.
So we'll go over Ethernet in the very next episode, episode three, we'll talk about everything
Ethernet.
So, tune in next time.
See you then.
Thank you for listening to Hack with Public Radio.
HPR is sponsored by Carol.net, so head on over to C-A-R-O dot-E-T for all of those