Author Topic: IP Address  (Read 402 times)

Offline MachFly

  • Platinum Member
  • ******
  • Posts: 6296
IP Address
« on: March 14, 2011, 09:17:27 PM »
I'm trying to figure out how the IP address works when you use public networks. Say I'm using a personal computer but I connect to a public network at an airport, does my computer have a specific IP address or does everyone who uses that network share the same IP address?

Thanks
"Now, if I had to make the choice of one fighter aircraft above all the others...it would be, without any doubt, the world's greatest propeller driven flying machine - the magnificent and immortal Spitfire."
Lt. Col. William R. Dunn
flew Spitfires, Hurricanes, P-51s, P-47s, and F-4s

Offline gyrene81

  • Plutonium Member
  • *******
  • Posts: 11629
Re: IP Address
« Reply #1 on: March 14, 2011, 09:40:01 PM »
you would get a randomly assigned temporary i.p. address from whatever range of private i.p.'s the place was using...pretty much like what happens at home with your home network behind a router.
jarhed  
Build a man a fire and he'll be warm for a day...
Set a man on fire and he'll be warm for the rest of his life. - Terry Pratchett

Offline Tigger29

  • Gold Member
  • *****
  • Posts: 2568
Re: IP Address
« Reply #2 on: March 15, 2011, 01:49:31 AM »
NETWORKING 101!

There are two types of IP addresses... public and private.  (Ok more than two but lets keep it simple here).  Public IP's can be seen by other computers on the internet.  Private ones cannot.  Unless you are connected directly to the internet through dial up, or directly through the modem (without a router) then your computer is assigned a private IP address (Usually starts with 192.168.whatever).  If you have a router then your ISP gives it a public IP address.  The router then, in turn, gives all of the computers you have hooked up to it a private IP address.  Two computers CAN NOT share the same IP address on the same network.  This will cause them to conflict.  It would be like two homes getting the same phone number.  Both would ring but neither would know if they needed to answer or not.  (OK old fogies... lets leave party lines out of this! haha)

Here's how it works:

When your computer is first hooked up to a network, it shouts out to everyone, "HI MY NAME IS BOB AND I NEED AN IP ADDRESS!"  Then it listens for an answer... someone else shouts out "HI MY NAME IS GEORGE AND I AM YOUR DHCP SERVER AND I'M GIVING YOU AN IP ADDRESS HERE IT IS 192.168.32.190."  Your computer then sets its IP address to that and all is well.  I should add that DHCP stands for "Dynamic Host Configuration Protocol" and does more than just assigns IP addresses, but we'll keep it simple here.  The DHCP server also keeps track of IP address "leases" so no two computers get assigned the same IP address.  If your computer never hears back from a DHCP server, then it just assigns itself a random IP address generated by Windows (these usually start with 169.254.whatever).

Most private networks use a router for this purpose.  The router has a DHCP server built into it.  If you connect directly to the internet without a router, then most likely you'll configure your computer manually (called a "Static IP"), -OR- your ISP's DHCP server will assign your computer an IP address depending on what kind of internet service you have.

Speaking of the ISP's DHCP server, I should also note that your Router will have *TWO* IP addresses.  One assigned by the ISP (which is its public IP) and one that it uses for the computers on the private side of things to see.  Routers also serve as a gateway (connecting one network to another - in this case a private home network to the public internet), and also as a DNS relay (DNS is Domain Name Service and is basically a directory of website addresses and their IP addresses.  "bbs.hitechcreations.com" is actually "12.193.161.233".  Kind of like a large virtual whitepages).

When you move your computer into another network, then it will shout out to the new network and be assigned a new IP address by that network's DHCP Server.. or router.. or however they have it set up.

I should also note this.  One network cannot 'talk' to another network without a gateway.  Now by network I'm talking virtually here, not physically.  It's very possible for two computers to physically be right next to each other but be on different networks.  Part of the IP address identifies the network the computer is on, and part of it identifies the specific computer of that network.  If you look around in your networking settings, you'll see something called a "Subnet Mask".  This number tells your computer which part of the IP Address identifies the network and which part identifies the client (computer).  Yes it gets more complicated, but a "Subnet Mask" setting of 255.255.255.0 means the first three sets of numbers identify the network, and the last set identifies the client.

Did you notice that there are four sets of numbers in your IP Address?  Did you also notice that each set of numbers is between 000 and 255?  This means that with the above Subnet Mask setting and that up to 256 computers can be connected to the same network at once (ok it's really 254 including the gateway because 000 and 255 aren't used for specific clients).  Using the example IP address of 192.168.1.54 and a "Subnet Mask" setting of 255.255.255.0 we can determine that computer is on the 192.168.1 network, and that it is number 54.  Now, with those same settings if you tried to communicate with another computer with an IP address of 192.168.2.227 then you could not do it because you two are on separate networks, even if they were connected together physically.  You'd need to either install a Gateway between the two computers, or you'd need to change the IP address of one to be on the same network, *OR* you'd have to change the Subnet Mask of both computers.

If you were to assign a Subnet Mask of 255.255.0.0 (instead of 255.255.255.0) then this would mean that only the first two sets of numbers identifies the network, and in doing so then both computers while keeping their same IP address would now be on the same network.  Ever wonder why most private IP addresses start with 192.168?  This is because those numbers are assigned for private use, and you will never see a computer with an IP starting with that on the public side.  They did this on purpose to reduce confusion.  There are other addresses reserved for this kind of use also like 10.anything.anything.anything, and also anything between 172.16.0.0 and 172.31.255.255.

Offline MachFly

  • Platinum Member
  • ******
  • Posts: 6296
Re: IP Address
« Reply #3 on: March 16, 2011, 03:08:15 PM »
got it, thanks
"Now, if I had to make the choice of one fighter aircraft above all the others...it would be, without any doubt, the world's greatest propeller driven flying machine - the magnificent and immortal Spitfire."
Lt. Col. William R. Dunn
flew Spitfires, Hurricanes, P-51s, P-47s, and F-4s