Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

2 Answers 2

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
1  
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

 
discard

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.