Router not allowing static IP?

0

1

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

tkbx

Posted 2013-02-10T19:45:38.487

Reputation: 185

Are you using a static IP that is inside your DHCP address range? – QuentinMoss – 2013-02-10T19:48:00.117

@mossy What to you mean? It's 192.168.0.xxx – tkbx – 2013-02-10T19:48:56.207

It's 2 to 154, and the IP I'm trying is in that range – tkbx – 2013-02-10T19:55:56.640

Trying using 192.168.0.155 as a static – QuentinMoss – 2013-02-10T19:57:32.883

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 – 2013-02-10T20:09:58.537

@cpast no, but it won't connect while I have a static IP. – tkbx – 2013-02-10T21:51:03.403

I know. I was just clarifying a point in your question ("reset all the IPs"). – cpast – 2013-02-10T21:51:55.007

Answers

4

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.

Falcon Momot

Posted 2013-02-10T19:45:38.487

Reputation: 491