0

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.

Wern Ancheta
  • 125
  • 1
  • 7

2 Answers2

4

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.

blankabout
  • 1,004
  • 1
  • 9
  • 16
  • I'm using $_SERVER['REMOTE_ADDR'] to determine the address. – Wern Ancheta May 07 '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 08 '11 at 14:51
2

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.

slubman
  • 2,247
  • 16
  • 11