Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

When my cellphone accesses a website via the tower and its GPRS gateway, NAT ensures that the sites receive a public IP. Would all phones using a single tower have the same IP?

  • If yes, then how can the mass of received HTTP data routed to the correct cellphone? And how can websites differentiate between cellphone visitors? Is there additional HTTP header data?
  • If no, then how are these unique IPs assigned? Based on availability or location? Would each tower have a fixed set of IPs?
share|improve this question
If you happen to have an Android phone, you can check your local IP in settings -> status, it's most likely 10.x.y.z. Then visit whatsmyip.org to see your public IP. Then compare it with a friend's phone who has the same provider. –  ott-- Sep 27 '13 at 18:06
add comment

2 Answers

up vote 3 down vote accepted

To answer your first question mobile/cell-phone IP addresses are handed out using DHCP like any other client device. To answer your second questions, well yes, through NAT - that's what NAT does, it allows multiple 'inside' devices to get IP services through a NAT gateway - external IP services will not be able to identify individual internal devices like phones by IP but could via a session ID, cookie or similar.

share|improve this answer
I'm a little confused, would all phones using a tower have the same public IP address? yes/no? –  Jarvis Aug 29 '09 at 19:23
Provider dependent. There's no reason they have to though. –  Cian Aug 29 '09 at 19:26
I thought most cell phones use PPP, and so they don't actually use DHCP but instead get their IP from the remote end of the ppp connection... –  chris Aug 29 '09 at 23:17
You're right, at least for all the providers in ie. –  Cian Aug 29 '09 at 23:53
Correct, the traffic only turns into IP in a one or only a few centralised locations - it isn't IP traffic at the tower. –  Chopper3 Aug 31 '09 at 10:09
add comment

If yes, then how can the mass of received HTTP data routed to the correct cellphone? And how can websites differentiate between cellphone visitors?

That's what NAT does

To elaborate, NAT uses the same IP but different port numbers for each phone. A program using the internet must specify an IP address and a port number it is sending to. A website will see users coming from one IP but many port numbers (there are 65536 possible ports). When NAT gets a reply back from the server, it maps the port number back to the inside, fake IP address it gave each phone.

Servers have to use standardized port numbers like 80 for a web server, so clients know how to find them, but clients can use any port number. That is also how multiple programs on a computer all use the same IP. (Such as IE and Firefox running at the same time connected to the same website.)

Since servers need standardized port numbers, it is a problem for a computer on a NAT network to be a server.

On a Windows PC type netstat into a DOS window to see the port numbers your programs are using.

share|improve this answer
Welcome to Server Fault. Answers are intended to answer questions; please don't post questions in an answer. (And we've already answered that question anyway.) –  Michael Hampton Sep 27 '13 at 17:44
In addition to what Michael said, there's a number of points in this Answer that are less than fully accurate. You might be simplifying, but this is generally not a site where we shy away from technical details. –  Chris S Sep 27 '13 at 17:51
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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