Packet switching and TCP/IP
Consider the computer network illustrated in Figure 43. Assume computer A in Chicago wants to communicate with computer B in San Antonio. There are different paths on this network between Chicago and San Antonio. One potential way to communicate is to select one of these paths and then establish a connection between computers A and B on this path. This path would be dedicated to A and B for the duration of their message exchange. Establishing a connection between two points using a specific path on a network for the duration of a message exchange is called circuit switching. This is exactly how the public switched telephone network (PSTN) works. It is also referred to as POTS, for plain old telephone service. The public telephone system is also analog, which means that information travels over it in wave form.
The problem with circuit switching is that the line is tied up regardless of how much information is exchanged. To see this, consider circuit switching applied to a highway system. Assume Figure 43 now represents a highway system and a person wants to drive from Chicago to San Antonio. With the circuit switching philosophy, you would select a path, say, Chicago to Memphis to San Antonio, on the highway system between these two cities and then reserve all of the highways on this path for the period of time it takes the person to drive from Chicago to San Antonio. This means that if a second person wanted to drive from Chicago to Nashville he would be blocked from using the Chicago to Memphis link until the first person arrived in San Antonio.
Figure 4--3 Packet switching network.
Circuit switching is a big problem for computers because their information exchange is typically "bursty" rather than even and constant. Two computers might want to exchange a file, but after that file is exchanged the computers may not engage in communication again for quite some time. Thus, we call the need to exchange data between computers "discrete," not continuous. An alternative to circuit switching is packet switching. The concept of packet switching was developed independently by Paul Baron and Donald Watts Davies in the 1960s. The interested reader may wish to see one of Paul Baron's original memos  at the RAND Corporation describing packet switching. This work was done during the time of the Cold War and part of his motivation for developing packet switching was the design of a network that could withstand a nuclear attack.
To understand packet switching, now consider sending a letter from Chicago to San Antonio. Rather than sending the entire letter over a particular route, we could cut the letter into a set of packets. The packets are cut, addressed, and sent in a particular way, that is:
The packets are numbered so they can be reassembled in the correct sequence at the destination.
Each packet contains destination and return addresses.
The packets are transmitted over the network as capacity becomes available.
The packets are forwarded across the network separately and do not necessarily follow the same route; if a particular link of a given path is busy, some packets might take an alternate route.
Packet switching was radical thinking at the time. AT&T stated flatly that packet switching would never work. However, the work on packet switching very much influenced Larry Roberts at ARPA, who had been hired by Bob Taylor. He opened bidding to build a packet switched network for ARPA. Two important companies, IBM and AT&T, did not even bid. The contract was awarded to the Boston consulting firm Bolt Beranek and Newman, known as BBN. The project was led by Frank Heart.
Packet switching is a philosophy of network communication, not a specific protocol. The protocol used by the Internet is called TCP/IP. The TCP/IP protocol is due to Robert Kahn and Vint Cerf. The IP in TCP/IP stands for Internet protocol and is the protocol used by computers to communicate with each other on the Internet. Computers using the Internet must have IP software. Packets that follow the IP specification are called IP datagrams. These datagrams have two parts: header information and data. To continue with the letter analogy, think of the header as the information that would go on an envelope and the data as the letter that goes inside the envelope. The header information includes such things as:
Total length of the packet
Destination IP address
Source IP address
Time to live3the time to live is decremented by routers as the packet passes through them; when it hits zero, the packet is discarded; this prevents packets from getting into an "infinite loop" and tying up the network
Error checking information
The IP packets are independent of the underlying hardware structure. In order to travel across different types of networks, the packets are encapsulated into frames. The underlying hardware understands the particular frame format and can deliver the encapsulated packet.
The TCP in TCP/IP stands for transmission control protocol. This is software that, as the name implies, is responsible for assembling the packets in the correct order and checking for missing packets. If packets are lost, the TCP software requests new ones. It also checks for duplicate packets. The TCP software is responsible for establishing the session between two computers on a network. The TCP and IP software work together.
An important aspect of packet switching is that the packets, just like a letter, have forwarding and return addresses. What should an address for a computer look like? Since it is a computer, and computers only understand binary (0/1) information, the most sensible addressing scheme is one based on binary numbers. Indeed, this is the case and the addressing system used by IP software is based on a 32-bit IP address. An example IP address is:
All IP addresses have this format: four sets of numbers separated by three periods. This is called dotted-decimal notation. Each of the four sets of numbers requires one byte (eight bits), for a total of 32 bits. By convention, we are stating the IP address in decimal rather than binary format. For more details on the IP addressing scheme we refer you to the Technical Appendix.
NAP: These are switching points in large cities where the very high bandwidth network backbones of major telecommunications companies meet.
We have defined the Internet as a network of computers using the TCP/IP. Who built the network and how do you get connected? The Internet backbones, the high bandwidth fiber-optic cable connecting major cities in the United States, are controlled by major telecommunications companies like MCI WorldCom, Sprint, AGIS, PSINet, and BBN. Large Internet service providers are connected directly into the backbone at NAPs like San Francisco, Chicago, New York, and Washington D.C. A person or company connects to the Internet using an Internet service provider. This is discussed in more detail in Chapter 7, "Getting Your Business Online." You should be aware that there are many networking protocols other than TCP/IP. One of the great innovations of the Macintosh, in addition to the GUI, was easy networking. At one point it was much easier to network Macintosh computers than IBM PCs. The Macintosh networking protocol was called AppleTalk. Other well-known protocols include Token Ring and Novell NetWare.