Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.mobile.android > #62098

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

From Johann Beretta <beretta@nun-ya-bizness.com>
Newsgroups comp.mobile.android, alt.internet.wireless, alt.os.linux, alt.comp.os.windows-10
Subject Re: How does setting a static IP on a mobile device prevent linux router from assigning that IP address?
Date 2019-06-09 00:26 -0700
Organization None Of Your Business
Message-ID <qdicaj$aj0$1@dont-email.me> (permalink)
References <ocjk8u$njj$1@news.mixmin.net>

Cross-posted to 4 groups.

Show all headers | View raw


On 4/11/17 3:10 PM, Tomos Davies wrote:
> How does setting a static IP on a linux Android mobile device prevent the
> linux router from assigning that IP address to another device?
> 
<snip>

It doesn't and if you set a static IP on your device, without telling 
the router, you risk an IP address conflict and can end up with 
colliding packets, or packets addressed for one device that are 
sporadically routed to two different devices. IP address conflicts are 
miserable to work with.

Routers of any sophistication will allow you to set your DHCP range. 
Using this method you could set, for example, 10.0.0.100 to 10.0.0.200 
for the DHCP pool, and have 10.0.0.2 (assuming 10.0.0.1 is for the 
router itself) through 10.0.0.99 available for static assignments. 
However, you'll have to remember what addresses you have assigned. If 
you forget and assign the same address to two different devices, you'll 
have severe problems.

Another method (and much more "safe") is to simply mark certain IPs in 
your pool to only be assigned to particular MAC addresses. This is known 
as address reservation.  Your Android device will simply be given the 
same address, by the router, every single time it connects to the 
network.  For all intents and purposes, you'll have a static address, 
but you will have no risk of address collisions.

/ip dhcp-server lease
add address=10.10.10.237 always-broadcast=yes 
client-id=1:18:a6:f7:e7:41:ef \
     comment=Harper lease-time=1d mac-address=18:A6:F7:E7:41:EF server=\
     dhcp-server
add address=10.10.10.227 always-broadcast=yes client-id=1:c0:3f:e:c5:27:65 \
     comment="Hradecky" lease-time=1d mac-address=C0:3F:0E:C5:27:65 \
     server=dhcp-server

That particular block of text is how you'd reserve addresses on a 
MikroTik router (as an example only) for two separate devices

One of the great joys of RouterOS (Mikrotik's Router Operating System), 
for me, is the ability to COMMENT everything...  In that particular 
example, Harper is given a "static address" of 10.10.10.237. In reality, 
it's a dynamic lease, but it is ONLY and ALWAYS assigned to his router. 
The lease time is set to 1d (day) but can be just about any value you 
want. I have, however, seen problems with leases that exceed 14 days as 
some devices simply aren't able to deal with lease times that long.

I'm fairly certain the lease time is sent in some value of seconds and 
once you get to two weeks you're handing out leases of 1,209,600 seconds 
and some devices may not be able to work with that large of a number.



Back to comp.mobile.android | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Re: How does setting a static IP on a mobile device prevent linux router from assigning that IP address? Johann Beretta <beretta@nun-ya-bizness.com> - 2019-06-09 00:26 -0700
  Re: How does setting a static IP on a mobile device prevent linux router from assigning that IP address? "Carlos E.R." <robin_listas@es.invalid> - 2019-06-09 12:14 +0200
    Re: How does setting a static IP on a mobile device prevent linux router from assigning that IP address? Johann Beretta <beretta@nun-ya-bizness.com> - 2019-06-11 00:07 -0700
      Re: How does setting a static IP on a mobile device prevent linux router from assigning that IP address? "Carlos E.R." <robin_listas@es.invalid> - 2019-06-11 10:04 +0200
  Re: How does setting a static IP on a mobile device prevent linux router from assigning that IP address? Pascal Hambourg <pascal@plouf.fr.eu.org> - 2019-06-09 12:21 +0200
    Re: How does setting a static IP on a mobile device prevent linux router from assigning that IP address? nospam <nospam@nospam.invalid> - 2019-06-09 10:13 -0400

csiph-web