0

I have been trying to understand and achieve assigning a static IP address to my machine, while being connected to a router (WiFi) and using DHCP.

My scenario is thus simple, but I think I missing something in understanding:

  • I am using a Mac OS 10.9 machine
  • I am connected to a wireless network
  • I have a Cisco router, which is connected to my LAN (via network cable)
  • my router has a setting DHCP Server enabled configured
  • I thought I could "have" a static IP by configuring:
    • my router: in my DHCP reservation table in my router settings
    • my OS network settings: I have configured my OS network settings to be ip v4 "configured with dhcp and using manual address" and provided a static address in my settings (say 192.168.1.123)
  • I would like to have the same IP over the internet, when I open my machine, connect to my wifi and check http://whatismyipaddress.com/.

I understand there is a difference of course between having a static IP address in my (local) network and having it in the entire web. And I have read that this can really only be achieved by my ISP really. Please let me know if this is the case.

Sorry if this is already answered, but I could not find the question. I would just like to know if my understanding is correct.

UPDATE: I have tried to rephrase my question and make it more clear. Sorry for not being formally correct in all terms. I just want to know if I can have a static ("final"/constant) IP address, so that wherever I am and whenever I turn my machine on, I have the same IP address, regardless if I am behind my home router or connected to some airport WiFi.

5
  • I understand this may be a simple question and already answered: if so, please point me to an explicit link :). Otherwise, why the downvote?
    – acostache
    May 15, 2014 at 19:24
  • The bit about your DHCP reservation and your static IP within the OS network settings is a little confusing. Perhaps you could elaborate on exactly what you mean; for example, do you have two adapters (wireless and wired) that are connected to the network two different ways, etc. May 15, 2014 at 19:38
  • Tried to rephrase, hope it is more clear
    – acostache
    May 15, 2014 at 19:45
  • @BradBouchard: It's simply an option in the OSX GUI that let's request a specific IP from the DHCP server, a perfectly valid option. Not a static IP at all. Most GUIs simply don't expose that and most clients don't need it May 15, 2014 at 19:57
  • What are you trying to accomplish beyond the setting of the IP address? Your machine's IP address cannot stay the same regardless of what network it is on because not all networks are the same. If you set your IP to 192.168.1.15 you will be able to work on many networks that are setup as 192.168.1.0/24, but not on any other network, such as 192.168.2.0/24. If you mean you want your house to have a static IP, you need that from your ISP. But if you're trying to setup remote access to your home, use DDNS on your router. May 15, 2014 at 20:08

5 Answers 5

4

You are actually asking for 2 different things:

assigning a static IP to my machine

This can be done multiple ways. Depending on you network you can either:

  • have a simple static IP and be done
  • configure a DHCP reservation in your Cisco router
  • configure your client to send the information that you have a specific IP to the DHCP server (least preferrable IMHO)

would like to have the same IP over the internet, when I connect to my wifi and check http://whatismyipaddress.com/.

This is something completely different. Depending on "where you are" that is already the case.

I'm not quite clear what you want I can think of a few options:

  • you want your ISP to give you a statically assigne address (one that does not change when you reboot the cable modem/router whatever you received from your ISP)

Solution: Upgrade your package and pay the provider for that option. I don't know a single provider that doesn't offer something like this.

  • set up a VPN so that you can dial home and appear to be coming from there

Solution: I'd suggest you start with OpenVPN there is a good amount of documentation out there that will show you how. You can then go on and configure IPSec. This is just a matter of taste and personal preference in which order you will do that, both have pros and cons (but actually there is only one good VPN out there; it's like with editors -- vim vs. emacs -- and everyone for him or herself know which is better)

  • "forward" the IP from you router to your computer

This is where it gets really tricky. It depends on the options of your router and usually is called DMZ host. Unfortunately you will have to try that out for different router/cable modem models as they may indeed refer to a DMZ host or refere to actually handing out the IP to computer.

Answer to the updated question

I just want to know if I can have a static ("final"/constant) IP, so that wherever I am and whenever I turn my machine on, I have the same IP, regardless if I am behind my home router or connected to some airport wifi.

