IP adress changes

Viewing 3 reply threads
  • Author
    Posts
  • September 15, 2019 at 4:06 PM #36769

    Jake Xon
    Participant

    Im using the local Apache CouchDB for sync. Works ok.
    But now and then my mac changes the ip adress so the sync stops working and I have to change IP on all clients. Is there any way to avoide this or is it something you have to liove with?

    Also, the TF syncbutton does not seam to activate sync

    September 15, 2019 at 4:30 PM #36770

    Sam Moffatt
    Participant

    The simplest solution is to figure out your networks DHCP range and then set your Mac to use a static IP address in System Preferences. This works if you have a Mac that is always at home like an iMac, Mac Mini or Mac Pro but won’t work with a laptop you take out into the world. It depends on your router configuration but there is generally some space that isn’t assigned to DHCP that you can use. You can typically figure it out if your router is something like 192.168.0.1 but all of your computers have IP addresses like 192.168.0.100 or higher. Ideally the router will tell you what range it uses and then you can go into System Preferences -> Network -> the network connection -> Advanced -> TCP/IP -> “Configure IPv4”: “Using DHCP with manual address” then you can set the IPv4 address manually to a static address that won’t change. If you have a static Mac deployment that is setup as a server and network configuration that doesn’t change then this will work fine.

    If that doesn’t work or isn’t an option for you, the other way would be to use Bonjour/mDNS to configure each of the clients. This will be a DNS name along the lines of “xyzmacname.local” or what ever you see in the “Sharing” network preference where it says “Computers on your local network can access your computer at:”. When you do this however, iOS will require that the connection is encrypted. iOS only allows unencrypted connections to IP addresses, so you need to go through the CouchDB guide to set up SSL. Once you do this then you can use the DNS name on all of your clients and when the IP address changes, they should work (might be a bit of a delay between picking up the change). Checkout the Tap Forms manual for the SSL instructions and also if you do a search on the forum you’ll find a bunch of other posts on SSL setup.

    If you have autosync enabled in the sync preferences for the document, the sync button likely won’t do much because you’re already sync’d. If you don’t have autosync enabled and everything is otherwise working, that will force a sync to happen. If there is a connectivity or an error then I think there are certain situations where it doesn’t work properly because the internal sync client has decided it can’t work (too many failures). If I suspect things aren’t working properly, I usually go into the sync preferences and click logout and login again because if something is wonky it resets all of the state from scratch.

    September 23, 2019 at 11:02 AM #36840

    Jake Xon
    Participant

    Thanks a lot for your really informative answer.

    September 23, 2019 at 3:12 PM #36844

    Daniel Leu
    Participant

    Many routers have an option where the DHCP server supports static IP addresses. Once configured, the router uses your MAC address to identify your computer and then will always assign the same IP address.

    Just check the DHCP settings of your router and look for the keyword ‘static’. That’s what I use and it works well.

Viewing 3 reply threads

You must be logged in to reply to this topic.