Dr. Mark Humphrys

School of Computing. Dublin City University.

Home      Blog      Teaching      Research      Contact

Online coding site: Ancient Brain

coders   JavaScript worlds


CA114      CA170      CA686

Online AI coding exercises

Project ideas

Hosts and IP addresses

Machines have numbers that may (with some homework) describe their place within the network topology.
These are called IP addresses.
IP addresses under the standard IPv4 look like:
Four 8 bit numbers.
2564 = 232 = 4 billion.

Humans could never work with these. Since earliest days of networks, machines have text names, which describe their place within the logical hierarchy:


Numeric - 4 parts.
Text - Can have variable number of parts. Text syntax: "In theory, this subdivision can go down to 127 levels deep, and each label can contain up to 63 characters, as long as the whole domain name does not exceed a total length of 254 characters. But in practice some domain registries have shorter limits than that."

Host or machine name


	(actual machine).(organisation subdomains).(international subdomains)

Case of machine name is irrelevant.
(Case of the machine name part of a URL is irrelevant.)
e.g. Using the ping tool at Unix command-line:

$ ping www.biscuits.com
www.biscuits.com is alive


$ ping WWW.Biscuits.cOM
WWW.Biscuits.cOM is alive

$ ping www.biscuitss.com
ping: unknown host www.biscuitss.com

$ PING www.biscuits.com
PING: Command not found

The organisation can divide up its subdomains any way it likes. The organisation gets allocated a certain number of addresses, i.e. a subspace of the address space, such as:

and can assign these any names it likes. It doesn't have to tell outside world (until an actual request is made).
See DNS Lookup.


Domain name space.

Why did Ireland get IE?

I always wondered where "IE" for Ireland came from. Why not "IR"?
Thanks to Feargal Fitzpatrick for helping work out the following story.
The story goes back to the 1920s.
  1. See country codes for vehicles.
  2. 1924: Ireland adopted "SE" for vehicles in 1924 ("Saorstat Eireann").
  3. 1936: Iran adopted "IR" for vehicles in 1936. In retrospect, that was the moment Ireland lost it for the Internet.
  4. 1938: Ireland switched to "EIR" for vehicles in 1938 ("Eire").
  5. 1962: Ireland switched to the English version in 1962. "IR" was taken, so Ireland switched to "IRL", which it still has today.
  6. 1974: The ISO 3166 standard defined strictly 2 letter and strictly 3 letter country codes, based on the country codes for vehicles. Ireland therefore got "IRL" for its 3 letter code. For the 2 letter code, "IR" was taken, so Ireland became "IE".
  7. 1985: Internet country code top-level domains were defined in 1985, based on the ISO 3166 2 letter codes. Hence we got the   .ie   domain.
  8. See 1988 post about the registration of the   .ie   domain.

Network classes (the old way of handing out IP addresses)

Map of IPv4 address space

From xkcd by Randall Munroe.

Modern IP assignment - CIDR, NAT, IPv6

Different forms of URL

My address is:
These are currently aliases for the machine:
What all these translate to is:

URL obscuring

Decimal IP address notation

Strangely enough, the above is also the same as:

This may or may not work:


Q. Why does this one lead to my web page?

Embed password in URL

For a page that needs a password, you can embed the password in the URL:
This is perfectly valid, but also gives us a new way of obscuring URLs.

Try these on different Linux and Windows browsers:



Or these:



These could all lead to a numeric URL which fakes the look of a PayPal login page.

Q. How to be safe?
A. Never click on links in unsolicited email.

Domain name = Host name

This is a domain:

and these are hosts in the domain:
But as the Web developed, people wanted to be able to drop the "www" part, so it is common to set up this:
as an alias for this:
This alias is done at DNS level.
If no DNS alias exists, the browser may or may not do it for you.

ancientbrain.com      w2mind.org      humphrysfamilytree.com

On the Internet since 1987.

Note: Links on this site to user-generated content like Wikipedia are highlighted in red as possibly unreliable. My view is that such links are highly useful but flawed.