Skip to content

Latest commit

 

History

History
371 lines (301 loc) · 17.9 KB

01-packets.mkd

File metadata and controls

371 lines (301 loc) · 17.9 KB

% Introduction to Networking % Charles Severance %

Introduction

Using the Internet seems pretty easy. We go to a web address and up comes a page. Or we go to our favorite social site and see pictures of our friends, families, and pets. But it takes a lot of complex software and hardware to make the Internet seem so simple. The design of the technologies that make today's Internet work started in the 1960s, and there were over 20 years of research into how to build internetworking technologies before the first "Internet" was built in the late 1980s by academics in a project called NSFNet. Since then, the research and development into improving network technologies has continued as networks have become far larger and faster and globally distributed with billions of computers.

In order to better understand how today's Internet works, we will take a look at how humans and computers have communicated using technology over the years.

Communicating at a Distance

Imagine a group of five people in a room sitting in a circle. As long as they are courteous and don't have more than one conversation at the same time, it's quite natural for any person to talk to any other person in the room. They just need to be able to hear each other and coordinate how to use the shared space in the room.

But what if we put these people in different rooms so they can no longer see or hear each other? How could pairs of people communicate with each other then? One way might be to run a wire between each pair of people with a microphone on one end and a speaker on the other end. Now everyone could still hear all the conversations. They would still need to be courteous to make sure that there was only one conversation going on at the same time.

Each person would need four speakers (one for each of the other people) and enough pieces of wire to connect all the microphones and speakers. This is a problem with five people and it gets far worse when there are hundreds or thousands of people.

Using wires, microphones, and speakers is how early telephone systems from the 1900s allowed people to make phone calls. Because they could not have separate wires between every pair of telephones, these systems did not allow all pairs of people to be connected at the same time. Each person had a single connection to a human "operator". The operator would connect two wires together to allow a pair of people to talk, and then disconnect them when the conversation was finished.

Connecting Using Telephone Operators

The first local telephone systems worked well when a customer's home or business was close to the operator's building and a wire could be strung directly from the operator's building to the person's home.

But what if thousands people who are hundreds of kilometers apart need to be able to communicate? We can't run 100-kilometer wires from each home to a single central office. What the telephone companies did instead was to have many central offices and run a few wires between the central offices, then share connections between central offices. For long distances, a connection might run through a number of central offices. Before the advent of fiber optic, long-distance telephone calls were carried between cities on poles with lots of separate wires. The number of wires on the poles represented the number of possible simultaneous long-distance phone calls that could use those wires.

Long-Distance Telephone Poles

Since the cost of the wires went up as the length of the wire increased, these longer connections between offices were quite expensive to install and maintain, and they were scarce. So in the early days of telephones, local calls were generally quite inexpensive. But long-distance calls were more expensive and they were charged by the minute. This made sense because each minute you talked on a long-distance call, your use of the long-distance wires meant no one else could use them. The telephone companies wanted you to keep your calls short so their long-distance lines would be available for other customers.

When telephone companies started using fiber optic, more advanced techniques were used to carry many simultaneous long-distance conversations on a single fiber. When you look at an old photo and see lots of wires on a single pole, it generally means they were telephone wires and not used to carry electricity.

Computers Communicate Differently

When humans talk on the phone, they make a call, talk for a while, and then hang up. Statistically, most of the time, humans are not talking on the phone. At least they weren't before everyone had smartphones. But computers, including the applications on your smartphone, communicate differently than humans do. Sometimes computers send short messages to check if another computer is available. Computers sometimes send medium-sized information like a single picture or a long email message. And sometimes computers send a lot of information like a whole movie or a piece of software to install that might take minutes or even hours to download. So messages between computers can be short, medium, or long.

In the earliest days of connecting computers to one another, pairs of computers were connected with wires. The simplest way to send data from one computer to another was to line up the outgoing messages in a queue and send the messages one after another as fast as the computers and the wires could carry the data. Each message would wait for its turn until the messages ahead of it were sent, and then it would get its chance to be sent across the connection.

