How to get gateway address when subnetting?

toby picture toby · May 7, 2011 · Viewed 89.2k times · Source

I have to subnet a network from a single class C IP address.

I have figured out the subnet mask and the broadcast address (I'm using subnet mask /28) but don't understand how to get the gateway address.

Can anyone help me?

Answer

Rajneesh Tiwari picture Rajneesh Tiwari · Apr 15, 2013

If subnet mask is 255.255.255.248 then number of masked bit will be 5, hence number of subnets = 2. The power number of masked bits = 2 the power 5 = 32 subnets, and the number of hosts per subnets = 2. The power (unmasked bit or 32- total number of network bits) = 2 the power (32-29) = 8 host/subnet.

Hence:

  • 1) IP's in subnet-1 will be from 192.168.1.0 to 192.168.1.7 where 192.168.1.0 will be subnet id and 192.168.1.7 will be broadcast id.

  • 2) IP's in subnet-2 will be from 192.168.1.8 to 192.168.1.15

and so on............

  • 32) IP's in subnet-32 will be from 192.168.1.248 to 192.168.1.255.....

The gateway is only one for a network i.e. the first IP address of that network.