How does setting a static IP on a mobile device prevent linux router from assigning that IP address?

Addresses using dhcp, are set by the router. And a router can be set up to always give a certain MAC the same IP address always. It is also possible to set an IP on the device itself, but that you had better clear with the AP administrator, as the danger is may devices having the same IP, especially if many of th edevices are on dhcp.

NOw with most routers as AP YOU are the administrator, so YOU had better make sure your device does not have the same IP as something else. As has been mentioned ad nausium here, there are many ways of doing so. As has been stated, most routers reserve a certain address space for dynamic IP requests. So you had better make sure that your static IP is not one of those. Most routers also are willing to assign a specific IP for a specific MAC if you register that MAC with the router. routers will also router stuff for a machine which simply says it is at a certain IP address (int he router's range) (ie the device simply assumes an IP). So lots of things are possible.

Reply to
William Unruh
Loading thread data ...

I am so sorry. I know it is a terrible thing to have your memory go. He HAS said why. He wasnts to be able toaddress his phone so he can ftp to it, and transfer files to and from the phone using his Win computer. As such not having to figure out what the IP address of the phone is each time he does so is a convenience and he wants that convenience.

Having the router always give his phone the same IP is not a problem. Having his phone assume an IP is also not a problem on his home network is also not a problem on his home network is also not a problem if he is careful to make sure he does not assign from the router's dynamic IP range and that nohting else has that IP. It can be a problem if he then takes his phone onto another network.

See above

Reply to
William Unruh

No. The router does not do symantic parsing. It serves IP addresses. You can, on most routers, tell it to serve a particular IP to a particular MAC. That Many people call "static". It is the same IP address always. It is also what most AP call static. Yes, DHCP is used, but he address is static.

Unfortunately definitions are not cooked up by each individual but come from common useage.

Reply to
William Unruh

Sigh. I think we can all agreed that a (real) static IP LAN address is NOT delivered by the DHCP server in the router, while a dynamic IP LAN address is delivered by the DHCP server in the router. Any objections so far?

Not hearing any, we have our first problem when the static IP address is configured to be in the middle of the DHCP IP address pool. For example, some routers assign almost the entire Class C IP address block to DHCP, usually 192.168.1.2 through 192.168.1.254. That makes it rather difficult for users to assign static IP's to their computahs, servers, print servers, etc, and not have the router try to assign the same address to some other machine. The obvious fix is to assign a smaller chunk of the Class C IP address block (such as .100 to .199) to the DHCP address pool in the router and not use these for static IP's, but what happens if the administrator or owner does do this and leaves everything at the default settings? It's now the routers job to figure out which IP addresses are being used on the LAN. It can do this by pinging a prospective IP address, sniffing traffic, digging though recent DHCP assignments (for dealing with machines that randomly connect and disconnect), or looking at the ARP table for addresses in use. There's an RFC for each of these. None of them are deemed "required", which give router manufactures a great opportunity to do leave them out, with predictable results.

In theory, if one sets a static IP address for some (mobile) device on a network managed by a router, the router will be able to detect the presence of that device, it's MAC address, and what IP address it is using by one of the aforementioned methods. It will then not assign in use addresses via DHCP. However, I wouldn't count on it. Just keep the DHCP IP address pool, and the static assigned IP addresses separate and you won't have a duplicate IP address problem.

Incidentally, a fun DHCP problem is drive-by DHCP, where a wireless client, laptop, or smartphone literally drives past an open (no WPA encryption password required) wireless router, which then assigns it an IP address. Comcast "gateways" do that so they can do their xfinitywifi thing. The problem is that unless the router is set to expire such DHCP assignments rather quickly, the ARP table will rapidly fill up causing the router to do "unexpected" things. ARP table overflow is one reason that some coffee shop routers need to be rebooted quite often.

Of course, there's a security problem with sequentially assigning IP addresses via DHCP. Some evil hacker (like me) might be able to predict the assigned IP address of some device as it is turned on or wakes up. Then, the evil hacker can spoof that IP address on the network and impersonate the device. So, there's some RFC for randomizing the assignment of IP addresses by DHCP.

Finally, if you're not asleep from the boring lecture by now, we have what I'll designate as "pre-assigned, pre-configured, or reserved static DHCP". There are other names for it, but the mechanisms are identical. It's considered static because it doesn't change. If you don't like the term "static", you might be able to substitute something that means "does not change". It's pre-assigned or reserved, because the DHCP server is configured to look at the clients MAC address, and check a list of IP and MAC address pairs, that match the clients MAC address. If they match, then the DHCP server assigns it a specific IP address. This is really handy if you want all your machines and devices configured for just DHCP, without having to configure IP addresses for the machine, netmask, default gateway, DNS servers, static routes, etc. Another cool feature is that a machine can be moved from the network with the pre-assigned static IP address, plugged into another networks with a completely different router, and still work without reconfiguration.

Reply to
Jeff Liebermann

eventually he did, but not initially.

if he was interested in convenience, he wouldn't be asking about static ips. he'd be asking about dns so he doesn't need to remember any ips.

yep. it's very easy to do with almost any router (a few don't support reserved dhcp but not many).

