Navigation


Topic: Networks

Goals

This topic explains how computers on the Internet exchange data. Key terms are LAN, router, WAN, IP, and DNS.

Notes

Ooo! Nerds love networks. They're logical, but complicated. You thought that figuring out the seating arrangements at your last family reunion was difficult. That's nothing compared to networks.

We'll talk about two types of networks:

  • Local area networks (LANs): networks of computing devices in a small area, like an office suite.
  • Wide area networks (WANs): networks of computing devices spread across a large geographical region.

Other terms are used, like campus networks, and metropolitan networks, but they are basically variants on LANs and WANs.

LANs

LANs connect computers and other devices, like printers, that are close to each other. For example, suppose that Dewey, Cheetum and Howe (DC&H) is a small real estate company. Its office might have a PC for each agent, two printers (one a black-and-white laser and the other a color inkjet), and one Internet connection. Here's their LAN's layout:

LAN

The router connects the computers together. There are other connection devices besides routers, the most common being switches and hubs. We won't talk about the differences between them; they all connect the computers together, and that's all we need to know.

The connections either use cables or are wireless. Cables are wires with connectors on the end:

It's like a telephone connector, only a little wider. One end plugs into a computer or printer, the other into the router.

Today, many computers use wireless connections. The router and each computer use low-power radio transceivers (transmitter and receiver) to replace the cable, like this:

Wireless LAN

Often you can't see the antenna on a PC, but it's still there, inside the computer. Some routers wave their antennas proudly, however.

The modem connects the router to the Internet. The Internet is accessed through an external network, usually the cable TV system or the telephone network. The electrical characteristics of the LAN are different from those of the external networks. The modem changes the signal from the LAN so it can be used on the external network, and vice versa. Here's a picture of a router connected to a PC and the external network:

Router cables

The printers in the LAN diagram above are connected to the LAN in two different ways. Printer 1 is connected directly to the network, so any computer can print directly to it. Printer 2 is connected to PC 4, which is connected to the network. The other PCs can print to it, but only if the user of PC 4 shares the printer over the network. "Shares" means that the person using PC 4 gives the other computers permission to access the printer. PC 4 also needs to be on before the other PCs can use the printer. Network-ready printers like printer 1 are more expensive than regular printers, but they're easier to share on a network. You just plug them into the router, and off you go.

When a PC wants to send data to, say, Printer 1, it sends the message to the router. The router looks at the message's destination, and sees that the message is for a device on the LAN, not the Internet. The router passes the message to the printer, without bothering the modem. On the other hand, if a PC wants to send a message to a computer on the Internet, the router sends the message to the modem, rather than keeping it on the LAN. So only messages that need to go to the Internet are sent to the modem.

What's the point of having a network? The LAN lets the real estate agents:

  • Share devices

    Every PC can access printer 1 and printer 2 (if PC 4 shares it). Without the network, every PC would need its own printer.

  • Share data

    The person using PC 1 can let others access part of his/her hard disk. It might have a spreadsheet for computing mortgage payments, a list of building inspectors, and so on.

  • Share connections

    The PCs share the connection to the Internet. That way, DC&H only needs to pay for one Internet connection for all the PCs, rather than one for each PC.

  • Access services

    Users can access email, Web, and other services over the network. More on services later.

WANs

Wide area networks (WANs) are distributed over a large geographical area. The best known WAN is the Internet, so we'll just talk about that. One difference between LANs and the Internet is that LANs send messages to a central point. The Internet can't work like that. It would be too wasteful. Imagine what would happen if there was a single super-router in Chicago, and all Internet traffic went through it.

Super-router

If a PC in London, England, wanted to send a message to another PC in London, the message would be sent to Chicago, and all the way back again. Man, that would be so uncool! It would be very expensive, and if the super-router crashed, the entire Internet would go down. Ack!

That's not how the Internet works. There is no central place that all messages go to. Instead, the Internet is a complex mess of separate connections:

Internet

Each node is a device that can take an incoming message and forward it to another node. Think of each node as a powerful router. The nodes are connected together in a variety of ways. For example, node K might be connected to node N with a telephone line, and to node J with a satellite link. When a message is sent, it bounces from node to node, until it gets to its destination.

Every computer on the Internet has a unique number, called its Internet protocol (IP) address. Routers often do some magic to share an IP address, but, conceptually, each computer has a unique address.

  • IP address: a unique number that identifies a specific device on the Internet.

For example, PC 1 might have an IP address of 111.111.111.111 (the exact format isn't important to us). PC 2 might be 222.222.222.222.

Suppose PC 1 wants to send the message "Can you hear me now?" to PC 2. It creates a message that would look something like this:

Source: 111.111.111.111

Destination: 222.222.222.222

Data: Can you hear me now?

The message contains the IP address of the computer sending the message, the IP address of the destination computer, and the content of the message, sometimes called the message's payload. There's more to it in reality, but this is enough for our purposes.

PC 1 would send the message to Node A. Node A would look at the destination, and send it to a node closer to PC 2, like node H. Node H would get the message, look at the destination, and maybe send it to node L. The message might then go to node I, node N, and then to PC 2. So the message's route is PC 1:A:H:L:I:N:PC 2.

There are many different routes the message could have taken. For example, it might have used the route PC 1:A:B:G:F:J:N:PC 2, or PC 1:A:C:D:E:K:N:PC 2. The nodes will choose the connections that have the most unused capacity. For example, suppose that when node A gets the message from PC 1, the A:H and A:B links are carrying lots of traffic already, because so many people are downloading Paris Hilton's latest music video, a pop interpretation of Handel's Messiah. The A:C link might have less traffic (maybe everyone connected to node C already has the video). Node A will therefore send the message to node C. If PC 1 sends another message to PC 2 five minutes after the first one, the message might take a different route, depending on the traffic patterns at that particular moment.

IP addresses are hard to remember. Which would you rather remember, whitehouse.gov, or 63.161.169.137? Can you imagine ads with IP addresses?

Too many numbers!For more on the retro punk marching fusion band Sousa's Flying Monkeys, go to 212.11.243.198. No, not 212.11.234.199 or 212.11.243.189. They're military sites, and you don't want Homeland Security thinking you're trying to hack them, do you? Remember, that's 212.11.243.198.

To solve this problem, the Internet uses the domain name service (DNS). A DNS server matches IP addresses and names:

Name IP
whitehouse.gov 63.161.169.137

When you connect to the whitehouse.gov Web site, your computer contacts a DNS server. The DNS server looks up the name, and returns the IP address. Your Web browser uses the IP address to do its work. When you register a domain name, like evildeathmonkeys.com (still available at the time of writing), what you're getting is the right to associate the name "evildeathmonkeys.com" with an IP address.

Notice that "DNS server" can refer to two things: the DNS program, and the computer running the program. You have to figure out from the context which one applies. The same is true for terms like "Web server" or "database server." They can mean either software or hardware.

There are different DNS server programs. The most common is BIND. Just as Microsoft Word is an example of a word processor, so BIND is an example of DNS server software. Just as there are word processors other than Word (e.g., OpenOffice Writer [free!]), there are DNS servers other than BIND. Examples are PowerDNS, NSD, and MyDNS.

Exercises

Here are some Windows shell commands that will help explore your connection to the Internet. To start a shell, run:

cmd

What is your computer's IP address?

ipconfig

What is your computer's Internet gateway?

ipconfig

What is the SBA Web server's IP address?

ping www.sba.oakland.edu

Find out what a MAC address is. Find out the MAC addresses of all the computers on your home LAN.