The Network of Networks: IP

Dan Feedback 1/17/16: Instead of duckduckgo's query, just use http://bot.whatismyipaddress.com/ which returns the IP address plain and simple.

Routers are networking devices that direct traffic between subnetworks on the internet. The word "router" is pronounced like "doubter."

The computer you're using is almost certainly part of a wired (Ethernet) or wireless (WiFi) local network connecting the computers in your house or your school. The networking hardware in your computer can only talk to other computers on the same local network. How it is that you can use the Internet to connect to any computer in the world?

One (or maybe more) of the computers on your network is a router: a special purpose computer that passes messages from one network to another. If you have a router at home, it probably connects your local network with a larger network belonging to your Internet Service Provider (ISP), generally your telephone company or your cable TV company. The job of a router is to pass messages from one network to another until it reaches the local network of the computer you're trying to reach. Your home router connects only two networks, your local net and your ISP's net. Your ISP has many routers, each of which connects several networks.

The Internet isn't a network of computers; it's a network of networks.

How do the routers know where to find the computer you want? Every computer on the Internet (including smart phones, routers, Internet-enabled appliances, etc.) has an address (or more than one, if it's a router), like a postal or email address, called its IP address. IP stands for Internet Protocol. (A protocol is a set of rules for communicating on the net; IP is the protocol that specifies how a router handles a request for another IP address.) You can find out your computer's IP address by asking a search engine:

https://duckduckgo.com/?q=my+ip+address

What's DuckDuckGo? It's a search engine, like Google or Bing, except that it doesn't track your searches to sell you to advertisers as the others do. You saw it in Unit 3 Lab 5.

What's with the "?q=" in the URL https://duckduckgo.com/?q=my+ip+address? The "?q=" tells the duckduckgo.com server to run the query "my+ip+address," which returns the client's (your) IP address. (The "q" is for "query" as we are querying the server for information.)

  1. Read Blown to Bits pages 301-306.
  2. What's an undecillion?
    One undecillion is 1036, a billion billion billion billion (a 1 with 36 zeros after it).
  3. Watch this video from code.org:

IP Address Hierarchy

Recall, a hierarchy is an ranking arrangement (like species taxonomy) with the broadest or most powerful rank at the top. It's often depicted as a pyramid.

Take turns speaking Like domain names, IP addresses are hierarchical.

For example, consider the IP address for york.cs.berkeley.edu, which is 128.32.156.218. In the picture below, the subnetwork for the 128.32 domain includes two subnet numbers: 189 and 156. Subnet 156 has two hosts: 218 and 226.

This york.cs.berkeley.edu hierarchy image is a simplified model.
If you redo the picture, don't try to divide the 128.32 into two levels of hierarchy. There is no 128.*.*.* domain; back at the beginning of time, the Berkekey EECS Department bought a 65,536-address chunk of addresses at 128.32.*.* directly from, I'm guessing, Jon Postel, who was the official czar of the Internet back then.--bh
IP addresses are hierarchical

IPv4

Each of the four numbers in a typical IP address today is an eight-bit byte with a value between 0 and 255:

IPv4

A 32-bit IPv4 (the "v" stands for "version") address is big enough to support 232 computers, which is about four billion (4 · 106). There are more than seven billion people on Earth, so there aren't enough IP addresses to go around.

Why 232? There are 32 bits, and each bit can be one of two possible values (0 or 1). So, there are two possibilities for the first bit, four (that's 22) possibilities for the first two bits, eight (that's 23) possibilities for the first three bits, 16 (that's 24) for the first four bits, and so on up to 232 possibilities for thirty-two bits.

IPv6

The long-term solution is to increase the length of an IP address. The new IP addresses are 128 bits wide, which is enough to support 2128 computers:

IPv6
2128 is about 1038. For contrast, there are about 1050 atoms in the Earth and an estimated 1029 stars in the observable universe. So even if the Internet is extended to include other planets or space aliens, we'll still have enough addresses with IPv6 (but not if every atom had its own IP address).
Different protocols can be used at the same time; both IPv4 and IPv6 are in use today. This is a great example of the importance of abstraction. Most traffic (even traffic across new routers capable of IPv6) still uses IPv4. This is because in order to make an IPv6 connection, all the routers along the way must recognize IPv6. Old routers are replaced all the time, and eventually every router on the Internet will use IPv6.

Your IP Address

  1. Look up your current IP address using a search engine (as described at the top of the page). Talk with Your PartnerIs your address in IPv4 or IPv6?
  2. Load your U4L1-HttpBlock project.
  3. Write a Snap! reporter my IP address in the Sensing palette that reports your IP address. You can't, unfortunately, do it by asking DuckDuckGo as you did earlier, because you'd have to use the proxied http:// block, and so you'd get back the address of the proxy site instead of your own. So instead, use alonzo.herokuapp.com/ip-address, which allows connections from the unproxied http:// block. You'll use this block in Lab 5, to write a program that checks the weather where you are, without having to ask you where you are; it can tell (pretty closely) from your IP address.
  4. "U4L4-IPaddress"Save your work as U4L4-IPaddress
Most likely, the router in your home or school uses a protocol that allows all the computers on a local network (for example, in one building) to share one IP address on the Internet. The router that creates the local network gives each computer a local address. For example, although the outside world may think someone's computer has IP address 108.26.181.226, that computer itself probably thinks its address is something like 192.168.1.11.
  1. Look up your current local IP address in your system preferences or settings. It's usually under network or internet settings and may be listed with the computer device supporting that connection (wifi, ethernet, wifi, bluetooth, etc.).
The 192.168 domain (the block of IP addresses that all start with 192.168) is reserved for local networks; no computer on the Internet has an address in that range. Another such domain is 10.0.
I've gleaned bits from this as marked. Otherwise it's not going to be included. -MF
OK, except see my comment about end-to-end below. --bh

It's on that page, but it's written generally. Can you take a look (it's in an orange box on TCP) and make whatever changes you think are necessary? --MF

Network people have their own vocabulary. On the AP exam you may see