
Internet introduction
- Introduction
- IP addresses
- Port numbers
- Communicating with a service
- Domain name server (DNS)
- Local network
- Asynchronous Digital Subscriber Line (ADSL) modem
- Router
- Wireless access point
- Firewall
- Dynamic Host Configuration Protocol (DHCP) server
- The router interface
- Internet IP addresses and routers
- Load balancers
- All messages pass through the router
- Local network without a router
Introduction
The internet is vast network of private, commercial and government computers. Miilions of these are server computers that offer serivices - mainly websites. However, the majority of the computers only use these services and do not provide any. Applications that use internet services include:
- web browsers
- email readers
- multi-user games
- video streaming
- music streaming
Devices that can be connected to the internet include:
- Computer
- Smartphone
- Tablet e.g. Kindle
- Cable or satellite TV receiver
- Game console e.g. Playstation or Xbox
What follows is a simplified description of how communications between computers on the internet works.
IP addresses
Each computer has a unique address called an IP address. The original version of the address is called IPv4 has the form of four numbers each separatored by a ".". Each number is in the range 0 to 255. There are a few special addreses:
- 127.0.0.1 - the local machine
- 192.162.1.x (where x is number 0 to 255) - local network
e.g. 2001:0db8:0000:0042:0000:8a2e:0370:7334
IP addresses can be "static" or "dynamic". Static IP addresses never change and are required by servers so they can always be found. Dynamic IP addrses can change. These are usually assigned by internet service providers (ISPs) to home users. A dynamic IP address will usually remain the same until you disconnect from the internet e.g. by turning off you computer. The fact that the user's computer may have a different IP address the following day does not matter, because in general your computer sends requests which include your computer's IP address so the response can be sent to it.
Port numbers
Each machine has a range of port numbers from 0 to 65535 that are used to connect to different services.
Here are just a few:
- 20 - FTP data transfer (this used for uploading and downloading files)
- 21 - FTP control (command)
- 22 - SSH (this is used to connect remotely to a computer and control it using command line instructions)
- 53 - DNS (this is used to find an IP address from a domain name)
- 80 - HTTP (this is used to browse websites)
Communicating with a service
When an application (e.g. a web browser) neeeds to request a service, it sends a request that must contain at least:
- The IP address of the computer sending the request
- The IP address of the server offering the service
- The port on the server that the service listens on
Domain name server (DNS)
When a user points their web browser to a website, they seldom enter the IP address of the server. Instead, they enter a meaningful name e.g. amazon.com. This name is called a "domain name". Using a domain name is possible because of a set of servers called "domain name servers" (DNS). They provide a service which returns the IP address for a given domain name. Using a domain name server the web browser finds that the IP address for amazon.com is 205.251.242.103 and it uses this IP address when it sends requests to the server running the amazon.com website.
Local network
When you request an ISP to provide access to the internet they will provide a box called an ADSL wireless router. This will allow you to create your own local network and allow access to the internet. Even if you only have one computer and you connect it with a cable directly to the ADSL wireless router you are still creating a local network.
The ADSL wireless router performs several functions:
- An ADSL modem
- A router
- A wireless access point
- A firewall
- A DHCP server
Asynchronous Digital Subscriber Line (ADSL) modem
An ADSL modem converts requests from your computer to the internet into signals that can be sent over a phone line and converts the signals that are returned.
Router
A router connects different networks - in this case your local network and the internet.
Wireless access point
Computers on your local network can be connected to the router by either a network cable or a wireless network adaptor. The wireless access point handles the comminucations with the wireless network adaptors.
Firewall
A firewall protects computers on the local netwrok from some attacks from the internet.
Dynamic Host Configuration Protocol (DHCP) server
Each device on the local network has a IP address in the same format as IP addresses on the internet. An IP address can be set for each device, but this can be an inconvenient chore and cause problems if two devices are accidently given the same IP address. The process of assigning IP addresses can be automated by asking the router to do it for you by using the DHCP service of the router. All you have to do when you connect a device to the local network is tell it to use DHCP. When DHCP is used, the IP address of a device will not always be the same each time it connects the local network. This does not usually matter and you don't need to know the local IP address. One time you may need to know the IP address of a device is to control it remotely from another device on the local network. In this case you can get a list of devices and their IP addresses from the router.
The router interface
The router has two IP addresses - one on the local network and a different one on the internet, because it is a part of both networks. The ISP will give you the router's local IP address when they supply it. If you enter this address into a web browser you will see what looks like a website. The is called a web based interface. You can use this interface to perform several functions including:
- Set the name of you local network
- Set which ports you want to open in the firewall
- Set the password for connecting to the local network
Internet IP addresses and routers
Within a local network most IP address are those of individual computers. On the internet most IP address are of routers - not computers. Within a company, or even a home network, different computers may be dedicated to different functions. One computer may be a web server while another is an ftp server. This is done by configuring the router to forward different services to different computers. For example, all web requests arriving on port 80 on the router will be forwarded to port 80 on a dedicated web server on the local network. To a computer sending requests over the internet, the fact that requests for different services made to the same IP address are sent to different computers is both invisible and irrelevent. There will be households with only a single computer and no other devices connected to the internet, in which case the the IP address of their router will repesent a single computer. This however, is very much the exception. The general rule is that one internet IP address represents mutiple computers and other devices.
Load balancers
For a company the number of requests for particular service may be more than a single computer can handle. To solve this the router will be configured to pass requests for this service to a device called a load balancer that directs requests to one of several computers able to answer the request. The replies are then sent back to the load balancer which forwards them to router and finally to the requestor. To the router the load balancer appears to be a single computer capable of handling all the requests.
All messages pass through the router
A network built using a router is using infrastructure mode. All messages, including those between computers on the local network, are passed first to the roouter and then to their destination. This true even for two computers that use a wireless connection to the network.
Local network without a router
A local network can be created without a router provided it is not required to connect to the another network e.g. the internet. All computers in the network should be given a static IP address and use the same network name. They must also be configured to use ad hoc mode.