\index{leased line} When the computers were in the same building, the building owner could run wires to connect them. If the computers were in the same town, the owners of the computers generally had to lease wires from the telephone companies to connect their computers. They often would have the phone company connect the wires together in their central office so that it was not necessary for one computer to "dial" the other computer to send data. These leased lines were convenient for computer communications because they were "always on", but they were also quite expensive because they were used 24 hours a day.

When the computers were even farther away, in different cities, the leased lines were extended using the longer wires connecting the central offices. Since there were so few wires between central offices, these long-distance leased lines were quite expensive and their cost increased dramatically as the length of the leased line increased. But if you had enough money, you could lease direct connections between your computers so they could exchange data. This worked pretty well as long as you were only using one brand of computers, because each computer company had their own way of using telephone wires to connect their computers together and send data.

Early Wide Area Store-and-Forward Networks

\index{Early Networks} \index{Store and Forward Networks} In the 1970s and 1980s, people working at universities around the world wanted to send each other data and messages using these computer-to-computer connections. Since the cost for each connection was so high and increased with distance, computers generally only had connections to other nearby computers. But if the computer that you were connected to was connected to another computer and that computer in turn was connected to another computer, and so on, you could send a message a long distance as long as each of the computers along the route of the message agreed to store and forward your message.

Store-and-Forward Networks

Over time, with relatively few connections you could send data long distances across a patchwork of network connections as long as you were patient. Along the way, after your message reached one computer, it would have to wait until its turn came to be sent to the next computer along the route. A message would arrive at an intermediate computer, be stored for a while (perhaps hours, depending on traffic), and then be forwarded one more connection (or "hop").

Sending entire messages one at a time this way, a message might take minutes, hours, or even days to arrive at its ultimate destination, depending on the traffic at each of the hops. But even if it took a few hours for an email message to find its way from one part of the country to another, this was still much quicker and easier than sending a letter or postcard.

Packets and Routers

\index{packet} The most important innovation that allowed messages to move more quickly across a multi-hop network was to break each message into small fragments and send each fragment individually. In networking terms, these pieces of messages are called "packets". The idea of breaking a message into packets was pioneered in the 1960s, but it was not widely used until the 1980s because it required more computing power and more sophisticated networking software.

When messages are broken into packets and each packet is sent separately, if a short message was sent after a large message had begun, the short message did not have to wait until the entire long message was finished. The first packet of the short message only had to wait for the current packet of the large message to be finished. The system alternated sending packets from the long and short messages until after a while the short message was completely sent and the long message resumed making full use of the network connection.

Breaking the message into packets also greatly reduced the amount of storage needed in the intermediate computers because instead of needing to store an entire message for as long as a few hours, the intermediate computer only needed to store a few packets for a few seconds while the packets waited for their turns on the outbound link.

Sending Packets

\index{IMP} \index{Interface Message Processor} \index{router} As networks moved away from the store-and-forward approach, they started to include special-purpose computers that specialized in moving packets. These were initially called "Interface Message Processors" or "IMPs" because they acted as the interface between general-purpose computers and the rest of the network. Later these computers dedicated to communications were called "routers" because their purpose was to route the packets they received towards their ultimate destination.

By building routers that specialized in moving packets across multiple hops, it became simpler to connect computers from multiple vendors to the same network. To connect any computer to the network, now all you needed to do was connect it to one router and then the rest of the communication details were handled by the other routers.

\index{LAN} \index{Local Area Network} When multiple computers at one location were connected together in a "Local Area Network" (or LAN) using physical wiring, you would connect a router to the local area network. By sending data through the router, all the computers on the local area network could send data across the "Wide Area Network" (or WAN).

Addressing and Packets

In the early store-and-forward networks it was important to know the source and destination computers for every message. Each computer was given a unique name or number that was called the "address" of the computer. To send a message to another computer, you needed to add the source and destination address to the message before sending the message along its way. By having a source and destination address in each message, the computers that stored and forwarded the message would be able to pick the best path for the message if more than one path was available.

When a long message was split into much smaller packets and each packet was sent individually, the source and destination addresses had to be added to each packet, so that routers could choose the best path to forward each packet of the message. In addition to the source and destination addresses, it was also necessary to add data to each packet indicating the "offset" or position of the packet in the overall message so that the receiving computer could put the packets back together in the right order to reconstruct the original message.