This is possible. For all practical purposes you'll want to run a VPN. There are a few RFCs that describe other technical solutions but I don't know of any actual usable implementation.

You will have the following:

  • an IP changing with the location (or DHCP assignment)
  • another IP that you will get from your VPN

You will need the following:

  • some budget to actually get a public IP that is assigned to you
  • time to configure your VPN (I won't recommend a certain solution again as your question is stated very broadly and still has too many open points for me to give you a clear answer)
2
1

I'm a tad confused by your question however reading and trying to understand has led me to think:

You have an internal DHCP e.g. 192.168.1.1-192.168.1.100 and you have reserved 192.168.1.60 for you Mac for example. You external IP is set via your ISP and if you can have an IP range externally although it's not common. Normally even with a range you only use one as your router will assign itself an IP the others can be used to route traffic but that's another story.

Using the above senario can you elaborate a little on your question unless the above has answered it :-)

5
  • I am a bit confused myself, probably that is why my question is not very clear, sorry. I do not understand exactly: my ip is set for my router by my ISP, and my router sets my machine's address, correct?
    – acostache
    May 15, 2014 at 19:39
  • 2
    Yes external is ISP from the point you plug the internet connection to the router it's setup or assign via ISP you only have control internally. Either set by DHCP (given address) or manually typed (static address) your Wifi can be static and your Ethernet cable can be assigned (dhcp) but both will go out via the same ISP external IP address. Help at all?
    – CharlesH
    May 15, 2014 at 19:53
  • Ok, thank you! yes, more clear: ISP is the external control, I only have autonomy, not independence. I rephrased my question a bit.
    – acostache
    May 15, 2014 at 19:55
  • Hey Acostache, did you managed to actually achieve what you wanted from this question? Sorry I shy away at the weekend but happy to assist further if you require?
    – CharlesH
    May 20, 2014 at 13:36
  • Hi, thank you for the assistance. I got a better understanding of this, yes, and a roadmap of what to do. Thanks again!
    – acostache
    May 21, 2014 at 20:01
0

Your question has really less detail to answer to the question. But what i can understand is you want to get a static IP on your MAC through even you have dhcp configured on your router. You can achieve is through MAC address binding on your router if your router support it. In Mac Address binding you can bind the mac address of your MAC system with the internal IP e.g . 192.168.. you want everytime you switch on your System.

-Sim

0

So after you have rephrased your question, this is what you really want to accomplish (I guess).

Inside your own home network, you assign your Mac Computer to get a static IP address.
Lets say you use a DHCP reservation linking the MAC address of your MAC Computer to the IP 10.1.1.10.
To be certain, you use the Network Adapters settings to use the IP 10.1.1.10, which isn't necessary, as you get it automaticly via the reservation.

Now you want to be able to leave your home, with your Mac and connect with, lets say, the WiFi of your local Starbucks.
For some reason, you still want to be able to use the internal IP address 10.1.1.10.

This will not be possible.
The network you're connecting to will at least have to use the same IP subnet.
Also, you'll probably have set the DHCP-server and/or DNS-server of your home network in your Network Adapter Settings, which won't work on the Starbucks network. Unless they happen to use the same IPs.

If the Starbucks WiFi were to give out IP addresses in the 192.168.1.X subnet, your setup will not be able to connect to it.
You won't have any network connection and you won't be able to surf or connect to any resources on that network.

0

Another way I could interpret your question is like this.

Lets say that the external IP address of your home network is 1.2.3.4.
The external IP address of your local Starbucks however is 6.7.8.9.

You want to be able to surf via the Wifi of your local Starbucks and still have the external IP of 1.2.3.4.

With any normal setup, this is not possible.
External IP-addresses are arranged via the ISP.

You can however achieve this by using a VPN.
The VPN has the external IP address of 7.5.3.1 (for example).
For the outside world, no matter what your home's external IP is, or the one of your local Starbucks, you'll always have the IP of 7.5.3.1.
The added bonus of using a VPN, is that your traffic is encrypted and anonymous (unless you use a free/cheap transparant VPN).
However, a lot of public Access Points do not allow you to use a VPN. Be aware of that.

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