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

This does not make sense. A static address for a device is set on the device, not on the router.

Reply to
Pascal Hambourg
Loading thread data ...

I didn't say it wasn't easy to change, just that it is sometimes the default router address. It can make things (a bit) difficult sometimes if you change the router's address because if/when you have to do a reset everything goes awry.

Reply to
Chris Green

it's a horrible idea because he'd have to change it every time he leaves the house and back again when he returns.

that's a shitload of effort for absolutely no reason, since what he claims to want can be done entirely automatically.

there's nothing to set. the router doesn't care.

he should set it to dhcp and leave it that way, particularly since he doesn't understand what he's doing and is likely going to make things worse.

if he wants a particular ip address while at home (which can be useful at times although very rarely for a phone), reserve that ip address at the router. that way, the phone will work everywhere without needing to constantly modify the network settings for every location. there won't be any conflicts either.

he hasn't said *why* he wants this, and quite likely, there's an even easier solution.

Reply to
nospam

If the router reserves and always assigns the same predefined IP address to the MAC address of the phone in DHCP mode (and never to any other device), it's always the same...works exactly like a static address when connected to that router. And it's all done in the router.

While you're in there, program the access point to restrict connections to only those MAC addresses you choose. That won't keep the hackers out, but will provide a little inhibition to your neighbors borrowing your internet connection.

You can surely construct a situation where the router has its DHCP server disabled, but that's a contrived/rare case. Anybody doing that won't have any trouble dealing with the issues that causes with phones.

Reply to
mike

It is fixed but still dynamically assigned, not static.

Reply to
Pascal Hambourg

I referred to it as address reservation. It's functionally equivalent to static IP when used with the home router.

Consider the nit picked, even though it detracts from understanding.

Reply to
mike

nospam wrote: [...]

He *has* said why he wants/needs this - a fixed ip address on his phone while at home -, but as usual you spout all kind of bollocks without even knowing what the problem is. And yes, his want/need *is* a legitimate one.

But to be fair, your machine gun approach *has* hit the target! Bummer for you that you don't know what the target was4s, nor which bullet hit it!

Reply to
Frank Slootweg

that's not a why.

he has not stated the problem he needs to solve and has demonstrated that he knows very little about networking.

his *guess* is that a static ip is the solution without realizing all the problems it will cause for both himself and others.

he never said what the problem is, so nobody, including you, has any idea.

no it isn't.

there is no valid reason why a *phone* needs a static ip address.

Reply to
nospam

To work properly, it needs to be set on both.

Reply to
Whiskers

As nospam pointed out, the router does not care that a device has a static address. What kind of precise setting do you think would be needed on the router ?

Reply to
Pascal Hambourg

I admit that my memory could be faulty, it being some months since setting up an Android device to access a WiFi access point it hadn't used before, but doesn't the setting up on the phone of a new access point give the user the choice between DHCP and static IP? Each internet connection has its own settings on the phone, each one only needs to be set up once (as long as you et it correct). DHCP is probably what you get if you don't try to change it. The settings on the phone for one network should not (I'd even go as far as MUST NOT) have any effect on the settings for any other network.

So there would be no need to change any settings each time he goes out or comes back home. The phone will automatically connect with any network it already knows about, if that's the way it has been set up.

[...]
Reply to
Whiskers

In , Kees Nuyt suggested:

Yes. My mistake. I had meant 168! Thank you for correcting that.

Here is the actual URL:

formatting link
The Windows "My Network Places" shortcut is to "ftp://192.168.1.15:3721".

Clicking on that "My Network Places" shortcut when the ES File Explorer FTP server is running on the Android device opens up the entire Android device's file system "as if it were mounted" on Windows.

The beauty is that this works for any Windows computer and for every user on the Windows computer since there is no software to install on the Windows computer.

I have multiple routers at home and multiple access points, so I was surprised at how well this single change in Android worked, even after numerous reboots of all the systems.

Reply to
Tomos Davies

In , Whiskers suggested:

Ooooops. Thank you. Yes, I had meant "168" and not "158" (which was an errant typo).

Reply to
Tomos Davies

In , nospam suggested:

On Android, the IP address on the phone is set "per access point"!

Look at the original post again where the Android settings were shown: Android: Settings > WiFi > {AP SSID} > Modify network config > IP settings > Static > IP address = 192.168.1.15

Notice that the "static" setting is set *per access point*. That means the "static" directive only applies for *that* access point.

There is a caveat which I'd like to ask the cognoscenti here to explain:

Interestingly, in practice, at home, since I have more than half a dozen access points, you'd think I need to make the static setting for each access point at home - but - in practice - so far anyway - the phone has remained on the same IP address - even after multiple boots of the computers, mobile devices, and router.

Why does it work so well (without me setting the phone's IP address to be static for *all* my access points)?

Reply to
Tomos Davies

In , nospam suggested:

On Android, the IP address on the phone is set "per access point"!

Look at the original post again where the Android settings were shown: Android: Settings > WiFi > {AP SSID} > Modify network config > IP settings > Static > IP address = 192.168.1.15

Notice that the "static" setting is set *per access point*. That means the "static" directive only applies for *that* access point.

There is a caveat which I'd like to ask the cognoscenti here to explain:

formatting link

Interestingly, in practice, at home, since I have more than half a dozen access points, you'd think I need to make the static setting for each access point at home - but - in practice - so far anyway - the phone has remained on the same IP address - even after multiple boots of the computers, mobile devices, and router.

Why does it work so well (without me setting the phone's IP address to be static for *all* my access points)?

Reply to
Tomos Davies

nope. a static ip is set on the device. there's nothing to set on the router.

if the router can route traffic from that ip, then it will work. otherwise it won't.

a static ip has no advantages for a mobile device. only disadvantages.

*if* the phone's ip needs to be the same (which is rare), the proper solution is a reserved dhcp address at the router (sometimes called static dhcp which may be the source of the confusion).
Reply to
nospam
[snip]

Reserved address is what I recommend. You set the router so DHCP always returns THAT IP to a device with THAT MAC. The device itself is set to use DHCP.

Reply to
Mark Lloyd

In , Whiskers suggested:

You are correct.

The setting on Android for DHCP (default) or Static is "per access point".

So, there's no need to change it when I leave the house.

In practice, it's even better than that, in that I have more than a half dozen access points at home on multiple routers, and, as if by magic, the IP address hasn't changed yet, despite multiple reboots of all the devices.

So far, weeks later, the entire device file system is always conveniently "mounted", seemingly automagically, on my Windows computer.

formatting link

I think this thread explained the "magic", some of which may have been by chance since I didn't choose 192.168.1.15 - it was already *assigned* by one of the routers - all I did was flip the Android settings for that access point from "DHCP" (the default) to "Static".

Reply to
Tomos Davies

An "address reservation" IS set on the router, and is almost the same thing as a static address. I find it preferable, since maintenance is centralized. The device itself is set to "dynamic", but the DHCP server in the router always provides the same IP to that device.

Reply to
Mark Lloyd
[snip]

There's usually no benefit to changing it, although I have when using 2 or more routers in series (where each needs to be using a different network). Also, you might if you need to replace a router on an existing network, and the new router uses a different 3rd octet (the 'y' in

192.168.y.x/24).
Reply to
Mark Lloyd

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.