Newsletter "Behind the Scenes" Newsletter

November 2014The monthly newsletter by Felgall Pty Ltd

My Word

How the Internet Works

There are four communication layers used to connect your computer to the rest of the internet.

The first and lowest layer is the hardware used to provide the connection. This hardware provides your computer (or other device) with a way to communicate with other devices either via an actual wired connection or using a wireless connection. This layer also uses hubs and switches to provide the connections between different devices in the same local area and routers to connect the local portion of the network to other parts of the internet.

The second layer provides the addressing system that identifies the different devices. The internet uses an addressing system called Internet Protocol (or IP). There are two versions of this protocol. The one that has been around the longest is called IPv4 and provides approximately four billion addresses. The most common way to see these addresses written is as four numbers each between 0 and 255 with dots between them so you know where one number ends and the next starts. Alternatively they can be expressed as an digit hexadecimal number (using A through F to represent 10 through 15 as a single digit). While this was expected to give plenty of addresses for all needs back in the early days of the internet, the internet turned out to be way more popular than those early developers expected and the IPv4 addresses actually ran out a couple of years ago. There are a couple of ways that the internet works around this shortage of addresses - one is to reuse the same small subset of addresses for each local network and use address translation in the router to keep track of which messages coming from the internet are replies to the messages sent from the individual computers - and the other is to share the same address where ever it is possible to do so. Two web sites hosted on the same server only need their own IP address if they are using encrypted communications where the site the message is intended for cannot be read from message headers.

The replacement addressing system is called IPv6 and this addressing system provides over two and a half quadrillion separate addresses. The internet is gradually switching across to this addressing system with routers performing translations between IPv4 and IPv6 addresses as required. With the number of addresses this provides each device will be able to have separate addresses for whatever it needs a separate address for without any risk of the addresses running out as there are over a million addresses available for each person on the planet.

The third layer provides the protocols for the various types of communication. There are two types of communications possible over the internet. TCP allows messages to be sent to specific addresses while UDP allows messages to be broadcast.

The final layer provides what are called ports for the computers and other devices to listen on for specific communications protocols. For example the HTTP protocol that unencrypted web pages use is normally sent via TCP port 80 and so web browsers will listen on TCP port 80 for responses from web sites that are using the HTTP protocol. Similarly for encrypted web pages using HTTPS the TCP port 443 is used.

These layers allow the server applications and client applications to communicate with each other. A web server such as Apache sends and receives the HTTP and HTTPs messages on the server end and the web browser sends and receives the same messages on the client end. The firewall on the client computer will have TCP ports 80 and 443 open to allow the messages to be passed back and forth so as to allow your browser to display web pages. The firewall may also be set so as to block and messages on these ports coming from the server that cannot be identified as replies to messages sent from this computer.

Where you have several devices on your local network the router that connects your local network to the internet can also have a firewall and if IPv4 is being used it will definitely contain a network address translation table (NAT) to convert the addresses from the IP address your internet service provider has given you into the local IP address of the specific device that the individual messages are intended for.

All of the different types of messages that can be sent over the internet - email, web, file transfers etc - all use different protocols and ports for their communications. These keep the different types of communications separate from one another and ensure that each gets processed by the correct program. For example email uses IMAP (port 143) or POP3 (port 110) protocol for sending emails and SMTP protocol (port 25) for receiving emails. There are also alternative protocols for providing encrypted connections for these messages that use a different set of ports. Another protocol that is required when accessing the internet is DNS which provides the mechanism for translating all of the internet addresses that contain domain names into the corresponding IP address of the server that the messages are intended for. DNS uses UDP port 53 to broadcast the request for the domain name translation from any domain name server.
 

On Site

Lots of PHP tutorials this month including a couple more continuing the series on learning PHP for those who already know JavaScript and four on the basics of creating classes in PHP.
 

What's New

The following links will take you to all of the various pages that have been added to the site or undergone major changes in the last month.

Main Links

Ask Felgall
Past Newsletters
Sign Up/Unsubscribe
Question Forum

Categories

Browsers
HTML
Javascript
Interactive Web
Mainframe
PC Software
Networking
Comms Software
Word Processing
DTP
Graphics
OS/2
Linux
DOS/Windows
NT/2000/XP
Book Reviews
Links

Other Links

My Javascript Site
My Blog

http://www.felgall.com/