Dr. Mark Humphrys

School of Computing. Dublin City University.

Home      Blog      Teaching      Research      Contact

Search:

CA216      CA249      CA318

CA400      CA651      CA668


  DCU topology

DCU subnets



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
217 student servers undergrads
218 wireless LAN all

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




Feeds      w2mind.org

On Internet since 1987.