I know we have some extra advantages in using the cookies over IP address, but my question is Why can't the container just remember the IP address of the client in identifying the client when he visit his site again? Is it possible for the container to remember the client with the help of IP address?

Proxies show up as 1 IP address, regardless of how many people are behind them, for example everyone at a company.
–
Jeff-Inventor ChromeOSAug 14 '14 at 18:24

4

@Jeff-InventorChromeOS And vice versa, too: some ISPs have clusters of proxy servers such that a single user's requests can appear to come from multiple IP addresses. Last time I checked, AOL did this, for instance.
–
JulesAug 17 '14 at 20:46

Using an IP address at all to identify a client is a huge bug. My IP address probably changes several times a minutes while walking down the street accessing a site from my phone.
–
R..Aug 14 '14 at 22:25

3

@R.. I am sorry, but this is blatantly wrong. Your radio cell has nothing to do with your IP address, the IP layer is above cell communication (using the physical layer) in the OSI model. Still, using IP address to identifying clients is still wrong, but not for this reason.
–
dirkkAug 15 '14 at 8:57

9

@dirkk If he's on WiFi and connecting to different, independent, networks with their on public IPs, that can certainly happen. A mobile network could also decide to provide different IP addresses when you change cells. If I plug (layer1) my laptop into a different network, that could certainly change my IP (layer3).
–
BobAug 15 '14 at 10:37

7

I am no expert on how wireless telcos assign IP addresses, but I can speak to the wifi: if I were walking down a busy street and I had my wireless device configured to connect to any and all wifi network it could, I would fully expect its wifi IP address to change frequently.
–
SnowmanAug 15 '14 at 11:21

4

@dirkk: Please don't accuse me of being wrong about something you have no idea about. As Bob suspected, I was talking about wifi. I have access to 8+ cafes and other business access points, plus (lower-quality) city-provided wifi access points along the street, and my phone regularly jumps between them while walking.
–
R..Aug 15 '14 at 14:52

If you're on a LAN or are otherwise dealing exclusively with users that have IP's statically distributed to single clients, using that address is perfectly fine -- sometimes preferable and necessary.

But, usually you can't.

If you're running a public site, most of the IP addresses that hit your server aren't static or dedicated. Most of them represent multiple clients: Your desktop, laptop, and cellphone all go out over the same IP address when you're on your home network. And that IP can change -- even mid-session.

IP addresses aren't persistent. It could be reassigned when a DHCP lease expires.

The application should support roaming. For example, a user on a phone might drop out of WiFi range and get handed off to a 3G connection. The IP address would change, but it would be nice to let the web application keep working.

Using IP address as identifier is generally not recommended, as it is not what IP address is meant for - functionally it is a plain address for routing from a to b, and it tells nothing what is before a or after b.

In example, same IP address may be shared by a number of natted devices, most common cases being

a) a provider dynamically assigning a pool of addresses to its customers, that is quite common as buying the same quantity of public adresses you can serve more customers (you need just enough addresses for simultaneous users, not total users)

b) a private network accessing the web from a single address, internally redirecting packets to hundreds or thousands if machines