Super User is a question and answer site for computer enthusiasts and power users. 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

If I go into TCP/IP settings to manually set an IP address for an XP machine, what should be set for:

  • Subnet mask
  • Default gateway

What would happen if I set an IP address that is already assigned to another machine?

If I set a machine to be a certain IP number, will the DHCP server know not to try to give that IP address to another machine that joins the network?

share|improve this question

To answer your question, you first have to understand how IP addresses are allocated. (Note that this is a overly simplified version intended to be understandable with little background knowledge, and is not very technically accurate)

For example, if you are using private address space: to represents the network represents the broadcast address to are usable addresses for computers

Quite often, represents the router, and thus, you have to on your disposal.

In this case, you have:

default gateway

the netmask, [11111111].[11111111].[11111111].[00000000] (when expanded in binary), indicates that in an arbitary address, no matter what you put in the '0' part, you are still within your network provided that the '1' part is equal.

Thus, is in the network whereas is not.

In a home router network connected to an ADSL modem, the usual default gateway is the router itself, and the network mask is usually (i.e. a class C network). Some routers do use though.

In a leased line environment, usually you will be assigned, e.g. 4 address (one router, one broadcast and 2 usable), from, let's say, -, then the default gateway is usually, and netmask (i.e. 255.255.255.[11111100]) and broadcast

share|improve this answer
Depending on implementation, most DHCP server I have used do not have that IP-conflict prevention capability. The safe bet is to limit the DHCP server to e.g. x.x.x.100-x.x.x.128, and use x.x.x.1-99 for static IPs. – bubu Jun 24 '10 at 13:10
all the DHCP implementations I've used have had the ability to configure particular hosts to have a fixed IP without having to manually allocate, or reserve address range(s) – Rowland Shaw Jun 24 '10 at 13:54
@Rowland Shaw I thought the OP asked if the DHCP implementations would allow for detection of current IPs on the network and not allocating these IP out on DHCP request. – bubu Jun 24 '10 at 15:43
Seems I missed that edit -- I'll crawl back under my rock :) – Rowland Shaw Jun 24 '10 at 16:15

If you are going to have a mixed DHCP/Static network, you want to make sure that your DHCP server has a limited number of IPs to assign. For example, on my home network, I assign static address to all wired connections, but use DHCP for all wireless connections. I can configure the DHCP server in my gateway router to assign address in the X.X.X.110 to X.X.X.120 range. Since I know what IP range my DHCP server is using, I just assign static IPs from the rest of the pool.

As to assigning an IP already in use to another system, whichever system is first to acquire the network will have use of the IP. Your system configured for DHCP MAY try to request a new IP, but unlikely if it is first onto the network.

As to assigning IPs at random, the only way your DHCP will know not to assign an IP already in use is if the system using that IP is alive on the network. The DHCP will see that and assign another from the avaiable pool.

share|improve this answer

Which networks are you going to connect to?

If it is a home router/ADSL device, it usually has DHCP configured but default.
So, you need to do nothing.

Here is a link to some basics on static IP configuration.
You can start from the Home-Network-help homepage if you need to get broader details.

Update on your extra question:
If you choose to use a static IP address, it should be outside the range used by your DHCP server. The server will not know about this allocation because normally, once you setup a static IP on this machine, it will not interact over DHCP with that server.

share|improve this answer
See my extra question. – CJ7 Jun 24 '10 at 12:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .