formula for defining a subnet mask

Upload: sonicefu

Post on 03-Jun-2018

220 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/12/2019 Formula for Defining a Subnet Mask

    1/9

    Formula for defining a Subnet Mask

    1. Determine the class and the default subnet mask of the IP address you have been given.

    2. Identify the number of subnetworks (subnets) that are required.

    3. Determine how many bits are required to support the total number of subnets.

    4. Starting from the left hand side of the binary chart, count out the number of bits required to

    support the subnet mask.

    5. The value under the last bit that you counted is the subnet mask value that will support the

    required number of subnets.

    6. The remaining bits to the right hand side of the subnet mask will be used to represent the host

    portion of the IP address.

    Example

    You have an IP address of 138.45.0.0 which you need to subnetwork into 45 individual networks.

    STEP 1. Determine the class and the default subnet mask of the IP address you have been given.IP address 138.45.0.0 is a Class B address with a default subnet mask of 255.255.0.0

    STEP 2. Identify the number of subnetworks (subnets) that are required.45 individual networks (subnets) will be required.

    Formula for defining a Subnet Mask http://www.mindwerks.org/Subneting.htm

    1 of 9 12/17/2013 10:49 PM

    http://www.mindwerks.org/Subneting.htmhttp://www.mindwerks.org/Subneting.htm
  • 8/12/2019 Formula for Defining a Subnet Mask

    2/9

    STEP3. Determine how many bits are required to support the total number of subnets.You can determine this by figuring the binary value of 45 which is 00101101. This tells us

    that it takes a total of 6bits to support the value of 45, 101101.

    * The fastest way to figure the number of bits required is to use the IP address cheat chart.

    (Remember to subtract 1 from the Possible # of hosts or subnets section).

    STEP 4. Starting from the left hand side of the binary chart, count out the number of bits

    required to support the subnet mask.

    Formula for defining a Subnet Mask http://www.mindwerks.org/Subneting.htm

    2 of 9 12/17/2013 10:49 PM

    http://www.mindwerks.org/Subneting.htmhttp://www.mindwerks.org/Subneting.htm
  • 8/12/2019 Formula for Defining a Subnet Mask

    3/9

    STEP 5. To determine the subnet mask value, perform a binary to decimal conversion on yourprevious result or use the IP cheat chart.

    Answer:

    To support 45 individual networks with a given network ID of 138.45.0.0 we would have to use a

    subnet mask of 255.255.252.0

    Formula for defining a Subnet Mask http://www.mindwerks.org/Subneting.htm

    3 of 9 12/17/2013 10:49 PM

    http://www.mindwerks.org/Subneting.htmhttp://www.mindwerks.org/Subneting.htm
  • 8/12/2019 Formula for Defining a Subnet Mask

    4/9

    Additional question: Given the subnet mask of 255.255.252.0, how many host addresses could

    you support per each subnetwork?

    Answer: To solve this question, you will simply determine the number of bits that are in the host

    portion of the IP address. Since there are 10 bits remaining in the host ID portion of the IP

    address, you would take 2 10 which is 1,024 - 2 (for the invalid addresses) = 1,022 total hosts per

    subnetwork.

    Steps for Determining All Valid Network IDs

    1. Calculate the binary value of the octet that will be used to determine the subnet.

    2. Determine the decimal value of the smallest bit used in the subnet mask. This value becomes

    the incremental value.3. List the subnet octet in binary (low order) and convert the binary value into a decimal value

    subtracting 1 from the result. This will give you the total number of subnets available.

    4. List each subnet address starting with the incremental value determined in step 2 and

    increasing by that value until the total number of available subnets is reached.

    Example

    Given our previous IP address of 138.45.0.0 with a subnet mask of 255.255.252.0, determine all

    valid network IDs.

    (Refer to the figure below for each step)

    STEP 1. Calculate the binary value of the octet that will be used to determine the subnet.The third octet will determine which part of the IP address will represent the network ID as

    opposed to the host ID in our example. Therefore 252 = 11111100 in binary.

    STEP 2. Determine the decimal value of the smallest bit used in the subnet mask. This valuebecomes the incremental value.

    The decimal value of the smallest bit used is 4, so 4 will be the first available subnetwork

    address with each address that follows increasing by increments of 4.

    STEP 3. List the subnet octet in binary (low order) and convert the binary value into a decimalvalue subtracting 1 from the result. This will give you the total number of subnets available.

    The decimal value of the binary address listed in low order is 63. 63 - 1 = 62, therefore 62

    is the total number of valid network IDs.

    Formula for defining a Subnet Mask http://www.mindwerks.org/Subneting.htm

    4 of 9 12/17/2013 10:49 PM

    http://www.mindwerks.org/Subneting.htmhttp://www.mindwerks.org/Subneting.htm
  • 8/12/2019 Formula for Defining a Subnet Mask

    5/9

    STEP 4. List each subnet address starting with the incremental value determined in step 2 andincreasing by that value until the total number of available subnets is reached.

    Since the incremental value in our exercise is 4, the first available subnet address will be

    138.45.4.0 followed by 138.45.8.0 and so on.

    Determining Valid Host IDs

    STEP 1. Starting with the first valid network ID range, list the smallest (1) up to the largest(254) host IDs.

    (The following graphic uses the IP address and subnet mask from the previous exercise)

    Formula for defining a Subnet Mask http://www.mindwerks.org/Subneting.htm

    5 of 9 12/17/2013 10:49 PM

    http://www.mindwerks.org/Subneting.htmhttp://www.mindwerks.org/Subneting.htm
  • 8/12/2019 Formula for Defining a Subnet Mask

    6/9

    IP ADDRESS i.e. 131.45.168.4

    The 32-bit number that identifies an individual device such as a PC, router, or printer.

    Each IP address must be unique to all other IP addresses on the network.

    Formula for defining a Subnet Mask http://www.mindwerks.org/Subneting.htm

    6 of 9 12/17/2013 10:49 PM

    http://www.mindwerks.org/Subneting.htmhttp://www.mindwerks.org/Subneting.htm
  • 8/12/2019 Formula for Defining a Subnet Mask

    7/9

    DEFAULT GATEWAY

    SUBNET MASK

    Identifies which part of the IP address is used for the Network ID and which part is used

    for the Host ID.

    DEFAULT SUBNET MASK VALUES:

    Formula for defining a Subnet Mask http://www.mindwerks.org/Subneting.htm

    7 of 9 12/17/2013 10:49 PM

    http://www.mindwerks.org/Subneting.htmhttp://www.mindwerks.org/Subneting.htm
  • 8/12/2019 Formula for Defining a Subnet Mask

    8/9

    NETWORK ID

    The portion of an IP address that identifies a individual network.

    HOST IDThe portion of the IP address that identifies the individual host.

    The graphic illustrates that when more bits are used to represent thenetwork ID, there are fewer host ID available.

    Formula for defining a Subnet Mask http://www.mindwerks.org/Subneting.htm

    8 of 9 12/17/2013 10:49 PM

    http://www.mindwerks.org/Subneting.htmhttp://www.mindwerks.org/Subneting.htm
  • 8/12/2019 Formula for Defining a Subnet Mask

    9/9

    Formula for defining a Subnet Mask http://www.mindwerks.org/Subneting.htm

    9 of 9 12/17/2013 10:49 PM

    http://www.mindwerks.org/Subneting.htmhttp://www.mindwerks.org/Subneting.htm