What should the default gateway setting be set to for a simple network of 2 computers and one switch? Basically when there is no gateway (ie. no router, no internet, and no other connections into the switch).

Should it be set to:

  • IP address of computer ON network.
  • IP address of computer NOT on network.
  • Something else.

Other notes:

  1. Some applications require 'something' entered. So gateway cannot just be 'blank' or ingored.
  2. Does the particular gateway address used affect the PING time performance between these two machines? (ie. more/less traffic).
  • 1
    What OS are you using? – BillP3rd Sep 6 '13 at 0:54
  • Let's say Window 7. – Nicholas Sep 6 '13 at 0:55

You don't have to have a default gateway. If no router exists on your network, you want to NOT specify one.

In the Windows configuration for a network adapter you can leave the default gateway blank.

Linux has no problem if you want to delete the default route, or not specify one.

The default gateway address will only come into play if a system is trying to reach a subnet that's not currently on any network adapter. So if your network adapter is set to, and you send traffic to, the default gateway never comes into play. It would only possibly use it you tried to send traffic to something like or something not in that subnet.

What should happen is if a process attempts to send traffic to a network access, and there is no route to it, then it should receive a "No route to host" error. If you don't specify a default gateway at all, it shouldn't even try to send traffic to any IP that's not in the subnet of your network adapter.

If you specify any other IP (including, it's going to try to send traffic to that IP if the destination IP is not in the same subnet as your network adapter (and no other interface matches the subnet). Nothing will respond, and the connection will time out. Waiting for the timeout will consume more time than simply not specifying a default gateway and letting the Windows TCP/IP software issue an error to the process trying to make a connection.

| improve this answer | |
  • True, but there is generally always 'some' process trying to access some other network (especially on windows). Would specifying a valid address (as opposed to nothing) likely lead to shorter time-outs, more process sleeping, and/or less general traffic on the network. – Nicholas Sep 6 '13 at 1:18

Generally speaking, you don't need a default gateway, however, since you seem to "need" it for certain applications, we can provide a "dummy" gateway.

By convention, I usually reserve the IPv4 address ending in ".1" as my gateway. So, let's assume your Computer "A" is, and "B" is You can supply as the default gateway. Traffic between the two systems won't be affected because the default gateway only comes into play if you try to reach a computer that's on another network. If that happens in this case, you'll get something like "Gateway failed to respond" as an error.

I'd be interested to know what applications you have that require a default gateway. As @ultrasawblade points out, Windows itself is perfectly happy if you leave the default gateway blank.

| improve this answer | |
  • So your basically saying: A valid IP address in the subnet range of a computer NOT currently on the network. Do you think this increases, decreases, or has no change to network usage. (as opposed to say using the IP address of an existing computer). – Nicholas Sep 6 '13 at 1:05
  • 1
    It should have no effect on your network traffic unless one of your two computers tries to reach a computer in another subnet. In that case, you'd get the "Gateway not found," or similar. – BillP3rd Sep 6 '13 at 1:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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