IP is developed by the IETF.
Your computer is an IP endpoint. Each IP endpoint has a
hierarchically-distributed identifier, called an IP Address. Example:
126.96.36.199. @@someone distributes IP addresses by contentinent. ARIN, the
American Registry for Internet Numbers gave all IP addresses starting with "12." to AT&T,
my ISP. AT&T then gave that one to me.
However, an IP address is not enough. I also need to know my subnet mask (example:
255.255.255.0) and the IP address of my router (also called a
188.8.131.52. This information will only work
with my cable modem; if I go someplace else which has a different Internet connection, I'll
need to replace all this information with new ones.
This information is necessary because the Internet is divided into subnets. From the IP address and the subnet mask, you can calculate most of the important information for your network, like your broadcast address (packets sent to this IP address are delivered to every computer in the subnet). You can also calculate which IP addresses are in the subnet and thus local, and don't need to be delivered by the router.
Adam Langley says subnet masks aren't actually used anymore (@@where? i still have to type them into my desktop...) and that we use CIDR (Classless Inter-Domain Routing) instead with its special (example:
184.108.40.206/8) of specifiying IP blocks. "The 8 means the first 8 bits of the IP are the network."
IPv6 and the Address Crunch
Actually, it's more complicated than that. Because there are only 4294967296 possible IPv4 addresses (they're 32 bits) and a lot more Internet users, IP addresses are scarce and expensive. AT&T only gives me one IP address, but I have more than one computer in my house. To get around this, I have a NAT box. The NAT box talks to the cable modem using the above information. But it also uses a specially-reserved series of IP addresses to talk to the rest of the computers in my house. When computers in my house want to talk to the outside world, the NAT box transparently creates a "tunnel" for them. However, computers in the outside world cannot talk to computers in my house (for the most part) because the NAT box has no way of knowing which computer they want to talk to.
To solve this problem, the IETF has developed IPv6, a new version of IP.
(We're currently using IPv4.) There are
340282366920938463463374607431768211456 IPv6 addresses (example:
FEDC:BA98:7654:3210:FEDC:BA98:7654:3210) so we are unlikely to run out of them
soon. However, it's very difficult and slow to transition every computer on the Internet to a
new protocol so it's unlikely to happen soon.
The IETF has developed a method to "tunnel" IPv6 packets over the current IPv4 Internet, called 6to4. Since it's easy for every computer in my house to get its own IPv6 address, this would allow my NAT box an easy way to decide which computer to send incoming packets to. This means that any IPv6-enabled computer which supports the tunnelling system can talk to computers inside my house.
Address Resolution Protocol (ARP)
IP endpoints usually communicate over Ethernet. If a computer on the subnet notices that the receiver of the packet is also on the subnet, it uses ARP to learn the mapping between the IP address and the Ethernet address.
Dynamic Host Configuration Protocol (DHCP)
Since it's a pain to remember all these IP addresses, subnet masks and router addresses, the IETF has developed DHCP. With DHCP, your computer broadcasts a request for configuration information. A DHCP server sends back all the information your computer needs to get on the network. DHCP is widely deployed, so if your computer is set to receive configuration information via DHCP you can often plug it into someone else's network and it will Just Work.
DHCP requires a server, which isn't usually available when you're not connected to the outside Internet. To overcome this, IP addresses starting with "169.254." are reserved. A computer withou an IP address randomly generates an IP in this subnet and then uses ARP to see if anyone else has already claimed it. If no one has it then uses this IP address. Since there's no router in this situation, all packets are broadcasted to the rest of the group.
So to talk to another machine on the Internet, packets go from my machine to my NAT box to my cable modem to the AT&T cable modem routers for my city to AT&T cable modem routers for my state to the general AT&T routers. Then packets generally go to a peering point. Previously these were places like Mae East or Mae West, where a bunch of major ISPs connect together and insanely high speeds and trade traffic between their networks. Now, most traffic goes through private peering points where the big guys make the smaller ISPs pay for the privilege of talking to them. Some providers (like Internap) peer at all their local locations and thus have less of an internal network. (So instead of going to AT&T's peering point in San Francisco, they'd offload the traffic at a peering point downtown.)
On a small scale, routers work sort of like switches, except for IP instead of Ethernet. They keeping track of the fastest routes to other IP blocks based on different connections. But I'm clueless of whether this is the same on the larger scale. There are protocols like BGP and IGRP to handle these things and share info between routers. There are lots of fragile propagation problems... are these protocols really used in practice? Ask tells me they are... Hm, got to investigate them more.
Ask: "Technically then the Autonomous System is used by the routing protocols to keep track of the network blocks. (IIRC then it goes like "220.127.116.11/20 is part of AS-1234; our best route to AS-1234 goes through AS-4567 or alternately through AS-6789")."
IP can move wherever you like, but they'll only be routed if they're large enough. Most providers throw away the smaller IP blocks, so in effect these become hierarchical and have to be routed by the people who own the block that contains you. @@Where can I find this stuff out? @@How do routing tables work? @@How about in IPv6?