0

I use Android app mac remote to control my mac. It is achieved by ssh into my mac. Usually the step is :

  1. shared mac's network.
  2. connect android in the shared network.
  3. enable ssh in mac. I can see a lan ip in the setting.
  4. type the mac's lan ip into the android app and I can control my mac.

The problem is the mac's lan ip changes all the time. So my question is how to make mac's ip static in its own shared network?

2

2 Answers 2

1

Hard to say without knowing your setup.

Typically your mac will have an IP address like 192.168.x.x. This address gets assigned to you by your router using a protocol called DHCP.

Most routers these days have an option called DHCP reservations. This will make sure that the router assigns the same IP address to your computer every time. How do to this? Well, it really depends on your router. Typically they have a web interface that you log into that will let you set these options. My advice is to take a look at the manual.

You COULD go into network preferences and set it statically to the IP address you have now, but I don't like that method because the router is no longer in control, and even though it's very unlikely, it could end up assigning the IP address you statically assign to another computer on the network - that'll cause headaches.

1
  • My mac is connected to the net with Ethernet. In the lan of mac's shared network, I think the mac is the router in the mean time. You may misunderstand that my mac is connected to another router. @Arthur
    – Sisyphus
    Dec 2, 2014 at 3:42
0

Edit: The following will only apply if you are always on the same network. It won't work in Starbucks; but neither will any other solution.

Simplest would be to set it to use DHCP with a manual address, from the Network System Pref pane.

To prevent any conflict, set it to the address is currently has assigned to it, which shows in the top part of the panel. [Hit Apply to save.]

enter image description here

That way it will behave just the same way as full DHCP, but will just make sure it hangs onto its address. Even though there is potential for another machine on the same network to possibly be given that address by the DHCP server, it actually rarely happens, as the existing reservation usually lasts long enough to prevent it, & routers 'prefer' to assign the same address to the same device anyway.

You could poke in the router to find how to set up a static mapping for the Mac, but the chances are you won't ever actually have to.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .