Answer & Explanation:
An IP version 4 address is of the form w.x.y.z/s
where s = subnet mask
w = first 8 bit field, x = 2nd 8 bit field, y = 3rd 8 bit field, and z = 4th 8 bit field
each field has 256 decimal equivalent. that is
binary denary or decimal
11111111 = 2⁸ = 256
w.x.y.z represents
in binary
11111111.11111111.11111111.11111111
in denary
255.255.255.255
note that 255 = 2⁸ - 1 = no of valid hosts/addresses
there are classes of addresses, that is
class A = w.0.0.0 example 10.0.0.0
class B = w.x.0.0 example 172.16.0.0
class C = w.x.y.0 example 198.16.8.1
where w, x, y, z could take numbers from 1 to 255
Now in the question
we were given the ip address : 198.16.0.0 (class B)
address of quantity 4000, 2000, 8000 is possible with a subnet mask of type
255.255.0.0 (denary) or
11111111.11111111.00000000.00000000(binary) where /s = /16 That is no of 1s
In a VLSM (Variable Length Subnet Mask)
Step 1
we convert the number of host/addresses for company A to binary
4000 = 111110100000 = 12 bit
step 2 (subnet mask)
vary the fixed subnet mask to reserve zeros (0s) for the 12 bit above
fixed subnet mask: 11111111.11111111.00000000.00000000 /16
variable subnet mask: 11111111.11111111.11110000.000000 /20
now we have added 4 1s in the 3rd field to reserve 12 0s
subnet mask: 255.255.16.0 (where the 1s in each field represent a denary number as follows)
1st 1 = 128, 2nd 1 = 64 as follows
1 1 1 1 1 1 1 1
128 64 32 16 8 4 2 1
step 3
in the ip network address: 198.16.0.0/19 (subnet representation) we increment this using 16
that is 16 is added to the 3rd field as follows
That means the ist Valid Ip address starts from
Ist valid Ip add: 198.16.0.1 - 198.16.15.255(last valid IP address)
Company B starts+16: 198.16.16.0 - 198.16.31.255
+16: 198.16.32.0- 198.16.47.255 etc
we repeat the steps for other companies as follows
Company B
Step 1
we convert the number of host/addresses for company B to binary
2000 = 11111010000 = 11 bit
Step 2
vary the fixed subnet mask to reserve zeros (0s) for the 11 bit above
fixed subnet mask: 11111111.11111111.00000000.00000000 /16
variable subnet mask: 11111111.11111111.11111000.000000 /21
now we have added 5 1s in the third field to reserve 11 0s
subnet mask: 255.255.8.0 (where the 1s in each field represent a denary number as follows)
1st 1 = 128, 2nd 1 = 64 as follows
1 1 1 1 1 1 1 1
128 64 32 16 8 4 2 1
Step 3
Starting from after the last valid Ip address for company A
in the ip network address: 198.16.16.0/21 (subnet representation) we increment this using 8
That means the ist Valid Ip address starts from
Ist valid Ip add: 198.16.16.1 - 198.16.23.255(last valid IP address)
Company C starts +16: 198.16.24.0- 198.16.31.255
+16: 198.16.32.0- 198.16.112.255 etc
Company C
Step 1
we convert the number of host/addresses for company C to binary
4000 = 111110100000 = 12 bit
Step 2
vary the fixed subnet mask to reserve zeros (0s) for the 12 bit above
fixed subnet mask: 11111111.11111111.00000000.00000000 /16
variable subnet mask: 11111111.11111111.11110000.000000 /20
now we have added 4 1s in the 3rd field to reserve 12 0s
subnet mask: 255.255.16.0 (where the 1s in each field represent a denary number as follows)
1st 1 = 128, 2nd 1 = 64 as follows
1 1 1 1 1 1 1 1
128 64 32 16 8 4 2 1
Step 3
Starting from after the last valid ip address for company B
in the ip network address: 198.16.24.0/20 (subnet representation) we increment this using 16
That means the ist Valid Ip address starts from
Ist valid Ip add: 198.16.24.1 - 198.16.39.255(last valid IP address)
Company C starts +16: 198.16.40.0- 198.16.55.255
+16: 198.16.56.0- 198.16.71.255 etc
Company D
Step 1
we convert the number of host/addresses for company D to binary
8000 = 1111101000000 = 13 bit
Step 2
vary the fixed subnet mask to reserve zeros (0s) for the 13 bit above
fixed subnet mask: 11111111.11111111.00000000.00000000 /16
variable subnet mask: 11111111.11111111.11100000.000000 /19
now we have added 3 1s in the 3rd field to reserve 13 0s
subnet mask: 255.255.32.0 (where the 1s in each field represent a denary number as follows)
1st 1 = 128, 2nd 1 = 64 as follows
1 1 1 1 1 1 1 1
128 64 32 16 8 4 2 1
Step 3
Starting from after the last valid ip address for company C
in the ip network address: 198.16.40.0/20 (subnet representation) we increment this using 32
That means the ist Valid Ip address starts from
Ist valid Ip add: 198.16.40.1 - 198.16.71.255(last valid IP address)
Company C starts +16: 198.16.72.0- 198.16.103.255
+16: 198.16.104.0- 198.16.136.255 etc