Table Of Contents

IP Subnetting - Q&A

Questions

  1. What is an IP sub-network?
  2. What is the use of sub-networks?
  3. Which RFC specifies IP subnetwork addressing?
  4. How sub-networks are formed?
  5. What is a subnet mask?
  6. How a host determines its subnet mask?
  7. How is a subnet mask formed?
  8. Why a host needs to know about its subnet mask?
  9. How to determine to the network ID, sub-network ID and the host ID, given the IP address and the subnet mask?
  10. Is it possible to form a subnet mask by using bits in non-contiguous positions in the IP address?
  11. Is it possible to determine whether the network is subnetted by using the IP address of a host alone?
  12. Is it necessary for hosts in a network "M" to know about the subnetworks in another network "N" to communicate with hosts in that network?
  13. What are the possible values for a sub-net mask?
  14. What are the two types of subnetting?
  15. What is 'Static Length' subnetting?
  16. What is 'Variable Length' subnetting?
  17. What is the disadvantage in using 'Static Length' subnetting?
  18. What is the advantage in using 'Static Length' subnetting?
  19. What is the advantage is using 'Variable Length' subnetting?
  20. What is the disadvantage in using 'Variable Length' subnetting?
  21. What are the special subnetwork IP addresses?

Answers

  1. What is an IP sub-network?
    A single IP class A, B, or C network is further divided into a group of hosts to form an IP sub-network.

  2. What is the use of sub-networks?
    Sub-networks are created for manageability, performance, and security of hosts and networks and to reduce network congestion.

  3. Which RFC specifies IP subnetwork addressing?
    RFC 950 specifies IP subnetwork addressing protocol.

  4. How sub-networks are formed?
    The host ID portion of an IP address is further divided into a sub-network ID part and a host ID part. The sub-network ID is used to uniquely identify the different sub-networks within a network.

  5. What is a subnet mask?
    Subnet mask is a 4 byte (32 bit) number used to identify the sub-network ID and the host ID from an IP address. All the hosts in a sub-network will have the same subnet mask. E.g. 255.255.255.0, 255.255.127.0, 255.255.0.0

  6. How a host determines its subnet mask?
    A host determines its subnet mask during the boot-up sequence either from a configuration file stored in the local hard disk or from a server in the network using a network protocol like BOOTP, ICMP.

  7. How is a subnet mask formed?
    For all the bits in the IP address which are used to represent the network ID, and the sub-network ID, the corresponding bits in the subnet mask will be one. For all the bits in the IP address which are used to represent the host ID, the corresponding bit in the subnet mask will be zero. For example, if the first two bytes of the IP address are used to represent the network (class B address) and the third byte is used to represent the sub-network, and the last byte is used to represent the host, then the subnet mask will be 255.255.255.0

  8. Why a host needs to know about its subnet mask?
    When a host "A" needs to communicate with another host "B", it must know whether host "B" is in the same network or in a different network. If the host "B" is in the same network then host "A" can send the datagram directly to host "B". But if the host B is in a different network, then host "A" must send the datagram to a proper router. By determining the network class of the IP address of host "B", host "A" can determine whether host "B" is in the same network or in a different network. By using the subnet mask host "A" can find out whether host "B" is in the same subnet or in a different subnet.

  9. How to determine to the network ID, sub-network ID and the host ID, given the IP address and the subnet mask?
    The network class (A or B or C) of a given IP address can be easily determined by looking at the value of the first 4 bits of the first byte. From the network class, the number of bytes used to represent the network can be determined and hence the network ID can be determined. By performing a "AND" logical operation of the IP address and the subnet mask, the sub-network ID can be determined. In the value resulting from the "AND" operation, by removing the bytes used for the network ID, the remaining bits for which the corresponding bit in the subnet mask is one, represents the sub-network ID.

  10. Is it possible to form a subnet mask by using bits in non-contiguous positions in the IP address?
    Yes. It is possible to use non-contiguous bits in the host portion of an IP address to form the subnet field according to the standard. Only contiguous fields are usually used to form a subnet field.

  11. Is it possible to determine whether the network is subnetted by using the IP address of a host alone?
    No. It is not possible to determine whether a network is subnetted just by using the IP address alone. The subnet mask is needed to determine this.

  12. Is it necessary for hosts in a network "M" to know about the subnetworks in another network "N" to communicate with hosts in that network?
    No. Subnetworks in one network are transparent to hosts in another network.

    Example 1:
    For example, let us say the IP address is 100.24.124.27 and the subnet mask is 255.255.0.0. As the most significant bit in the first byte of the IP address is zero, this is a Class A IP address. Therefore, the first byte represents the network ID. In this case, the network ID is 100. The result of a logical AND operation between the IP address and the subnet mask is 100.24.0.0. In this value, the first byte represents the network ID. For all the remaining one bit in the subnet mask, the corresponding bit in the IP address, represents the sub-network ID. In this case it is 24. The remaining bits in the IP address represent the host ID. In this case it is 124.27.
    Example 2:
        IP Address: 187.199.127.5
        Sub-net mask: 255.255.255.0
    
        Network Class: B
        Network ID: 187.199
        Result of logical AND operation: 187.199.127
        Sub-network ID: 127
        Host ID: 5
    
    Example 3:
        IP Address: 187.199.127.5
        Sub-net mask: 255.255.240.0
    
        Network Class: B
        Network ID: 187.199
        Result of logical AND operation: 187.199.112.0
        Sub-network ID: 112
        Host ID: 15.5
    
    Example 4:
        IP Address: 187.199.127.5
        Sub-net mask: 255.255.128.0
    
        Network Class: B
        Network ID: 187.199
        Result of logical AND operation: 187.199.0.0
        Sub-network ID: 0
        Host ID: 127.5
    

  13. What are the possible values for a sub-net mask?
    All the possible values for a sub-net mask are shown below:
            255.128.0.0
            255.192.0.0
            255.224.0.0
            255.240.0.0
            255.248.0.0
            255.252.0.0
            255.254.0.0
            255.255.0.0
            255.255.128.0
            255.255.192.0
            255.255.224.0
            255.255.240.0
            255.255.248.0
            255.255.252.0
            255.255.254.0
            255.255.255.0
            255.255.255.128
            255.255.255.192
            255.255.255.224
            255.255.255.240
            255.255.255.248
            255.255.255.252
    

  14. What are the two types of subnetting?
    The two types of subnetting are:
    1. Static length
    2. Variable length

  15. What is 'Static Length' subnetting?
    If all the subnetworks in a single network use the same subnet mask, it is called as 'Static Length' subnetting.

  16. What is 'Variable Length' subnetting?
    If the different subnetworks in a single network use different subnet masks, it is called as 'Variable Length' subnetting.

  17. What is the disadvantage in using 'Static Length' subnetting?
    In the case of a 'Static Length' subnetwork, irrespective of the number of hosts in the subnetwork, a single subnet mask is used for all the subnetworks. Because of this, a large number of IP addresses will be wasted. For example, let us say, we have a class C IP network address 192.9.205.0 subnetted using a subnet mask 255.255.255.192. The total number of possible subnetworks is 4 and the total number of possible hosts per subnetwork is 32. Even if a subnetwork has just 4 hosts, it will be allocated the above subnetwork IP address, in this case 28 host IP addresses will be wasted.

  18. What is the advantage in using 'Static Length' subnetting?
    It is easy to configure a network using 'Static Length' subnetting. In addition, native IP routing understands only static subnetting.

  19. What is the advantage is using 'Variable Length' subnetting?
    In the case of 'Variable Length' subnetwork, IP addresses are allocated depending on the number of hosts present in the subnetwork. So available host IP addresses are efficiently used and are not wasted.

  20. What is the disadvantage in using 'Variable Length' subnetting?
    All the routers in a 'Variable Length' subnetted network must understand this type of subnetting.

  21. What are the special subnetwork IP addresses?
    The subnet addresses in which all the bits are zero or one are special subnet IP addresses. The subnet address in which all the bits are zero, represents the local subnetwork in which the datagram originated. The subnet address in which all the bits are one represents a subnet broadcast address. In the broadcast address, all the other bits including the network and host ID must be one.


Table Of Contents