CS 447 Networks and Data Communication IP Subnet Mask: Purpose: To indicate which portion of an IP address indicates host address Example SIUE IP Network Domain: XX.XX XXXXXXXX XXXXXXXX XX If we do NOT have any subnetwork We know that the last 16 bits indicate the host addresses (since a Class-B IP address assumes to use the last 16 bits for host address) Subnet_Mask/001
CS 447 Networks and Data Communication Owners of a network domain can create as many subnets as they want. Problem 1 bit to indicate subnetwork 2 bits to indicate subnetwork If there are two subnetworks within a domain If there are four subnetworks within a domain If there are 2 n subnetworks within a domain n bits to indicate subnetwork XXXXXXXX XXXXXXXX XX We need to indicate how many bits are assigned for subnetworks Subnet_Mask/002
CS 447 Networks and Data Communication : - If SIUE has 16 subnetworks - Try to figure out the host address of How to use Subnet Mask #1: Get Host Address BINARY AND Invert 1 and 0s Mask for domain address Mask for subnetwork Subnet Mask: Subnet_Mask/003 ( )
CS 447 Networks and Data Communication - If SIUE has 16 subnetworks - Try to figure out the domain and subnetwork address of How to use Subnet Mask #2: Get Domain Address and Subnet Address Mask for domain address : BINARY AND Subnet Mask: IP domain address Subnetwork address Subnet_Mask/004 Subnet Indicator
CS 447 Networks and Data Communication Why do we need “Subnet Mask” Subnet_Mask/005 The IP defines three classes of IP: Class-A, Class-B and Class-C Each class defines the number of hosts within a network, but does not define the number of sub-nets within a network. As long as your network does not have any sub-network, you do not have to use “Subnet Mask” Since each network can have different number of sub-networks, we have to let routers know which bits are used for identifying subnets