How Does the Internet Work?
Articles,  Blog

How Does the Internet Work?

How does the Internet Work? Hey guys, Culture here. Today we’re going to discuss how the internet
works. More specifically, we’ll look at how computers
communicate with one another and explore the largest collection of webpages on the internet:
The World Wide Web. F This is our biggest challenge yet on the
show: To make computer science entertaining. You really do just expect me to carry this
show, don’t you? You dump a grand piano and an elephant on
my back and then follow it up with a cartoonish 1 ton weight. And where exactly am I meant to draw the strength
from to carry this unbearably boring subject? My raw talent? My comic absurdity? My enigmatic “joie de vivre”? Yeah sure, any of those work. Just stick to the script please, Crash. There’s only so much a man can take before
he breaks, Culture. Right now I’m like a KitKat: Delicious,
everyone wants me, and you’ve got your thumbs poised, putting pressure on my back and melting
my toothsome chocolate coating with your body heat. It’s just a matter of time until I snap
Culture. Is that what you want? IS THAT WHAT YOU WANT?! I… could REALLY go for a KitKat right now. But that’ll have to wait: Let’s discuss
how computers “talk” with one another. If we think of it this way, what “language”
do they communicate in? If we go back to the earliest system of computers
we had “punch cards”, rectangular cards perforated with holes in select areas. The pattern of holes determined how the card
was read, and each space could either have a hole or not have a hole. We call this language “binary”, a system
in which information is represented as being in one of two states: On or off, present or
absent, or in the case of computers nowadays: 1 or 0. A single binary digit, shortened and called
a “bit”, can only exist in these two states. I don’t think we should pigeonhole bits
into two categories. I believe there’s a whole spectrum of values
between 1 and 0 and we should embrace a bit’s right to exist anywhere on this spectrum. And hey, if a 1 wants to be a 0 or a 0 wants
to be a 1, I say we support that too, unlike our narrow-minded friend over here… Please don’t bring gender into our discussion
on computers. Oh god, I can see the gendered-robot fan art
now… let’s move on! If we put two bits next to each other, we
now have four combinations: 1 1, 1 0, 0 1 and 0 0. The more bits we add, the more information
we can communicate. If we put 8 bits together, we have 2 to the
power of 8 different combinations. That’s 256 unique arrangements. In computing, 8 bits together are called a
byte, a term that may be more familiar to you. These bytes are used to represent typographic
symbols like letters and numbers that humans understand. I should mention that there aren’t always
8 bits in a byte. A byte used to be defined as having 4 or 6
bits, but it has now been standardised in most contexts to means 8 bits. A cute little sidenote: We now call a string
of 4 bits a “nibble”. If you want to always mean 8 bits then technically
you would say an “octet”. But you’ll only be pulled up by nit-picking
nitwits with nothing better to do than police what people say. That’s what I’m here for. The information we communicate now often uses
so many bytes that we need new prefixes. A kilobyte is 1024 bytes, a megabyte is 1024
kilobytes, a gigabyte is 1024 megabytes and a terabyte is 1024 gigabytes. If we keep going up, we eventually hit a yottabyte
which is one trillion terabytes. That’s roughly the size of the entire World
Wide Web. Okay, okay, we all know about bytes. We’re not idiots you know. If it sounds like I’m going really slow
and sounding condescending, it’s only because I barely understand this stuff myself. But that’s why we’re here: To learn. And boy howdy am I looking forward to everyone
telling me how wrong I am in the comments. Awwww Culture, I didn’t realise you were
so worried! Don’t worry buddy: I’ll make fun of you
for being wrong LOOOOONG before the comments do. Thanks Crash. Now that we know the language computers use,
let’s look at how they actually talk to one another. Essentially this is done through wired or
wireless signals. If you have a group of computers all connected
together to share their resources, this is called a “network”. The easiest form of network to understand
is a Local Area Network or LAN, which is small in scale and controlled by one organisation. If you combined all these separate small-scale
networks together using one common set of rules, you would create an interconnected
network. Interconnected network… inter network…
inter… net… INTERNET! OH MY GOD! That’s right Crash. The Internet has two basic components: Infrastructure
and Protocols. Infrastructure is all the physical stuff:
Computers, smartphones, cell towers, radios, cables, routers, servers etc. Computers and smartphones, usually the endpoints
of information, are known as clients. Servers are the machines that store all that
information-y goodness we look up on the internet. Nodes are connecting points between clients
and servers that redirect or monitor data, like routers. Protocols are the rules for how computers
on the internet communicate: A logical system that allows for consistency when exchanging
information. Oh I get it: You gotta all be on the same
page before you start mingling with one another, Like establishing ground rules and safe words
in the bedroom before you get down to funky town. The less I hear about your nocturnal activities,
the better. You can imagine that on such a huge network
of computers, it could be hard to find the exact computer or server that you want to
interact with. That’s why every single device connected
to the internet is assigned a unique Internet Protocol or IP address, that string of numbers
you always see with dots separating them. You’re probably most familiar with IP addresses
of this form where nnn can be any number between 0 and 255. Those are IP version 4 addresses. We now also use IP version 6 addresses of
this form which use a hexadecimal code where n can be any number between 0 and 9 or any
letter between A and F. This allows for a HUGE number of combinations:
340 undecillion possible addresses, easily enough IP addresses to sustain our population
for a long time. And yeah undecillion is a word, look it up. IP addresses are assigned by your Internet
Service Provider or ISP, or in some cases they may be static: That means the device
is permanently assigned a single IP address. So you’re telling me I can contact ANY device
on the internet as long as I know its IP address? Like some creepy stalker who digs around in
the trash to get a girl’s contact details and calls them non-stop? Well there are security measures in place,
and just because you know someone’s IP address doesn’t mean you can mess around in their
house- uh, server. But one fun thing to do is ping a device to
see if it’s connected to the internet. By opening up command prompt on Windows or
Terminal on Mac and typing in “ping” followed by the IP address or domain name of the site,
you can receive a report on how long it takes your “ping” to get there and back. It’s essentially an echo request message. In my neighbourhood, if you say ping around
a store serving Bubble Tea you’ll get a lot of angry looks. Oh jeez… that was awful. Now we know how to address our information,
let’s look at how we actually get a message from one computer to another. First we need to convert our information into
a palatable form for transferral over the internet. This is achieved using a “protocol stack”:
A protocol stack is just a series of steps for converting data into “packets” and
assigning the packets with a destination. Imagine this like sending mail: You can only
send a certain amount of information in each envelope; otherwise it’ll be too big for
the post office to accept. On the internet this problem is solved by
breaking your information into packets. Each packet contains about 1000-1500 bytes
along with instructions for how to be reassembled with the other packets it’s travelling with. This allows the packets to travel separately
yet still be pieced together when they get back to their destination. Right, so kind of like if that guy who scrounged
around in the trash for that girl’s address now wanted to send the girl locks of his hair
that she can keep and cherish always and forever. But he can’t send all the hair in one envelope
so he sends multiple envelopes with his hair in it, plus an additional package with a recording
of him singing “Unchained Melody” while crying softly. Just… you know… as an example. Also if you wanted to send mail, you don’t
just hand the post office a blank envelope; Instead, you have to write the address on
the envelope in a specific format that the postal service then interprets before sending
the mail on its way. On the internet, all of this grunt work is
performed by the TCP/IP protocol stack, named after the steps involved. In internet terms, we call these steps “layers”. The Transmission Control Protocol or TCP layer
assigns your packets each with a port number for distribution. TCP protocols on the sending and receiving
devices also “chat” back and forth with one another to make sure every packet of information
makes it from one end to another. If a packet gets lost or corrupted, the information
is re-sent. The Internet Protocol or IP layer assigns
your packets with the IP address of the destination computer. Your modem or other hardware then converts
your binary data into a signal for transmission along wires. Once the data reaches the other computer,
it travels in the opposite direction back up the TCP/IP protocol stack and is stripped
of all its address information before finally being converted back into a useful format. I’ve left out a lot of detail there, but
that’s the gist. Whoa buddy, I think you skipped a bit in the
middle there. What do you mean it just travels down a wire
to the other computer? What about the part in the middle where the
government looks at everything I do? Well I suppose there is a bit more to it. For starters, there are many paths your information
can travel down because there are so many different devices connected. Routers are special devices that exist at
junctions in the internet to redirect your data towards the appropriate destination. What’s cool about this is that your data
won’t always travel down the same path when accessing the same destination; instead routers
will redirect the data down different routes to avoid high traffic areas. This “fluidity” of the internet naturally
combats the slowdown effect of congestion. It’s also important to note that all your
requests to servers must first pass through your ISP. It’s at this point that your search history
and spending habits can be monitored by external agencies. Those bastards, I knew it wasn’t a coincidence
when ads for My Little Pony started popping up. I mean you watch ONE video of Fluttershy and
Applejack on newgrounds and suddenly they think you’re a Brony. Did you ever wonder why we have names like
“” and “” and “”? This format for accessing information on the
internet is all thanks to the World Wide Web. The World Wide Web is a way of organising
information on the internet such that certain text elements can be clicked on, via a hypertext
link, to redirect you to another page. It was originally developed by Tim Berners-Lee
in 1989 to help scientists share research papers. Wow, it came from such humble beginnings. Look at it now: An endless ocean of pornography
with fjords of furry fetishes. Tim Berners-Lee actualised his vision of the
web by developing three integral components: HTTP, HTML and URL. Hyper Text Transfer Protocol or HTTP is the
key protocol of the web that instructs web servers and browsers to fetch web pages. Hyper Text Markup Language or HTML is the
way web pages are formatted to include different elements like text, images and videos. Finally, A Uniform Resource Locator or URL
is the domain name plus the protocol identifier. For example: is the domain name,
http is the protocol identifier and is the URL. Furthermore, if the protocol identifier is
http then the URL can more specifically be called a “web address”. You may have also noticed that sometimes your
protocol identifier is “https” rather than just http. The “s” stands for secure, because https
encrypts your data making it harder for government agencies and ISPs to spy on your browsing
habits. It’s thanks to https that we can do our
banking and shop online safely. So no one can find out about the dirty things
I buy on lovehoney? No, well not unless you announce it in front
of our whole audience. There’s one more thing that makes the web
possible: Domain Name System or DNS servers. Every time you type in a domain name, your
computer sends a request to a DNS server asking for the corresponding IP address. Imagine the DNS server as a phonebook, but
instead of translating people’s names into phone numbers it translates domain names like into IP addresses that computers can more easily understand. Only after your computer receives the IP address
can it then contact the web server it needs. If they called them provinces instead of domains
then they’d be PNS servers hehehe sounds like penis Crash, please add something constructive to
this video. Just once. That’s all I’m asking. Ugh, fine. Wouldn’t it take ages to look up the IP
address every single time? Well your computer can locally store a domain
name’s IP address for a limited time in a process known as caching; using the phonebook
analogy, it’s like if you remember a phone number because you call it frequently or just
called it recently. Therefore, you don’t have to waste time
looking it up in the phonebook and can dial straight away. Like how I know the number for lovehoney off
the top of my head. Unfortunately yes, that’s a perfect example. Sometimes scammers on the internet will replace
your DNS server with a fake that gives you the wrong IP address. This IP address will instead take you to a
site that looks identical to the one you were expecting, but that tracks all your information. This is one way people’s credit card details
and passwords get stolen. It’s like if you asked your friend to look
up a number for you, but he’s a douche so he tells you the wrong number and instead
you have a confusing 2-minute conversation with your Mum thinking it’s your girlfriend. That’d totally suck, right? Yeah, it does. Trust me. Ahhhh, good memories. But Culture you still failed to answer the
most pressing question of them all: Why should I care? It seems like all the nerds and geeks have
got this stuff sorted out, why do I need to understand what goes on behind the curtain? To increase your understanding of the world? To satisfy your natural curiosity? To gain an appreciation for the systems you
take for granted? So that in the future when the internet is
even more pervasive than it is now and issues of ethics arise in the public sphere you can
speak from a position of knowledge to justify your opinions? Hmmmmmmmmmmmmmmmm… Nup, still not interested. See you
all next week!


Leave a Reply

Your email address will not be published. Required fields are marked *