Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was wondering if the router will always take the first valid host addresses in a subnet?

All of the examples online and book seems to have the router take the first valid host addresses of a subnet.

An example is class C /26.

With subnets of .0,.64,.128 Where the router would have a default gateway of: .1,.65,.129

Thank you in advance.

share|improve this question
up vote 10 down vote accepted

The router/gateway does not need to be the first valid address in a subnet, no. But it has to use something and by convention its the first (or occasionally the last) available IP address in the range. After all, why make things more difficult than they have to be?

share|improve this answer
Moving away from this convention is considered unorthodox and can lead to confusion in the future. One example on a wider scale of things is the situation I'm in at the company I work at, where three ISPs merged, two of which use x.x.x.1 as the gateway and the third uses x.x.x.254 as the gateway. This has a caused a great number of sync-no-surf issues where both installation and support reps from either company get confused and use the wrong gateway while working on a router config. – MaQleod Jun 5 '11 at 5:27
@maqleod - absolutely see why that would cause trouble. I think that people should follow the convention whenever they can but the most important thing is whatever you do, be consistent – RobM Jun 5 '11 at 6:18

As Robert stated in his answer, the router can be assigned any valid ip address in the subnet but the convention has been to use the first, or occasionally, the last valid ip address.

share|improve this answer
You should add something to this answer, right now it's just a paraphrasing of Robert's answer. – crazy2be Jun 5 '11 at 3:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.