Network (1) Addressing

20 04 2013

The articles about networks are written for my readers who are not familiar with the terminology, the functionalities and the cooperation between devices in a network environment.

Part (1) explains the basics of networking. Experts should overlook some verbalization because I want to keep it very simple.

If you want to communicate with other people far away from you, you need an address. It can be a postal address, an E-Mail address or a phone number. In any case the address has to be unique to ensure that your message will be delivered to the person you want to communicate with.

20130217-143629.jpg

As you can see I left out the addressing method of the corresponding transmission of a PDF file from one of your devices to a Dropbox cloud storage account.
Addressing we use for letters is not appropriate for a computer network as it can be written in different ways up to the country’s conventions. Furthermore there is no fixed location where data are stored. On a day it can be a webserver in Australia and a day later it possibly can be a webserver in India.
So the device address must be more like a GPS address which is uniquely written all over the world with the additional possibility to forward an existing address to a new address without noticing the users. To do so a complex organizational computer infrastructure has to be established which transmits requests to the right recipients wherever they are actually located.

All network devices around the world use an IP address for identification purposes. It usually consists of 4 numbers separated by a dot (10.0.1.1).

An IP address (Internet Protocol address) is an assigned numerical label that is used to identify devices on computer networks. Think of it like this: An IP address is to a computer what a telephone number is to an iPhone. Each computer can stand alone without its respective IP address. However, if you want to communicate with other computers from yours, you will need an IP address.

  • An IP address is a 32 bit binary number divided into four sections by dots.
  • Each part of an IP address is called on octet.
  • As 255 is the largest number which can be represented with 8 bits each octet can range the range from 0 to 255.
  • For LANs the following IP addresses are reserved by RFC 1918:
    10.0.0.0 – 10.255.255.255
    172.16.0.0 – 172. 31.255.255
    192.168.0.0 – 192.168.255.255

An IP address serves two principal functions: host or network interface identification and location addressing. Its role has been characterized as follows: “A name indicates what we seek. An address indicates where it is. A route indicates how to get there.”

Here you can see an example. It’s my small home configuration, a WiFi network with some Apple devices where the boss for addressing all devices is an Apple Airport Extreme router.

20130217-143858.jpg

As you can see this network has no connection to the outer world at this time. So this system allows basically the use of any combination of numbers for addressing the devices.

Severe problems would arise if you want to contact a network outside this local area network (LAN) e.g. a webserver in another country which provides a website you are interested in. It cannot be assured that the address of this computer is unique. So your request might wander around the world with uncountable answers.

In my articles about networks you often are confronted with the expression protocol. What is a protocol?

A communications protocol is a system of digital message formats and rules for exchanging those messages in or between computing systems and in telecommunications. A protocol may have a formal description. Protocols may include signaling, authentication and error detection and correction capabilities. Communications protocols have to be agreed upon by the parties involved. To reach agreement a protocol may be developed into a technical standard.

Look at the first image of this article.
We can talk about a Postal Protocol where the postal address has to be defined as name, street (or PO box), city, ZIP code and country. It’s just a convention about the way how an address has to be written and what kind of information should be included.

LAN and WAN …

To solve this problem, a LAN (where IP addresses are free to choose) can be connected to other LANs by using a worldwide unique wide area network IP address (WAN IP address). Your Internet Service Provider (ISP) assigns a WAN IP address to your router so that requests from a device inside your LAN is transmitted with this WAN IP and the recipient can answer using your WAN IP as the destination address.

Here is the WAN IP taken for my local area network some weeks ago.

20130217-144028.jpg

My ISP is a German Cable Internet Provider. Like most other ISPs the company assigns varying IP addresses to my connection. My IP address is therefore called a Dynamic IP address. It may vary from hour to hour or day to day. So usually I cannot reliably reach any device inside my LAN without looking up the actual IP address. This problem will be discussed later.

Look here for a more detailed view on LAN and WAN IPs and what your devices have to do when you connect to the internet e.g. request for a website.

20130217-172847.jpg

You can see that there are several devices with different LAN IPs but only one WAN IP.
So it has to be cleared up how the information requested by a specific device is delivered to this device. NAT (Network Address Translation) does it.

NAT
In computer networking, network address translation (NAT) is the process of modifying IP address information in IP packet headers while in transit across traffic routing devices.

If you enter the address of a website e.g. http://iNotes4You.com you might argue that this format is not the format of an IP address as mentioned above. You are right and some further functionality is needed to convert this human-friendly address into an IP address.
This service is called DNS (Domain Naming System).

