School of Computing. Dublin City University.
Online coding site: Ancient Brain
coders JavaScript worlds
DCU topology
|
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.
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.
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)
$ ipconfigshows:
Subnet Mask ... 255.255.255.0i.e. 8 bit subnet number.
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 serversall
undergrads
staff, postgrads17 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.