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

Please assume a simple LAN on Would you configure the default router on or and why?


share|improve this question

10 Answers 10

I am of the "put the gateway at the top of the subnet" religion. It makes absolutely no difference, though.

For kicks, I've put the gateway in a /23 on the ".0" or ".255" address (i.e., spanning to, with and both being valid host IPs)... That's some good fun, that. I enjoy watching the heads of people who don't understand IP subnetting asplode when I tell them-- "The default gateway is"

share|improve this answer
I've used both as well, but usually for more practical reasons than just seeing peoples heads asplode ;) – Mark Henderson May 20 '10 at 22:23
That sounds like fun =D – Antoine Benkemoun May 20 '10 at 22:51
That may be fun buts can cause problems later when someone who doesn't properly understand subnetting has to debug a network problem. – John Gardeniers May 21 '10 at 5:31
+1 for making a good point and being Evan Anderson. =) – Qwerty May 21 '10 at 6:17
@ John Gardeniers: I'd love to say that people who don't understand subnetting shouldn't be debugging a tcp/ip network... but we all know that doesn't always work – RobM May 21 '10 at 14:52

From what I've seen, it's almost entirely personal/organizational preference. As long as you are consistent, neither way is wrong. If you really wanted to, you could set up the router to have both IPs (but this would be silly.)

share|improve this answer
+1 for consistency – Qwerty May 21 '10 at 6:13

I would use, then asign IP starting at (I keep some free IP if I need to add some network device like load balancer, etc.)

Why ? Imagine you need to shrink the network to a /25, if you have used you must change the gateway all host.
Ok you will tell me, I can use and start affecting IP from the top instead of the bottom then shrink to instead of That's right.
Now imagine you need to extend the network to If a gateway set as, the gateway is still the first IP of the network when would be in middle.

That why I prefer to take the first IP most of the time, it's also easier for others person, they just know that the gateway if the first IP in the subnet and most of the time changing the subnet will not affect this statement.

share|improve this answer
BAD argument - if you this way need to shring the network, you still need to change the network mask on all host. Ergo go to all hosts anyway -> same situation. – TomTom May 21 '10 at 6:17
Yes but this is a lot easier... if you change gateway on host first, you loose network on host untill you changed all host then the gateway IP (Of course you can't change gateway first or you loose your host, then can't do the change). Changing the mask doesn't imply a cut! – radius May 21 '10 at 6:23
(I assume you need to go through the router to connect to hosts to do modification) – radius May 21 '10 at 6:30
I think this is a valid answer. In the case of changing the subnet size it feels more natural to keep the low adresses and take care of the other hosts in the next step. – Thomas May 21 '10 at 14:23

Less important than "is the gateway high or low?" is "did you document what you did so so in the future people will know how to find things?"

share|improve this answer
Sure (I promise) – Thomas May 21 '10 at 14:27
+1 for documenting – PF4Public Jun 2 at 1:55

Usually people stick with what the device shipped with - which is very often I work in an environment where the convention is that the gateway is .254, managed switches live on .253 downwards, backup connection on .1, servers on .2 upwards.

share|improve this answer

There is no hard and fast rule about this, but on nearly all of the networks I've designed and/or worked on, the lowest IP in the subnet is used for the router/default gateway. In your case, this would be

As for your "why?" question - it's really just a convention that the networking community has settled on. If you want to put the default gateway somewhere else, feel free, but really you may be asking for confusion at some point in the future.

share|improve this answer
From school I remember that the last IP should be used. But in real life I see most routers on the first IP. I wonder if there is a spec or convention for either way. – Thomas May 20 '10 at 22:25
That's probably because most "routers" these days are consumer-spec devices that also do DHCP, and the fewer number of characters Mrs Jones has to type ( vs the less chance she'll get it wrong. – Mark Henderson May 21 '10 at 2:20
Okay. That's a small but also interesting advantage for low IPs. – Thomas May 21 '10 at 14:17

I've always had the router at the bottom. Then come the servers, followed by any other devices that need or benefit from fixed addresses. Printers are at the top, also with fixed addresses. Everything in between is DHCP.

That's just the way I do it but as others have already pointed out, it makes absolutely no difference. The only thing that does matter is that you adopt a consistent scheme and stick to it. Don't forget to document it.

share|improve this answer

Toss a coin - it doesn't matter - what's more important is to stick with the result for all subnets to maintain consistency.

share|improve this answer

This is down to site practice and preferences.

The only "rule" I would suggest is whichever one you pick, be consistent. If you manage many networks or one large complex network with lots of subnets and sometimes the router is at 192.168.x.1 and sometimes its on 192.168.x.254... that is a great way to confuse everyone.

share|improve this answer
I agree, consistency is important. – Thomas May 21 '10 at 14:24

It doesn't matter what IP the default gateway has, but it's good to have a consistent policy throughout the network. It's usually easiest to say "lowest usable" or "highest usable" since those two are available on any network from a /30 to a /0.

share|improve this answer

protected by Chris S Oct 17 '14 at 14:04

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?