Wikipedia
The Domain Name System (DNS)
is a hierarchical distributed naming system for computers, services, or any resource connected to the Internet or a private network. It associates various information with domain names assigned to each of the participating entities. Most prominently, it translates domain names meaningful for users to the numerical IP addresses needed for the purpose of locating computer services and devices worldwide. By providing a worldwide, distributed keyword-based redirection service, the Domain Name System is an essential component of the functionality of the Internet.
An often-used analogy to explain the Domain Name System is that it serves as the phone book for the Internet by translating human-friendly computer hostnames into IP addresses. For example, the domain name http://www.example.com translates to the addresses 192.0.43.10. Unlike a phone book, the DNS can be quickly updated, allowing a service’s location on the network to change without affecting the end users, who continue to use the same host name. Users take advantage of this when they recite meaningful Uniform Resource Locators (URLs) and E-Mail addresses without having to know how the computer actually locates the services.

Ports …

You already know that data on the Internet is sent to and from IP addresses. Sending or receiving data is done on ports. Ports are virtual pathways on which Internet data flows.

If we think of an IP address as a telephone number (an identifying number that allows communication between two locations), then we can think of ports as telephone number extensions. Suppose you wanted to make a telephone call to a major corporation like Apple. If Apple only had one simple telephone line it would take a very long time for your call to finally get through. However, by using telephone number extensions, Apple can channel incoming calls to the proper locations and as a result handle many calls on one line as opposed to just one call.
Ports are like telephone number extensions as they allow multiple pieces of data to flow back and forth on a single IP address. In fact, port numbers are appended to the end of IP addresses just as extensions are appended to telephone numbers.

In other words, ports are numerical identifiers that make it possible for you to check your E-Mail and browse the web at the same time. Technically speaking, this is possible because browsing the web traffic generally uses port 80, secure website connections use port 443, and getting your E-Mail generally uses port 110.

Technical Facts
Ports are a 16-bit number can range from 1-65535.
TCP and UDP packets specify the port on which they are to be sent in their packet header.
The ports that a given application uses are generally set by the programmers of that application.the purpose of ports is to uniquely identify different applications or processes running on a single computer and thereby enable them to share a single physical connection to a packet-switched network like the Internet.

The protocols that primarily use ports are the Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP) of the Internet Protocol Suite. A port is identified for each address and protocol by a 16-bit number, commonly known as the port number. The port number, added to a computer’s IP address, completes the destination address for a communications session. That is, data packets are routed across the network to a specific destination IP address, and then, upon reaching the destination computer, are further routed to the specific process bound to the destination port number.
Note that it is the combination of IP address and port number together that must be globally unique. Thus, different IP addresses or protocols may use the same port number for communication; e.g., on a given host or interface UDP and TCP may use the same port number.

Ports in Relation to IP Addresses …

Remember at the top of this page when it was mentioned that ports are appended to the end of IP addresses just as extensions are appended to telephone numbers? There is a specific syntax for appending port numbers to IP addresses and it is as follows:
(IP Address):(Port Number) or.. 10.0.1.5:80

Notice the colon acting as a separator between the IP address and the Port Number. Port Numbers are appended to the end of all IP addresses whenever data is sent.
Why don’t we see a port number appended to the end of web addresses?

There are a few commonly used port numbers. Web traffic uses port 80 and is in fact so common that port 80 is assumed to be appended to the end of a web address by your internet browser and thus can be left off. You can test this by typing google.com:80 into your browser’s address bar. When you press enter, you should go straight to Google. Now, try typing google.com:6060 into your browser’s address bar. When you press enter, you will not be connected to Google.

DHCP …

There is still some information missing. Who assigns IP addresses?

The Dynamic Host Configuration Protocol (DHCP) is a network protocol that is used to configure devices which are connected to a network so that they can communicate on an IP network. The main task of a DHCP server is the assignment of unique IP addresses to all devices within the network. In a typical private LAN, a router is the DHCP server while clients are tablets, computers or printers. The router receives information through a modem from an internet service provider which also operates DHCP servers where the modems are clients. The clients request configuration settings using the DHCP protocol such as an IP address, a default route and one or more DNS server addresses. Once the client implements these settings, the host is able to communicate on that internet.
The DHCP server maintains a database of available IP addresses and configuration information. When the server receives a request from a client, the DHCP server determines the network to which the DHCP client is connected, and then allocates an IP address or prefix that is appropriate for the client, and sends configuration information appropriate for that client.

Summary …

  • IP address
    a number like 10.0.1.1 as an identification of a device within a network
  • LAN
    the local area network
  • WAN
    the wide area network connecting LANs
  • NAT
    the replacing of LAN addresses by WAN addresses
  • DNS
    the renaming of human-friendly addresses into IP addresses and vv.
  • DHCP
    the system which configures devices especially assigns IP addresses
  • Protocol
    a convention how to communicate within a LAN or WAN

Thanks for reading my blog.
If you have any questions don’t hesitate to contact me via my About page or a comment on this article.








%d bloggers like this: