Dr. Mark Humphrys

School of Computing. Dublin City University.

Home      Blog      Teaching      Research      Contact

Search:

CA249      CA318      CA651

w2mind.computing.dcu.ie      w2mind.org


  DCU's block of addresses

DCU topology

DCU subnets

Network tools

DNS Lookup

How to find your IP address


Hosts and IP addresses

Machines have numbers that describe their place within the actual network topology:

  106.132.204.106
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:

  www.mit.edu
  compsci.mit.edu
  techpapers.compsci.mit.edu

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

 
	www.computing.dcu.ie 

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

	fileserver.salesdivision.regionaloffice.company.co.uk
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.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:

   126.121.*.*
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.




DCU's block of addresses

DCU has the following block of addresses:
Dublin City University (NET-DCU-NET)
   Glasnevin
   Dublin, 9
   IE

   Netname: DCU-NET
   Netblock: 136.206.0.0 - 136.206.255.255
i.e. room for 2562 = 65,536 addresses.

DCU addresses run from:
136.206.0.0     to:
136.206.255.255
In binary, from:
1000 1000 1100 1110 0000 0000 0000 0000     to:
1000 1000 1100 1110 1111 1111 1111 1111
See IP decimal-binary table

First 16 bits are the DCU network number 136.206.
This is in binary:
1000 1000 1100 1110
Second 16 bits are the host number on that network.

This is a Class B network.
To be precise, the leading 10 indicates Class B, then the network number is the 14 bit:
00 1000 1100 1110
So a DCU address is:
Class B identifier, DCU network, machine number n:
10 00 1000 1100 1110 nnnn nnnn nnnn nnnn




IP address shows network class.


Special IP addresses.
See Reserved IP addresses and Private network.




Map of IPv4 address space

From xkcd by Randall Munroe.



Complications - CIDR, NAT, IPv6



Subnets

Typically on a campus, each dept. might have its own LAN:

Above, each Ethernet is called a subnet.
Whole campus just appears as one network to outside world.
Campus main router has to route to correct Ethernet.


Subnet mask

Some bits are taken away from the host number and used as the subnet number. e.g. A 6 bit subnet number would allow for 64 Ethernets.
Main router is simple - It doesn't need to know about every host in system. It just needs to forward to the correct Ethernet.
Subnet mask is used to indicate the split in the host number bits:


Above: 6 bit subnet number. 10 bit host number on subnet.
Subnet mask: 1111 1111 1111 1111 1111 1100 0000 0000
= 255.255.252.0

Outside the organisation (the campus), the subnetting is not visible. So the organisation can change its subnet organisation without informing anyone.




Example

Organisation owns 130.50.*.*
It decides on a 6 bit subnet number (64 subnets).
Leaving 10 bit host number on subnet (1024 hosts on each subnet).
(As in diagram above)

With a 6 bit subnet number, the subnet number cannot be easily read from the decimal version of the IP address.
Blue is subnet number:


    Binary version of IP Decimal version of IP
Address of Subnet 1 (network address) (subnet 1) (0) 1000 0010 0011 0010 0000 0100 0000 0000 130.50.4.0
Subnet 1 starts at (network address) (subnet 1) (host 1) 1000 0010 0011 0010 0000 0100 0000 0001 130.50.4.1
Subnet 1 ends at (network address) (subnet 1) (host 1023) 1000 0010 0011 0010 0000 0111 1111 1111 130.50.7.255
Address of Subnet 2 (network address) (subnet 2) (0) 1000 0010 0011 0010 0000 1000 0000 0000 130.50.8.0
Subnet 2 starts at (network address) (subnet 2) (host 1) 1000 0010 0011 0010 0000 1000 0000 0001 130.50.8.1
Subnet 2 ends at (network address) (subnet 2) (host 1023) 1000 0010 0011 0010 0000 1011 1111 1111 130.50.11.255
Address of Subnet 3 (network address) (subnet 3) (0) 1000 0010 0011 0010 0000 1100 0000 0000 130.50.12.0
Subnet 3 starts at (network address) (subnet 3) (host 1) 1000 0010 0011 0010 0000 1100 0000 0001 130.50.12.1
Subnet 3 ends at (network address) (subnet 3) (host 1023) 1000 0010 0011 0010 0000 1111 1111 1111 130.50.15.255

.... And so on ....


On some older protocols subnet all 0's and subnet all 1's were reserved. On newer protocols they are not.

A router on subnet k knows about hosts on local subnet k and about routers for other subnets (it does not know about hosts on other subnets).
It has a table of addresses: (network address) (subnet k) (host) telling how to get to a host on the local subnet
and: (network address) (other subnets) (0 only) telling how to get to that other subnet. No info about hosts on other subnets is held.

Example: Packet addressed to: 130.50.15.6 = 1000 0010 0011 0010 0000 1111 0000 0110 = (network address) (subnet 3) (host 774)
If this is subnet 3, the IP address will be in the routing table and the packet will be sent directly to the host.
Else we need to send to another router:
AND with subnet mask (above): 1111 1111 1111 1111 1111 1100 0000 0000
= 1000 0010 0011 0010 0000 1100 0000 0000 = (network address) (subnet 3) (host 0)
i.e. just change last 10 bits to 0
= 130.50.12.0
This is found in routing table as address for subnet 3. Packet is sent on to that subnet, for eventual forwarding to host.

In general:
(IP Address) AND (Subnet Mask) = (Subnet Address)



DCU topology



DCU subnets

First 16 bits are the DCU network number 136.206.
The Windows command:
$ ipconfig
shows:
Subnet Mask ... 255.255.255.0
i.e. 8 bit subnet number.
i.e. 256 possible subnets here, each with maximum 256 machines:
136 . 206 . (subnet) . (host)

Check your IP address. You'll find different subnets being used from room to room in CA.
i.e. Multiple Ethernets within CA alone.

Each node is a full Internet node (IP address). Doesn't really matter which Ethernet you are on.
Though may be useful to divide organisation into fixed groups so can easily restrict access to web page based on IP address, etc.

e.g. at time of writing:

Subnet Use Users
10 LG01, L101, L128, L201 undergrads
11 web server
mail server
ssh server
sftp server
DNS server
staff Unix/Linux servers
all
undergrads
staff, postgrads
17 L114, L129, L130 undergrads
18 LG25, LG26, LG27, LG28, L125 undergrads
19 postgrad machines postgrads
115 staff machines staff
218 wireless LAN all

Apart from the users, there is also one file server machine on every subnet.




Network tools


Linux / UNIX


Windows



Traceroute



Different forms of URL

My address is:
http://www.computing.dcu.ie/~humphrys/
or:
http://computing.dcu.ie/~humphrys/
These are currently aliases for the machine:
http://elbrus.computing.dcu.ie/~humphrys/
What all these translate to is:
http://136.206.11.240/~humphrys/


URL obscuring


Decimal IP address notation

Strangely enough, the above is also the same as:
http://2295204848/~humphrys/

This may or may not work:

See:


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

http://136.206.11.240/~%68%75%6D%70%68%72%79%73/

Embed password in URL

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

Try these on different Linux and Windows browsers:

http://www.paypal.com@2295204848/

http://www.paypal.com:login@2295204848/

Or these:

http://www.paypal.com@136.206.11.240/

http://www.paypal.com:login@136.206.11.240/


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:

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




Feeds      HumphrysFamilyTree.com

Bookmark and Share           On Internet since 1987.