April 17, 2000
By Karen Kenworthy
IN THIS ISSUE
Wow. Sorry to doze off like that. I guess I really needed that little nap. <sigh> Let's see ... where were we?
Oh yes, I remember! Last week my buddy Bob wrote, asking about funny Web addresses. You know, the ones like http://3353972754// that seem to be so popular in junk e-mail. How, he wondered, do these addresses work? Don't Web addresses have to contain the name of a computer? Something normal, like www.teddybear.com?
In search of an answer, we studied a delightful a specification known as RFC1738, entitled "Uniform Resource Locators (URL)" (hmmm, it was about then I started getting drowsy). This document reveals the secret formula for naming locations on the Internet.
As we discovered, each name contains two ingredients: a protocol, and a location. The protocol tells our computers how to retrieve information over the Internet, once the data has been found. The best-known protocol is HTTP, which stands for HyperText Transfer Protocol, used to send Web pages across the Internet.
The location portion of a URL usually begins with two forward slash characters ("//"), indicating the information being sought resides on a remote computer (My thanks to John Tune, and Markus Rupp for that last tidbit!). In most cases what comes next is a computer name, or "domain name", composed of three words and two dots (".").
The right-most word, often "com", "net", "edu", etc., identifies the type of organization that owns the computer (a commercial business, networking company, educational institution, etc.) The middle word is the name of the local network where the computer resides. The left-most word is the name given the computer where the desired information is stored -- often "www" in the case of Web servers. Put all together, the final URL might look like this: http://www.teddybear.com/
Take A Number
But as we know, computers love numbers. So it shouldn't be much of a surprise to learn the nice, human-friendly domain names we all know and love are a fiction. They exist just to keep you and I happy.
Computers know each other by a 32-bit binary number, known as an IP (Internet Protocol) Address. Every computer connected to the Internet must have at least one IP Address, and no two computers can have the same address. Yes, that means that, in the world of the Internet, an IP Address is a GUID or Globally Unique Identifier!
My personal Web server, for example, the computer I know as www.teddybear.com, is known to its fellow computers as "11000111111010011001000000001010." Now computers eat this stuff up. The more zeros and ones the better. But long binary numbers are a bit hard for you and I to swallow. That's why we rely on other ways to identify our electronic friends.
For a start, let's convert a binary IP address into a less daunting decimal number. You know -- the kind of number that can use all the digits from 0 to 9. In the case of my computer, the result is 3,353,972,746.
Does that number look familiar? It should. We saw that number a few moments ago, in an example of "funny" Web addresses: http://3353972746/. Now we now know, this URL is just http://www.teddybear.com, with the decimal version of the computer's IP Address replacing the computer's name!
Decimal numbers like 3353972746 are easier to remember, and type, than binary numbers like 11000111111010011001000000001010. But neither is exactly easy on the eyes. Most of us like our numbers short. When forced to deal with long numbers, people usually break them into smaller chunks.
Phone numbers are a good example. Instead of remembering them as an unbroken stream of 10 to 13 digits, we divide them into a country code, an area (or city) code, and a local prefix and suffix. The result is a collection of 3- to 4-digit numbers we find easy to remember.
The great minds behind the Internet could separate the decimal representation of an IP address into a few small groups of digits. The decimal IP address 3353972746, for example, might become something like 3.353.972.746. It could be done that way. But it isn't.
Don't forget the folks who designed the Internet were computer programmers. And programmers don't think the same way as everyone else. To a computer, and a programmer, an IP Address is a 32-bit -binary- number. Programmers separate those binary digits into four groups of eight. The result looks something like this: 11000111 11101001 10010000 00001010.
Next, they convert each group of eight binary digits into their decimal equivalent. This produces four decimal numbers (each from one to three digits long), such as 199, 233, 144 and 10. Finally, the decimal numbers are written, one after the other, with a dot (".") between each. When done, a 32-bit binary IP address ends up looking like this: 18.104.22.168.
As many of you know, this "four groups of decimal digits, separated by dots" version of a binary IP address is the familiar "dotted quad" representation. The numbers between the dots can be as small as zero, or as large as 255 (the largest possible 8-bit binary number). As a courtesy, most programs use the dotted quad form of address when speaking with human beings. In fact, it can even be used in a URL, such as http://22.214.171.124.
If you'd like to play this game yourself, you can. All you need is the Windows Calculator. Select Scientific mode from Calculator's View menu, and it will offer to automatically convert numbers between decimal, hex, octal and binary representations. As a bonus, the Calculator can also compute trig functions (such as Sin), logical functions (such as XOR), and perform an assortment of other mathematical tricks, such as Log, Ln, Factorial, etc.
If you'd like to learn more about URLs and IP addresses, try my newest program, Karen's URL Discombobulator. It will reveal the IP addresses of any computer on the Internet. Just enter a domain name, such as Microsoft.com, and the program does the rest. As a bonus, the Discombobulator can also show you several ways each URL might be represented. Besides the ways we've discussed today, it demonstrates how hexadecimal notation can shroud a URL even further.
To get your free Discombobulator visit https://www.karenware.com/powertools/ptlookup. Or http://%77%77%77%2E%6B%61%72%65%6E%77%61%72%65%2E%63%6F%6D/powertools/ptlookup.asp if you prefer. As always, the program's Visual Basic source code can be downloaded there too. And as you travel the Net this week, if you see me, don't forget to wave and say "Hi." I'll be looking for you!
Power Tools Newsletter
- Directory Printer v5.4.4 Adds Unicode Characters Support
- Replicator v3.7.6 Eradicates Bug that caused Error 3
31712 Verified Subscribers
Subscribe to receive new issues of the newsletter about Karen and her free Power Tools.Click here to Subscribe