Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I set a static IP on my device, it works for a short time, then it won't connect again unless I do DHCP. It's like the router chooses an IP for the device, and only allows it to use that one. Why is this happening?

The same thing happened a while ago with my desktop, I wanted to set a static IP so I could access it from another building, and the router, being the piece of crap it is, reset all the IPs, and wouldn't allow the computer to connect.

D-Link WBR-1310, Hardware B1, Firmware 2.02

share|improve this question
    
Are you using a static IP that is inside your DHCP address range? –  mossy Feb 10 '13 at 19:48
    
@mossy What to you mean? It's 192.168.0.xxx –  tkbx Feb 10 '13 at 19:48
    
It's 2 to 154, and the IP I'm trying is in that range –  tkbx Feb 10 '13 at 19:55
    
Trying using 192.168.0.155 as a static –  mossy Feb 10 '13 at 19:57
    
A router can't reset a computer's static IP. A computer controls what its IP address is; DHCP lets it ask the router for an unused IP, but the router can't force the computer to change a static IP. –  cpast Feb 10 '13 at 20:09
show 2 more comments

migrated from serverfault.com Feb 10 '13 at 21:14

This question came from our site for professional system and network administrators.

2 Answers

Local subnet traffic doesn't need to go through the router, in a simple network where the entire local subnet is on the same later 2 link; broadcast ARP will resolve MACs and from there you just send your packet to its destination. Obviously no routing is needed.

However, there are two complications I can see if you are using a home router+WAP in this case.

First, if you assign a static IP that is within the DHCP pool and do not create a DHCP reservation (your router+stuff may or may not support this), the thing may assign that address via DHCP to some other host. This would create an IP conflict, causing connectivity issues pretty much at random.

Second, if you have a mixed later 2 (eg. wired 802.3 and wireless 802.11), it is possible that your router+WAP's WAP functions are filtering MAC/IP pairs that it did not assign via DHCP (instead of bridging them across the layer 2 gap). In this case, you will have to create a DHCP reservation and probably not assign the address as static on the host (instead allowing DHCP to just give the same address each time).

If your firmware doesn't support this, consider flashing with openwrt, tomato, or dd-wrt.

It is worth noting that the router on a network doesn't control what addresses a host uses. DHCP is a mechanism for doing so in a way, but it isn't mandatory and won't override static configuration.

share|improve this answer
add comment

In some cases, using a address inside your DHCP range can cause problems.

In your router configuration you can set DHCP to start assigning address at .xxx and end at at a specified number. So if you set the DHCP server to start at 192.168.0.100 and end at 50. You should try setting your static IP at something below 192.168.0.100 or after .150

share|improve this answer
add comment

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.