I put up a World Wide Web site recently and, of course, used Windows NT to do it because you can't spell "Internet" without "NT." The first thing you need to know to get on the Internet is how to fill the Transmission Control Protocol/ Internet Protocol (TCP/IP) Configuration dialog. In other words, you need to be comfortable with IP addresses, subnet masks, and default gateways. They are the three essential ingredients to setting up IP on a system. IP is half of TCP/IP, and you have to install it on your NT systems before you can talk to the Internet. You can see the basic TCP/IP configuration screen in Screen 1.
My Web site's address is 188.8.131.52. It has a subnet mask of 255.255.255.0 and a default gateway of 184.108.40.206. What do those numbers mean? The Internet is really just a set of standards developed cooperatively by government and quasi-government agencies. IP may be the most important of those standards: It's the underlying communications protocol.
Every machine on a TCP/IP network has a unique IP address. You see two IP addresses in screen 1: 199.34.
57.35 and 199.34.
57.2. Again, the machines on my network with these addresses are the only machines on the planet that have those addresses. They didn't fall from the sky or ship with the machines; I assigned them, but I had to follow some rules.
IP addresses are 32-bit numbers. For example, my Web server's IP address is 11000111001000100011100101000100. How I came up with that number is something I'll get to in a minute. Like all binary numbers, it isn't particularly illuminating, and the early "Internauts" came up with a way to make 32-bit binary values a little more user-friendly. They could have chosen a hexadecimal representation, such as X'C7223944', or perhaps a decimal form, 3,340,908,868, but neither of those caught on. Instead, they came up with the dotted-quad format. Here's how this format works.
First, take the 32-bit address and regroup it as four eight-bit groups: 11000111, 00100010, 00111001, 01000100. Each eight-bit group is then easily converted to decimal--you can use the NT Calculator to do it. The conversion looks like this: 11000111 = 199, 00100010 = 34, 00111001 = 57, 01000100 = 68. Each of the eight-bit groups is called a quad. Cement them together with periods (dots) and you have the dotted-quad format 220.127.116.11. The address contains four sets of numbers with periods to separate the sets.
I know this IP address is unique because, to get on the Internet, I had to go through a group called the InterNIC that ensures that all IP addresses are unique. The group's main function is to hand out ranges of Internet addresses. Point your Web browser at http://www.internic.net, and you can find out more about the group. InterNIC representatives gave me a range of addresses called a C class network. I can use the addresses from 18.104.22.168 through 22.214.171.124--sort of. Actually, I can't use the .0, .1, .2, or .255 addresses the way I have my network set up.
Basically, the InterNIC people told me: "We assign you the 199.34.57 quads and you'd better stay within that group, but you can play with the last quad all you like." Then, it was up to me to assign a unique last quad to each of my PCs. For example, the Primary Domain Controller on one of my domains is 126.96.36.199: I assigned the .50 part. If I ever accidentally assign .50 to any of my other computers, I'd create a network problem. So, being a network administrator in a TCP/IP network includes making sure there are no duplicate addresses. Fortunately, NT includes a facility called the Dynamic Host Configuration Protocol (DHCP) that will assign addresses automatically for most machines. John Enck discussed DHCP in the October, 1995, issue of Windows NT Magazine so I won't cover it in this column. But you can't use DHCP on all your machines; you must manually set up the IP addresses for your servers.
Hearing vs. Listening
Now, let's look at the subnet mask. Before I put my company's network on the Internet, it was a simple 50-station Ethernet network. Ethernet works in a manner similar to a big party line: When one PC talks, all the rest can "hear" it, but only the PC addressed actually "listens." In other words, if an Ethernet network has workstations named A, B, C, and D, and A sends a message to C, then B and D "hear" it, but they ignore it.
Although that might not seem like much of a revelation, consider this: On this network, there is no "routing;" all messages go to all stations. Here's the insight: Such a system couldn't work on the Internet. Suppose your company and mine were both on the Internet and one of my PCs sent a message to another one of my PCs. You wouldn't want that traffic to clog your network, nor would you want it to clog the entire Internet. So, some kind of traffic-control system is needed, based on routers, which forward IP packets from one network to another.
Suppose I have a simple Ethernet network that consists of two PCs named A and B and a router to the Internet named C. Although both A and B have one network connection, C has two: One is a connection to the Ethernet network that C shares with A and B, and the other is a wide-area connection similar to a modem, an Integrated Services Digital Network (ISDN) adapter, or a Frame Relay connection to the Internet.
When A communicates with B, it just drops its message on the Ethernet network. A, B, and C can all "hear" the message, but only B pays attention. No routing is necessary. But if A communicates, for example, with Microsoft's File Transfer Protocol (FTP) site, 198.
105.232.1, then it wouldn't and couldn't communicate directly to 188.8.131.52. Messages to the outside world must be routed. Therefore, A would send its message to C and request that C send its message to 184.108.40.206.
Shout or Route?
Now, suppose that A, B, and C are machines on my network with addresses 220.127.116.11, 18.104.22.168, and 22.214.171.124, respectively. Whether A wants to "talk" to B, C, or Microsoft, it must always ask itself: "How can I get the message to the desired destination. Can I just shout it over the local Ethernet, or must I send it to C so that C can route it elsewhere?" IP software doesn't have to be very smart, except in one thing: The sending machine's software must always ask itself, "Should I shout, or should I route?" The subnet mask answers that question. In "Internet-speak," all machines that can communicate on the Internet without having to go over a router--all machines within "shouting" distance of one another--are said to be on the same subnet.
When A communicates with B, it examines its own IP address (126.96.36.199) and compares it to B's (188.8.131.52). If the two are close enough, then A knows it can shout. The first three quads of A and B are identical--is that "close enough?"
Look at the subnet mask. Simplified, a subnet mask is a collection of zeros and 255s. Like an IP address, a subnet mask has four quads. If 255 appears in a particular quad in a subnet mask, then the source (A) and the destination (B) IP addresses must match in that quad for the two to be considered "close enough." A zero in a quad means the subnet mask doesn't "care" if this quad matches. If A uses the subnet mask in screen 1, which was 255.255.255.0, then it need only match its address to B's on the first three quads. If they are the same, A will shout. (255.255.255.0 is one common subnet mask, but there are other ways to subnet your network. That's a topic for another column.)
Now, let's look at sending IP packets outside your local network. If you compare A's address, 184.108.40.206, and Microsoft's address, 220.127.116.11, you can see that the first three quads do not match. A can't shout. Instead, it must route by giving the IP packet to C. A doesn't monitor how C gets packets to the outside world; all that matters is that C can indeed get them out. Of course, to route the message to C, A must know its local router's IP address. (For historical reasons, it's not called a local router; it's called a default gateway.)
The Big Three
The big three things any machine running IP must know are its IP address, its subnet mask, and its default gateway. The IP address asks, "Who am I?" The subnet mask asks, "Who is nearby?" And the default gateway tells where to send packets that aren't nearby.
There are other pieces to understanding IP addressing, including routing and routers, subnetting a network further, and setting up a name server. I'll take those things up in months to come.
|InterNIC * 703-742-4777|