Notes on Internet Sub-Domains

Sometimes it is advantageous to split a large Internet domain into separate pieces or sub-domains. North Carolina A&T State University has one large domain. Whenever any computer on campus needs to find the hardware address of the computer next to it, every computer on campus receives the ARP message it sends. This can cause all computers to receive a lot of unnecessary broadcast messages. Studies have shown that computers in the Computer Science graduate lab receive over 100 broadcast messages every second that have nothing to do with Computer Science equipment. Dividing the domain into sub-domains limits the range of broadcast messages. Broadcast messages will always be forwarded by a bridge or repeater, but will not be forwarded by a router or gateway.

When you configure the Internet Protocol on a computer, you must specify the subnet mask. The subnet mask is a bit pattern that is logically ANDed with Internet addresses to separate the netid. The default subnet masks are:

class A 255.0.0.0
class B 255.255.0.0
class C 255.255.255.0

Remember that 255 is 11111111 in binary. Assume a source host with the class B IP address 152.8.251.41 wants to send a message to a destination with class A address 15.181.0.31 The source will AND its IP address and the destination IP address and compare the results. If they are identical, then the destination is in the same domain.

152.8.251.41	10011000.00001000.11111011.00101001	source IP address
AND		11111111.11111111.00000000.00000000	subnet mask
source result	10011000.00001000.00000000.00000000
15.181.0.31	00001111.10110101.00000000.00011111	destination IP address
AND		11111111.11111111.00000000.00000000	subnet mask
dest. result	00001111.10110101.00000000.00000000

Because the two results are different, the source knows the destination is not in its domain and the frames must be sent to a gateway.

To create a sub-domain, the network mask is extended so that some of the bits in the hostid portion of the address are used to separate domains. Imagine that a class B domain wants to create 4 sub-domains. It can extend the network mask by two bits (remember that it takes 2 bits to identify one of 4 sub-domains). The subnet mask for 4 sub-domains in a class B domain would be:

255.255.192.0 = 11111111.11111111.11000000.00000000

Example:

Imagine that A&T has divided its domain into 4 sub-domains as shown below. Each host uses the above subnet mask.

subnet.gif (3702 bytes)

If a computer with IP address 152.8.251.41 wants to send a message to a computer with the IP address 152.8.244.21. It will AND the IP addresses with the subnet mask to determine if the destination is in the same subnet.

152.8.251.41	10011000.00001000.11111011.00101001	source IP address
AND		11111111.11111111.11000000.00000000	subnet mask
source result	10011000.00001000.11000000.00000000
152.8.244.21	10011000.00001000.11110100.00010101	destination IP address
AND		11111111.11111111.11000000.00000000	subnet mask
dest. result	10011000.00001000.11000000.00000000

Since the results are the same, the destination is in the same subnet and the source may send the packet directly to the destination. Now assume the same source wants to send a packet to 152.8.47.14

152.8.251.41	10011000.00001000.11111011.00101001	source IP address
AND		11111111.11111111.11000000.00000000	subnet mask
source result	10011000.00001000.11000000.00000000
152.8.47.14	10011000.00001000.00101111.00001110	destination IP address
AND		11111111.11111111.11000000.00000000	subnet mask
dest. result	10011000.00001000.00000000.00000000

In this case the results are different. This means that the destination is in a different sub-domain. To send a packet to this host, the source must send it to the router interconnecting the sub-domains.

 

 

last updated on January 02, 2004