Putting It All Together

So when we combine all this together we can understand the basic operation of today's Internet. We have specialized computers called "routers" that know how to route packets along a path from a source to a destination. Each packet will pass through multiple routers during its journey from the source computer to the destination computer.

Even though the packets may be part of a larger message, the routers forward each packet separately based on its source and destination addresses. Different packets from the same message may take different routes from the source to the destination. And sometimes packets even arrive out of order; a later packet might arrive before an earlier packet, perhaps because of a data "traffic jam". Each packet contains an "offset" from the beginning of the message so that the destination computer can reassemble the packets in the correct order to reconstruct the original message.

Connecting Around the World

By creating a network using multiple short hops, the overall cost of communicating across a large geographical area could be spread across a large number of connecting groups and individuals. Normally, packets would find the shortest path between the source and destination, but if a link on that path was an overloaded or broken, the routers could cooperate and reroute traffic to take slightly longer paths that would get packets from a source to a destination as quickly as possible.

The core of the Internet is a set of cooperating routers that move packets from many sources to many destinations at the same time. Each computer or local area network is connected to a router that forwards the traffic from its location to the various destinations on the Internet. A router might handle data from a single computer like a smartphone, from several computers in the same building, or from thousands of computers connected to a university campus network. The term "Internet" comes from the idea of "internetworking", which captures the idea of connecting many networks together. Our computers connect to local networks and the Internet connects the local networks together so all of our computers can talk to each other.

Glossary

address: A number that is assigned to a computer so that messages can be routed to the computer.

hop: A single physical network connection. A packet on the Internet will typically make several "hops" to get from its source computer to its destination.

LAN: Local Area Network. A network covering an area that is limited by the ability for an organization to run wires or the power of a radio transmitter.

leased line: An "always up" connection that an organization leased from a telephone company or other utility to send data across longer distances.

operator (telephone): A person who works for a telephone company and helps people make telephone calls.

packet: A limited-size fragment of a large message. Large messages or files are split into many packets and sent across the Internet. The typical maximum packet size is between 1000 and 3000 characters.

router: A specialized computer that is designed to receive incoming packets on many links and quickly forward the packets on the best outbound link to speed the packet to its destination.

store-and-forward network: A network where data is sent from one computer to another with the message being stored for relatively long periods of time in an intermediate computer waiting for an outbound network connection to become available.

\index{WAN} \index{Wide Area Network} WAN: Wide Area Network. A network that covers longer distances, up to sending data completely around the world. A WAN is generally constructed using communication links owned and managed by a number of different organizations.

Questions

You can take this quiz online at http://www.net-intro.com/quiz/

  1. What did early telephone operators do? a) Maintained cell phone towers b) Connected pairs of wires to allow people to talk c) Installed copper wire between cities d) Sorted packets as they went to the correct destination

  2. What is a leased line? a) A boundary between leased and owned telephone equipment b) A connection between a keyboard and monitor c) A wire that ran from one phone company office to another d) An "always on" telephone connection

  3. How long might a message be stored in an intermediate computer for a store-and-forward network? a) less than a second b) no more than four seconds c) less than a minute d) possibly as long as several hours

  4. What is a packet? a) A technique for wrapping items for shipping b) A small box used for storage c) A portion of a larger message that is sent across a network d) The amount of data that could be stored on an early punched card

  5. Which of these is most like a router? a) A mail sorting facility b) A refrigerator c) A high-speed train d) An undersea telecommunications cable

  6. What was the name given to early network routers? a) Interfaith Message Processors b) Internet Motion Perceptrons c) Instant Message Programs d) Interface Message Processors

  7. In addition to breaking large messages into smaller segments to be sent, what else was needed to properly route each message segment? a) A source and destination address on each message segment b) An ID and password for each message segment c) A small battery to maintain the storage for each message segment d) A small tracking unit like a GPS to find lost messages

  8. Why is it virtually free to send messages around the world using the Internet? a) Because governments pay for all the connections b) Because advertising pays for all the connections c) Because so many people share all the resources d) Because it is illegal to charge for long-distance connections