it's not a problem only if he takes the time to configure it correctly and guarantee there are no conflicts as well as always remembering to change it when leaving the house and changing it back when returning.

that's a lot of ifs. otherwise, it's a problem.

it almost certainly *will* be a problem on another network, both for him as well as others using the network.

Reply to
nospam

nobody said the router did semantic parsing.

*humans* do the parsing and the term 'static dynamic' is contradictory.

the router doesn't know nor care what humans calls it. the router just moves the bits however it's configured.

true

not true.

true.

which is what i've been saying all along.

Reply to
nospam
[snip]

"Static is fixed, not changing.

Reply to
Mark Lloyd
[snip]

Strange use of the word "dynamic", for something that DOESN'T change. Possibly theres confusion between a DYNAMIC process and a STATIC value.

Reply to
Mark Lloyd

Could I suggest, by way of an example, that it is not a House that determines its address, it is the *location* of the house on a street that determines the house's address.

So a device is just a device, and doesn't really need an address until it is connected to something else ... printer to computer, computer to router, router to server, etc., etc.

Now, when we talk about Caravan or Winnebago, ..... that's something else!! ;-)

Daniel

Reply to
Daniel60

Not at all.

Reply to
Carlos E.R.

Notice that the way it is set currently it is static on his home only, dynamic elsewhere. There is no problem whatsoever, just a matter of choice.

Reply to
Carlos E.R.

Yes, he did say it. And it is a legitimate reason.

Reply to
Carlos E.R.

Not even then, because the configuration is not generic. It applies only to a single SSID. He connects to another AP, and it gets DHCP again.

Reply to
Carlos E.R.

He did, on the first post:

On any mobile device (iOS, Android, whatever), you can set up an FTP server (eg ES File Explorer on Android) with a static IP address so that Windows "My Network Places" has a permanent "shortcut" to the entire mobile device file system (eg ftp://192.158.1.15:3721).

This is very useful, and I've been using it for a couple of weeks ever since it was discussed here - because it effectively mounts the mobile device as a network drive on Windows without adding any new software on either Android or Windows.

Notice the mention to "since it was discussed here". It is a reference to another thread.

You are assuming he has a router with that capability. I have seen none.

Reply to
Carlos E.R.

Yes, indeed. I have not seen any home router doing that check. They may exist, though.

Reply to
Carlos E.R.

Yes it is.

Look it up on your phone.

Reply to
Carlos E.R.

Because you are always connected to the same AP, or because all have the same SSID.

You really must look at the DHCP configuration in the router. As you have several AP, you should reserve that 192.168.1.15 address in the router, to be assigned to your phone, by looking at its MAC.

Reply to
Carlos E.R.

Because he runs an FTP server on it, and accesses it from his home computer.

Reply to
Carlos E.R.

Bear in mind that for android devices, you can set the IP address settings on a per-SSID basis. Therefore, unless he connects to a network with the same SSID, but a different addressing scheme, the approach will cause him no grief.

It may not be the "best" approach, but it will work fine.

Reply to
Dan Purgert

[...]

I don't know why you'd need so many 'access points', but if the setup is sensible then you'll have all the access points as part of one network, with just one central router or computer taking care of the allocation of local IP numbers to individual devices. It sounds as though that's what you have. You can do this using common home-user Wifi modem/routers or WiFi routers in 'bridge mode', or by using 'range extenders'.

Re-booting a router or other computer shouldn't change the settings; you'd need to do a 'factory re-set' to achieve that (don't do one of those unless you really mean it!).

Reply to
Whiskers

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.