LESSON
01 – HOW THE INTERNET WORKS
PART A - ADDRESSING
ADDRESSES
The internet is a massive network of computers. Information is sent back and forth to and
from all these computers. To
communicate, each computer needs to have a different address.
The address is of the form ###.###.###.### where
each ### is a number between 0 and 255.
This address is called an IP address.
BINARY
You have probably heard that computers work with zeros and ones. Sequences of zeros and ones are what is called binary.
Each place where a zero or one is stored is called a bit. An arrangement of eight consecutive bits is called a byte. A byte can store 256 different values, or 0
to 255.
The individual numbers in IP addresses are stored inside a single byte. That is why they range from 0 to 255.
IPCONFIG COMMAND
The ipconfig tool will give you your IP
address.
To use it, you simply need to go to the command prompt and type ipconfig. Here is a result:
DOMAIN NAMES
If you wanted to, you could type in the IP address for a website in your
browser and it would work. Of course,
remembering such bizarre numbers is very inconvenient.
To avoid having to remember IP addresses for websites, domain names were invented.
Examples of domain names are:
www.google.com
www.tsn.ca
www.patrickcampeau.com
These names are simply a convenient “nickname” for IP addresses.
Domain names are rented out. You
can purchase a domain name online at a cost of about $10 per year. Of course, you can only purchase a name that
is not owned by somebody else.
PING COMMAND
You can test your connectivity to a domain name by using the ping
tool. You need to go to the command
prompt, and type ping domainName. This will also give you the IP address for
that domain.
Here is an example of the result you get:
ISP
An ISP is an Internet Service Provider. It provides home users with
access to the internet. To be using the
internet, you need to have an IP address that is provided by your ISP.
PART B - DATA FLOW
PACKETS
The data a computer sends is broken down into small pieces called packets. When all
the packets arrive at a destination, they are automatically reassembled.
The path that packets follow to get to their destination can include a
brief visit to many different IP addresses.
An analogy could be you travelling to a small city in Australia. You will fly.
However, you won’t fly directly from Sudbury. The pilots, planes, airport in Sudbury do not
deal with anything that far away.
Instead, you will fly to Toronto.
Again, in Toronto, they don’t deal with flights to small cities that are
far away. So they send you to
Melbourne. Then finally, from Melbourne,
you can fly to your destination.
TRACERT COMMAND
The tracert command,
pronounced “trace
route”, allows you to see the path
travelled by your packets when they get to a certain destination. Here is an example:
ROUTERS
A router is simply an electronic device that directs data to
its destination. Some people have them
in their house in order to have many computers connected to the internet at
once. Below are images of four different
routers.
Home routers have a common interface at the back. They usually have four ports to connect
different computers as well as one port to connect to a higher level such as
your ISP’s cable modem. The image below
shows the common interface. Note that
most newer routers also connect to computers via a
wireless connection.
The IP addresses of the tracert path above are
the different routers that are redirecting the packets to its
destination. When considering our
airport analogy, each router would be similar to a different airport
redirecting travelers.
PART C – Server Client Model
CLIENT VS SERVER
A simple way to look at computers that are on the internet is to orgranize into two categories: clients and servers.
A client computer is a regular computer that has a user
sitting at it doing work. Lab 101 has 30
client computers (plus all the laptops).
A server computer is a computer that waits for requests,
processes them, and sends the corresponding information. At Lockerby, we have a server in the tech
area inside the library.
HARDWARE
A server is created simply by installing software. You can make a server with any computer. However, “real” servers that deal with a lot of
requests often have extra hardware (multi CPUS, more RAM, extra hard drives, …)
Because these servers do nothing else but wait for and process requests,
they are often not even connected to a monitor.
TYPES OF SERVERS
There are several different types of server software. You can have one software that has all type
in one or you can have a software that does just one
application.
Web server – Receives requests for webpages from client
browsers, executes scripts and sends pages back to browser.
File server – Provides access to files that are in a shared
storage.
Chat server – Allows clients to chat with each other in a
single location.
Mail server – Gets requests from clients to see their email
messages and sends the information. Some
servers also store messages for the client.
Proxy server – Hides a client’s IP address by sending requests
to other locations for the client and then forwarding data to the client.
Game server – Provides access to games or to a community of
gamers. Some resemble chat servers with
the ability to launch games while other have more game data stored in them.
WEB SERVER SERVICES & SCRIPTS
A web server is a software program that is constantly running always
waiting for a request from a browser. When
a request comes for a webpage, the server sends that page back to the
browser.
The server also checks the web page documents for special scripts (small
computer programs). If there are scripts
present, the server executes the scripts and then sends the documents along.
Such scripts are called server-side scripts because they are
handled by the server. Languages such as
PHP or ASP are server-side scripts.
There are scripting languages that are actually handled by the
browser. The most popular language is
JavaScript.
OTHER ADDITIONS
Webspace
Protocols
More on routing – routing tables
Server vs Client
Webserver