XPost: comp.mobile.android, alt.os.linux, alt.comp.os.windows-10   
   From: beretta@nun-ya-bizness.com   
      
   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?   
   >   
      
      
   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.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|