Is it possible to assign different ip address to the devices which connect to my router? When I visit cmyip.com from my psp and laptop, I see that they're the same. I need this because I'm working on my personal project which has a login system that checks on the ip address of the device, I can't test it properly if the other device has the same external ip with my laptop.


A slightly longer answer is that the IP address you see is the one assigned to your router by your ISP and you will only ever get one of those. ISPs change these addresses so they cannot be relied upon to remain the same for an extended period - the period might be days or weeks, it depends on the ISP and connection type.

Inside your network all your devices will have their own IP addresses, so if your testing is internal you will be fine.

  • I'm using $_SERVER['REMOTE_ADDR'] to determine the address. – Wern Ancheta May 7 '11 at 12:40
  • @Wern, it's a really, really, really terrible, horrible, bad idea to think an IP address is unique to a single person/machine/device/anything. Stop now a read up on credential/session management. – Chris S May 8 '11 at 14:51

If your router is natting, the short answer is no.

A possible solution to have a different external address for one of the computer, would be to use a VPN.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.