Find the first usable host address in an IP subnet.
The first usable host address in a subnet is simply the network address plus one. The network address itself is reserved to identify the subnet, so the next sequential address is the first one assignable to a device.
First host
first_host = network_address + 1
RFC 3021 allows both addresses in a /31 subnet to be used as host addresses on point-to-point links, since neither broadcast nor a separate network address is needed between exactly two devices.
By convention many administrators assign the first (or last) usable address to the default gateway, but this is a convention, not a requirement — the gateway can be any valid host address in the subnet.