It is now time to turn our attention from the applications and social aspects of networking (the fun stuff) to the technical issues involved in network design (the work stuff). There is no generally accepted taxonomy into which all computer networks fit, but two dimensions stand out as important: transmission technology and scale. We will now examine each of these in turn. Broadly speaking, there are two types of transmission technology that are in widespread use. They are as follows:
- Broadcast links.
- Point-to-point links.
Broadcast networks have a single communication channel that is shared by all the machines on the network. Short messages, called packets in certain contexts, sent by any machine are received by all the others. An address field within the packet specifies the intended recipient. Upon receiving a packet, a machine checks the address field. If the packet is intended for the receiving machine, that machine processes the packet; if the packet is intended for some other machine, it is just ignored. As an analogy, consider someone standing at the end of a corridor with many rooms off it and shouting ''Watson, come here. I want you.'' Although the packet may actually be received (heard) by many people, only Watson responds. The others just ignore it. Another analogy is an airport announcement asking all flight 644 passengers to report to gate 12 for immediate boarding.
Broadcast systems generally also allow the possibility of addressing a packet to all destinations by using a special code in the address field. When a packet with this ode is transmitted, it is received and processed by every machine on the network. This mode of operation is called broadcasting. Some broadcast systems also support transmission to a subset of the machines, something known as multicasting. One possible scheme is to reserve one bit to indicate multicasting. The remaining n - 1 address bits can hold a group number. Each machine can ''subscribe'' to any or all of the groups. When a packet is sent to a certain group, it is delivered to all
machines subscribing to that group.
In contrast, point-to-point networks consist of many connections between individual pairs of machines. To go from the source to the destination, a packet on this type of network may have to first visit one or more intermediate machines. Often multiple routes, of different lengths, are possible, so finding good ones is important in point-to-point networks. As a general rule (although there are many exceptions), smaller, geographically localized networks tend to use broadcasting, whereas larger networks usually are point-to-point. Point-to-point transmission with one sender and one receiver is sometimes called unicasting. An alternative criterion for classifying networks is their scale. In Fig. 1-6 we classify multiple processor systems by their physical size. At the top are the personal area networks, networks that are meant for one person. For example, a wireless network connecting a computer with its mouse, keyboard, and printer is a personal area network. Also, a PDA that controls the user's hearing aid or pacemaker fits in this category. Beyond the personal area networks come longer-range networks. These can be divided into local, metropolitan, and wide area networks. Finally, the connection of two or more networks is called an internetwork. The worldwide Internet is a well-known example of an internetwork. Distance is important as a classification metric because different techniques are used at different scales. In this book we will be concerned with networks at all these scales. Below we give a brief introduction to network hardware.
Figure 1-6. Classification of interconnected processors by scale.
1 Local Area Networks
Local area networks, generally called LANs, are privately-owned networks within a single building or campus of up to a few kilometers in size. They are widely used to connect personal computers and workstations in company offices and factories to share resources (e.g., printers) and exchange information. LANs are distinguished from other kinds of networks by three characteristics:
- their size
- their transmission technology
- their topology?
LANs are restricted in size, which means that the worst-case transmission time is bounded and known inadvance. Knowing this bound makes it possible to use certain kinds of designs that would not otherwise be possible. It also simplifies network management. LANs may use a transmission technology consisting of a cable to which all the machines are attached, like the
telephone company party lines once used in rural areas. Traditional LANs run at speeds of 10 Mbps to 100 Mbps, have low delay (microseconds or nanoseconds), and make very few errors. Newer LANs operate at up to 10 Gbps. In this book, we will adhere to tradition and measure line speeds in megabits/sec (1 Mbps is 1,000,000 bits/sec) and gigabits/sec (1 Gbps is 1,000,000,000 bits/sec).
Various topologies are possible for broadcast LANs. Figure 1-7 shows two of them. In a bus (i.e., a linear cable) network, at any instant at most one machine is the master and is allowed to transmit. All other machines are required to refrain from sending. An arbitration mechanism is needed to resolve conflicts when two or more machines want to transmit simultaneously. The arbitration mechanism may be centralized or distributed. IEEE 802.3, popularly called Ethernet, for example, is a bus-based broadcast network with decentralized control, usually operating at 10 Mbps to 10 Gbps. Computers on an Ethernet can transmit whenever they want to; if two or more packets collide, each computer just waits a random time and tries again later.
Figure 1-7. Two broadcast networks. (a) Bus. (b) Ring.
A second type of broadcast system is the ring. In a ring, each bit propagates around on its own, not waiting for the rest of the packet to which it belongs. Typically, each bit circumnavigates the entire ring in the time it takes to transmit a few bits, often before the complete packet has even been transmitted. As with all other broadcast systems, some rule is needed for arbitrating simultaneous accesses to the ring. Various methods, such as having the machines take turns, are in use. IEEE 802.5 (the IBM token ring), is a ring-based LAN operating at 4 and 16 Mbps. FDDI is another example of a ring network. Broadcast networks can be further divided into static and dynamic, depending on how the channel is allocated. A typical static allocation would be to divide time into discrete intervals and use a round-robin algorithm, allowing each machine to broadcast only when its time slot comes up. Static allocation wastes channel capacity when a machine has nothing to say during its allocated slot, so most systems attempt to allocate the channel dynamically (i.e., on demand).
Dynamic allocation methods for a common channel are either centralized or decentralized. In the centralized channel allocation method, there is a single entity, for example, a bus arbitration unit, which determines who goes next. It might do this by accepting requests and making a decision according to some internal algorithm. In the decentralized channel allocation method, there is no central entity; each machine must decide for itself whether to transmit. You might think that this always leads to chaos, but it does not. Later we will study many
algorithms designed to bring order out of the potential chaos.
2 Metropolitan Area Networks
A metropolitan area network, or MAN, covers a city. The best-known example of a MAN is the cable television network available in many cities. This system grew from earlier community antenna systems used in areas with poor over-the-air television reception. In these early systems, a large antenna was placed on top of a nearby hill and signal was then piped to the subscribers' houses. At first, these were locally-designed, ad hoc systems. Then companies began jumping into the business, getting contracts from city governments to wire up an entire city. The next step was television programming and even entire channels designed for cable only. Often these channels were highly specialized, such as all news, all sports, all cooking, all gardening, and so on. But from their inception until the late 1990s, they were intended for television reception only.
Starting when the Internet attracted a mass audience, the cable TV network operators began to realize that with some changes to the system, they could provide two-way Internet service in unused parts of the spectrum. At that point, the cable TV system began to morph from a way to distribute television to a metropolitan area network. To a first approximation, a MAN might look something like the system shown in Fig. 1-8. In this figure we see both television signals and Internet being fed into the centralized head end for subsequent distribution to people's homes. We will come back to this subject in detail in Chap. 2.
Figure 1-8. A metropolitan area network based on cable TV.
Cable television is not the only MAN. Recent developments in high-speed wireless Internet access resulted in another MAN, which has been standardized as IEEE 802.16. We will look at this area in Chap. 2.
3 Wide Area Networks
A wide area network, or WAN, spans a large geographical area, often a country or continent. It contains a collection of machines intended for running user (i.e., application) programs. We will follow traditional usage and call these machines hosts. The hosts are connected by a communication subnet, or just subnet for short. The hosts are owned by the customers (e.g., people's personal computers), whereas the communication subnet is typically owned and operated by a telephone company or Internet service provider. The job of the subnet is to carry messages from host to host, just as the telephone system carries words from speaker to listener. Separation of the pure communication aspects of the network (the subnet) from the application aspects (the hosts), greatly simplifies the complete network design.
In most wide area networks, the subnet consists of two distinct components: transmission lines and switching elements. Transmission lines move bits between machines. They can be made of copper wire, optical fiber, or even radio links. Switching elements are specialized computers that connect three or more transmission lines. When data arrive on an incoming line, the switching element must choose an outgoing line on which to forward them. These switching computers have been called by various names in the past; the name router is now most
commonly used. Unfortunately, some people pronounce it ''rooter'' and others have it rhyme with ''doubter.'' Determining the correct pronunciation will be left as an exercise for the reader. (Note: the perceived correct answer may depend on where you live.)
In this model, shown in Fig. 1-9, each host is frequently connected to a LAN on which a router is present, although in some cases a host can be connected directly to a router. The collection of communication lines and routers (but not the hosts) form the subnet.
Figure 1-9. Relation between hosts on LANs and the subnet.
A short comment about the term ''subnet'' is in order here. Originally, its only meaning was the collection of routers and communication lines that moved packets from the source host to the destination host. However, some years later, it also acquired a second meaning in conjunction with network addressing (which we will discuss in Chap. 5). Unfortunately, no widely-used alternative exists for its initial meaning, so with some hesitation we will use it in both senses. From the context, it will always be clear which is meant.
In most WANs, the network contains numerous transmission lines, each one connecting a pair of routers. If two routers that do not share a transmission line wish to communicate, they must do this indirectly, via other routers. When a packet is sent from one router to another via one or more intermediate routers, the packet is received at each intermediate router in its entirety, stored there until the required output line is free, and then forwarded. A subnet organized according to this principle is called a store-and-forward or packet-switched subnet. Nearly all
wide area networks (except those using satellites) have store-and-forward subnets. When the packets are small and all the same size, they are often called cells.
The principle of a packet-switched WAN is so important that it is worth devoting a few more words to it. Generally, when a process on some host has a message to be sent to a process on some other host, the sending host first cuts the message into packets, each one bearing its number in the sequence. These packets are then injected into the network one at a time in quick succession. The packets are transported individually over the network and deposited at the receiving host, where they are reassembled into the original message and delivered to the receiving process. A stream of packets resulting from some initial message is illustrated in Fig. 1-10.
Figure 1-10. A stream of packets from sender to receiver.
In this figure, all the packets follow the route ACE, rather than ABDE or ACDE. In some networks all packets from a given message must follow the same route; in others each packet is routed separately. Of course, if ACE is the best route, all packets may be sent along it, even if each packet is individually routed.
Routing decisions are made locally. When a packet arrives at router A,itis up to A to decide if this packet should be sent on the line to B or the line to C. How A makes that decision is called the routing algorithm. Many of them exist. We will study some of them in detail in Chap. 5. Not all WANs are packet switched. A second possibility for a WAN is a satellite system. Each router has an antenna through which it can send and receive. All routers can hear the output from the satellite, and in some cases they can also hear the upward transmissions of their fellow routers to the satellite as well. Sometimes the routers are connected to a substantial point-to-point subnet, with only some of them having a satellite antenna. Satellite networks are inherently broadcast and are most useful when the broadcast property is important.
4 Wireless Networks
Digital wireless communication is not a new idea. As early as 1901, the Italian physicist Guglielmo Marconi demonstrated a ship-to-shore wireless telegraph, using Morse Code (dots and dashes are binary, after all). Modern digital wireless systems have better performance, but the basic idea is the same. To a first approximation, wireless networks can be divided into three main categories:
1. System interconnection.
2. Wireless LANs.
3. Wireless WANs.
System interconnection is all about interconnecting the components of a computer using short-range radio. Almost every computer has a monitor, keyboard, mouse, and printer connected to the main unit by cables. So many new users have a hard time plugging all the cables into the right little holes (even though they are usually color coded) that most computer vendors offer the option of sending a technician to the user's home to do it. consequently, some companies got together to design a short-range wireless network called Bluetooth to connect these components without wires. Bluetooth also allows digital cameras, headsets, scanners, and other devices to connect to a computer by merely being brought within range. No cables, no driver installation, just put them down, turn them on, and they work. For many people, this ease of operation is a big plus. In the simplest form, system interconnection networks use the master-slave paradigm of Fig. 1-11(a). The system unit is normally the master, talking to the mouse, keyboard, etc., as slaves. The master tells the slaves what addresses to use, when they can broadcast, how long they can transmit, what frequencies they can use, and so on. We will discuss Bluetooth in more detail in Chap. 4.
Figure 1-11. (a) Bluetooth configuration. (b) Wireless LAN.
The next step up in wireless networking are the wireless LANs. These are systems in which every computer has a radio modem and antenna with which it can communicate with other systems. Often there is an antenna on the ceiling that the machines talk to, as shown in Fig. 1-11(b). However, if the systems are close enough, they can communicate directly with one another in a peer-to-peer configuration. Wireless LANs are becoming increasingly common in small offices and homes, where installing Ethernet is considered too much trouble, as well as in older office buildings, company cafeterias, conference rooms, and other places. There is a standard for wireless LANs, called IEEE 802.11, which most systems implement and which is becoming very widespread. We will discuss it in Chap. 4.
The third kind of wireless network is used in wide area systems. The radio network used for cellular telephones is an example of a low-bandwidth wireless system. This system has already gone through three generations. The first generation was analog and for voice only. The second generation was digital and for voice only. The third generation is digital and is for both voice and data. In a certain sense, cellular wireless networks are like wireless LANs, except that the distances involved are much greater and the bit rates much lower. Wireless LANs can operate at rates up to about 50 Mbps over distances of tens of meters. Cellular systems operate below 1 Mbps, but the distance between the base station and the computer or telephone is measured in kilometers rather than in meters. We will have a lot to say about these networks in Chap. 2.
In addition to these low-speed networks, high-bandwidth wide area wireless networks are also being developed. The initial focus is high-speed wireless Internet access from homes and businesses, bypassing the telephone system. This service is often called local multipoint distribution service. We will study it later in the book. A standard for it, called IEEE 802.16, has also been developed. We will examine the standard in Chap. 4.
Almost all wireless networks hook up to the wired network at some point to provide access to files, databases, and the Internet. There are many ways these connections can be realized, depending on the circumstances. For example, in Fig. 1-12(a), we depict an airplane with a number of people using modems and seat-back telephones to call the office. Each call is independent of the other ones. A much more efficient option, however, is the flying LAN of Fig. 1-12(b). Here each seat comes equipped with an Ethernet connector into which passengers can plug their computers. A single router on the aircraft maintains a radio link with some router on the ground, changing routers as it flies along. This configuration is just a traditional LAN, except that its connection to the outside world happens to be a radio link instead of a hardwired line.
Figure 1-12. (a) Individual mobile computers. (b) A flying LAN.
Many people believe wireless is the wave of the future (e.g., Bi et al., 2001; Leeper, 2001; Varshey and Vetter, 2000) but at least one dissenting voice has been heard. Bob Metcalfe, the inventor of Ethernet, has written: ''Mobile wireless computers are like mobile pipeless bathrooms—portapotties. They will be common on vehicles, and at construction sites, and rock concerts. My advice is to wire up your home and stay there'' (Metcalfe, 1995). History may record this remark in the same category as IBM's chairman T.J. Watson's 1945 explanation of why IBM was not getting into the computer business: ''Four or five computers should be enough for the entire world until the year 2000.''
5. Home Network
Home networking is on the horizon. The fundamental idea is that in the future most homes will be set up for networking. Every device in the home will be capable of communicating with every other device, and all of them will be accessible over the Internet. This is one of those visionary concepts that nobody asked for (like TV remote controls or mobile phones), but once they arrived nobody can imagine how they lived without them.
Many devices are capable of being networked. Some of the more obvious categories (with examples) are as follows:
- Computers (desktop PC, notebook PC, PDA, shared peripherals).
- Entertainment (TV, DVD, VCR, camcorder, camera, stereo, MP3).
- Telecommunications (telephone, mobile telephone, intercom, fax).
- Appliances (microwave, refrigerator, clock, furnace, airco, lights).
- Telemetry (utility meter, smoke/burglar alarm, thermostat, babycam).
Home computer networking is already here in a limited way. Many homes already have a device to connect multiple computers to a fast Internet connection. Networked entertainment is not quite here, but as more and more music and movies can be downloaded from the Internet, there will be a demand to connect stereos and televisions to it. Also, people will want to share their own videos with friends and family, so the connection will need to go both ways. Telecommunications gear is already connected to the outside world, but soon it will be digital and go over the Internet. The average home probably has a dozen clocks (e.g., in appliances), all of which have to be reset twice a year when daylight saving time (summer time) comes and goes. If all the clocks were on the Internet, that resetting could be done automatically. Finally, remote monitoring of the home and its contents is a likely winner. Probably many parents would be willing to spend some money to monitor their sleeping babies on their PDAs when they are eating out, even with a rented teenager in the house. While one can imagine a separate network for each application area, integrating all of them into a single network is probably a better idea.
Home networking has some fundamentally different properties than other network types. First, the network and devices have to be easy to install. The author has installed numerous pieces of hardware and software on various computers over the years, with mixed results. A series of phone calls to the vendor's helpdesk typically resulted in answers like.
- Read the manual
- Reboot the computer
- Remove all hardware and software except ours and try again
- Download the newest driver from our Web site, and if all else fails
the hard disk and then reinstall Windows from the CD-ROM. Telling the purchaser of an Internet refrigerator to
download and install a new version of the refrigerator's operating system is not going to lead to happy
customers. Computer users are accustomed to putting up with products that do not work; the car-, television-,
and refrigerator-buying public is far less tolerant. They expect products to work for 100% from the word go.
Second, the network and devices have to be foolproof in operation. Air conditioners used to have one knob with
four settings: OFF, LOW, MEDIUM, and HIGH. Now they have 30-page manuals. Once they are networked,
expect the chapter on security alone to be 30 pages. This will be beyond the comprehension of virtually all the
Third, low price is essential for success. People will not pay a $50 premium for an Internet thermostat because
few people regard monitoring their home temperature from work that important. For $5 extra, it might sell,
Fourth, the main application is likely to involve multimedia, so the network needs sufficient capacity. There is no
market for Internet-connected televisions that show shaky movies at 320 x 240 pixel resolution and 10
frames/sec. Fast Ethernet, the workhorse in most offices, is not good enough for multimedia. Consequently,
home networks will need better performance than that of existing office networks and at lower prices before they
become mass market items.
Fifth, it must be possible to start out with one or two devices and expand the reach of the network gradually. This
means no format wars. Telling consumers to buy peripherals with IEEE 1394 (FireWire) interfaces and a few
years later retracting that and saying USB 2.0 is the interface-of-the-month is going to make consumers skittish.
The network interface will have to remain stable for many years; the wiring (if any) will have to remain stable for
Sixth, security and reliability will be very important. Losing a few files to an e-mail virus is one thing; having a
burglar disarm your security system from his PDA and then plunder your house is something quite different.
An interesting question is whether home networks will be wired or wireless. Most homes already have six
networks installed: electricity, telephone, cable television, water, gas, and sewer. Adding a seventh one during
construction is not difficult, but retrofitting existing houses is expensive. Cost favors wireless networking, but
security favors wired networking. The problem with wireless is that the radio waves they use are quite good at
going through fences. Not everyone is overjoyed at the thought of having the neighbors piggybacking on their
Internet connection and reading their e-mail on its way to the printer. In Chap. 8 we will study how encryption
can be used to provide security, but in the context of a home network, security has to be foolproof, even with
inexperienced users. This is easier said than done, even with highly sophisticated users.
In short, home networking offers many opportunities and challenges. Most of them relate to the need to be easy
to manage, dependable, and secure, especially in the hands of nontechnical users, while at the same time
delivering high performance at low cost.
Many networks exist in the world, often with different hardware and software. People connected to one network
often want to communicate with people attached to a different one. The fulfillment of this desire requires that
different, and frequently incompatible networks, be connected, sometimes by means of machines called
gateways to make the connection and provide the necessary translation, both in terms of hardware and
software. A collection of interconnected networks is called an internetwork or internet. These terms will be used
in a generic sense, in contrast to the worldwide Internet (which is one specific internet), which we will always
A common form of internet is a collection of LANs connected by a WAN. In fact, if we were to replace the label
''subnet'' in Fig. 1-9 by ''WAN,'' nothing else in the figure would have to change. The only real technical
distinction between a subnet and a WAN in this case is whether hosts are present. If the system within the gray
area contains only routers, it is a subnet; if it contains both routers and hosts, it is a WAN. The real differences
relate to ownership and use.
Subnets, networks, and internetworks are often confused. Subnet makes the most sense in the context of a wide
area network, where it refers to the collection of routers and communication lines owned by the network
operator. As an analogy, the telephone system consists of telephone switching offices connected to one another
by high-speed lines, and to houses and businesses by low-speed lines. These lines and equipment, owned and
managed by the telephone company, form the subnet of the telephone system. The telephones themselves (the
hosts in this analogy) are not part of the subnet. The combination of a subnet and its hosts forms a network. In
the case of a LAN, the cable and the hosts form the network. There really is no subnet.
An internetwork is formed when distinct networks are interconnected. In our view, connecting a LAN and a WAN
or connecting two LANs forms an internetwork, but there is little agreement in the industry over terminology in
this area. One rule of thumb is that if different organizations paid to construct different parts of the network and
each maintains its part, we have an internetwork rather than a single network. Also, if the underlying technology
is different in different parts (e.g., broadcast versus point-to-point), we probably have two networks.
1.3 NETWORK SOFTWARE?
The first computer networks were designed with the hardware as the main concern and the software as an
afterthought. This strategy no longer works. Network software is now highly structured. In the following sections
we examine the software structuring technique in some detail. The method described here forms the keystone of
the entire book and will occur repeatedly later on.
1.3.1 Protocol Hierarchies
To reduce their design complexity, most networks are organized as a stack of layers or levels, each one built
upon the one below it. The number of layers, the name of each layer, the contents of each layer, and the
function of each layer differ from network to network. The purpose of each layer is to offer certain services to the
higher layers, shielding those layers from the details of how the offered services are actually implemented. In a
sense, each layer is a kind of virtual machine, offering certain services to the layer above it.
This concept is actually a familiar one and used throughout computer science, where it is variously known as
information hiding, abstract data types, data encapsulation, and object-oriented programming. The fundamental
idea is that a particular piece of software (or hardware) provides a service to its users but keeps the details of its
internal state and algorithms hidden from them.
Layer n on one machine carries on a conversation with layer n on another machine. The rules and conventions
used in this conversation are collectively known as the layer n protocol. Basically, a protocol is an agreement
between the communicating parties on how communication is to proceed. As an analogy, when a woman is
introduced to a man, she may choose to stick out her hand. He, in turn, may decide either to shake it or kiss it,
depending, for example, on whether she is an American lawyer at a business meeting or a European princess at
a formal ball. Violating the protocol will make communication more difficult, if not completely impossible.
A five-layer network is illustrated in Fig. 1-13. The entities comprising the corresponding layers on different
machines are called peers. The peers may be processes, hardware devices, or even human beings. In other
words, it is the peers that communicate by using the protocol.
Figure 1-13. Layers, protocols, and interfaces.
In reality, no data are directly transferred from layer n on one machine to layer n on another machine. Instead,
each layer passes data and control information to the layer immediately below it, until the lowest layer is
reached. Below layer 1 is the physical medium through which actual communication occurs. In Fig. 1-13, virtual
communication is shown by dotted lines and physical communication by solid lines.
Between each pair of adjacent layers is an interface. The interface defines which primitive operations and
services the lower layer makes available to the upper one. When network designers decide how many layers to
include in a network and what each one should do, one of the most important considerations is defining clean
interfaces between the layers. Doing so, in turn, requires that each layer perform a specific collection of wellunderstood
functions. In addition to minimizing the amount of information that must be passed between layers,
clear-cut interfaces also make it simpler to replace the implementation of one layer with a completely different
implementation (e.g., all the telephone lines are replaced by satellite channels) because all that is required of the
new implementation is that it offer exactly the same set of services to its upstairs neighbor as the old
implementation did. In fact, it is common that different hosts use different implementations.
A set of layers and protocols is called a network architecture. The specification of an architecture must contain
enough information to allow an implementer to write the program or build the hardware for each layer so that it
will correctly obey the appropriate protocol. Neither the details of the implementation nor the specification of the
interfaces is part of the architecture because these are hidden away inside the machines and not visible from the
outside. It is not even necessary that the interfaces on all machines in a network be the same, provided that
each machine can correctly use all the protocols. A list of protocols used by a certain system, one protocol per
layer, is called a protocol stack. The subjects of network architectures, protocol stacks, and the protocols
themselves are the principal topics of this book.
An analogy may help explain the idea of multilayer communication. Imagine two philosophers (peer processes in
layer 3), one of whom speaks Urdu and English and one of whom speaks Chinese and French. Since they have
no common language, they each engage a translator (peer processes at layer 2), each of whom in turn contacts
a secretary (peer processes in layer 1). Philosopher 1 wishes to convey his affection for oryctolagus cuniculus to
his peer. To do so, he passes a message (in English) across the 2/3 interface to his translator, saying ''I like
rabbits,'' as illustrated in Fig. 1-14. The translators have agreed on a neutral language known to both of them,
Dutch, so the message is converted to ''Ik vind konijnen leuk.'' The choice of language is the layer 2 protocol and
is up to the layer 2 peer processes.
Figure 1-14. The Philosopher-translator-secretary Architecture.
The translator then gives the message to a secretary for transmission, by, for example, fax (the layer 1 protocol).
When the message arrives, it is translated into French and passed across the 2/3 interface to philosopher 2.
Note that each protocol is completely independent of the other ones as long as the interfaces are not changed.
The translators can switch from Dutch to say, Finnish, at will, provided that they both agree, and neither changes
his interface with either layer 1 or layer 3. Similarly, the secretaries can switch from fax to e-mail or telephone
without disturbing (or even informing) the other layers. Each process may add some information intended only
for its peer. This information is not passed upward to the layer above.
Now consider a more technical example: how to provide communication to the top layer of the five-layer network
in Fig. 1-15. A message, M, is produced by an application process running in layer 5 and given to layer 4 for
transmission. Layer 4 puts a header in front of the message to identify the message and passes the result to
layer 3. The header includes control information, such as sequence numbers, to allow layer 4 on the destination
machine to deliver messages in the right order if the lower layers do not maintain sequence. In some layers,
headers can also contain sizes, times, and other control fields.
Figure 1-15. Example information flow supporting virtual communication in layer 5.
In many networks, there is no limit to the size of messages transmitted in the layer 4 protocol, but there is nearly
always a limit imposed by the layer 3 protocol. Consequently, layer 3 must break up the incoming messages into
smaller units, packets, prepending a layer 3 header to each packet. In this example, M is split into two parts, M1
Layer 3 decides which of the outgoing lines to use and passes the packets to layer 2. Layer 2 adds not only a
header to each piece, but also a trailer, and gives the resulting unit to layer 1 for physical transmission. At the
receiving machine the message moves upward, from layer to layer, with headers being stripped off as it
progresses. None of the headers for layers below n are passed up to layer n.
The important thing to understand about Fig. 1-15 is the relation between the virtual and actual communication
and the difference between protocols and interfaces. The peer processes in layer 4, for example, conceptually
think of their communication as being ''horizontal,'' using the layer 4 protocol. Each one is likely to have a
procedure called something like SendToOtherSide and GetFromOtherSide, even though these procedures
actually communicate with lower layers across the 3/4 interface, not with the other side.
The peer process abstraction is crucial to all network design. Using it, the unmanageable task of designing the
complete network can be broken into several smaller, manageable design problems, namely, the design of the
Although Sec. 1.3 is called ''Network 1.3,'' it is worth pointing out that the lower layers of a protocol hierarchy are
frequently implemented in hardware or firmware. Nevertheless, complex protocol algorithms are involved, even if
they are embedded (in whole or in part) in hardware.
1.3.2 Design Issues for the Layers
Some of the key design issues that occur in computer networks are present in several layers. Below, we will
briefly mention some of the more important ones.
Every layer needs a mechanism for identifying senders and receivers. Since a network normally has many
computers, some of which have multiple processes, a means is needed for a process on one machine to specify
with whom it wants to talk. As a consequence of having multiple destinations, some form of addressing is
needed in order to specify a specific destination.
Another set of design decisions concerns the rules for data transfer. In some systems, data only travel in one
direction; in others, data can go both ways. The protocol must also determine how many logical channels the
connection corresponds to and what their priorities are. Many networks provide at least two logical channels per
connection, one for normal data and one for urgent data.
Error control is an important issue because physical communication circuits are not perfect. Many error-detecting
and error-correcting codes are known, but both ends of the connection must agree on which one is being used.
In addition, the receiver must have some way of telling the sender which messages have been correctly received
and which have not.
Not all communication channels preserve the order of messages sent on them. To deal with a possible loss of
sequencing, the protocol must make explicit provision for the receiver to allow the pieces to be reassembled
properly. An obvious solution is to number the pieces, but this solution still leaves open the question of what
should be done with pieces that arrive out of order.
An issue that occurs at every level is how to keep a fast sender from swamping a slow receiver with data.
Various solutions have been proposed and will be discussed later. Some of them involve some kind of feedback
from the receiver to the sender, either directly or indirectly, about the receiver's current situation. Others limit the
sender to an agreed-on transmission rate. This subject is called flow control.
Another problem that must be solved at several levels is the inability of all processes to accept arbitrarily long
messages. This property leads to mechanisms for disassembling, transmitting, and then reassembling
messages. A related issue is the problem of what to do when processes insist on transmitting data in units that
are so small that sending each one separately is inefficient. Here the solution is to gather several small
messages heading toward a common destination into a single large message and dismember the large
message at the other side.
When it is inconvenient or expensive to set up a separate connection for each pair of communicating processes,
the underlying layer may decide to use the same connection for multiple, unrelated conversations. As long as
this multiplexing and demultiplexing is done transparently, it can be used by any layer. Multiplexing is needed in
the physical layer, for example, where all the traffic for all connections has to be sent over at most a few physical
When there are multiple paths between source and destination, a route must be chosen. Sometimes this
decision must be split over two or more layers. For example, to send data from London to Rome, a high-level
decision might have to be made to transit France or Germany based on their respective privacy laws. Then a
low-level decision might have to made to select one of the available circuits based on the current traffic load.
This topic is called routing.
1.3.3 Connection-Oriented and Connectionless Services
Layers can offer two different types of service to the layers above them: connection-oriented and connectionless.
In this section we will look at these two types and examine the differences between them.
Connection-oriented service is modeled after the telephone system. To talk to someone, you pick up the phone,
dial the number, talk, and then hang up. Similarly, to use a connection-oriented network service, the service user
first establishes a connection, uses the connection, and then releases the connection. The essential aspect of a
connection is that it acts like a tube: the sender pushes objects (bits) in at one end, and the receiver takes them
out at the other end. In most cases the order is preserved so that the bits arrive in the order they were sent.
In some cases when a connection is established, the sender, receiver, and subnet conduct a negotiation about
parameters to be used, such as maximum message size, quality of service required, and other issues. Typically,
one side makes a proposal and the other side can accept it, reject it, or make a counterproposal.
In contrast, connectionless service is modeled after the postal system. Each message (letter) carries the full
destination address, and each one is routed through the system independent of all the others. Normally, when
two messages are sent to the same destination, the first one sent will be the first one to arrive. However, it is
possible that the first one sent can be delayed so that the second one arrives first.
Each service can be characterized by a quality of service. Some services are reliable in the sense that they
never lose data. Usually, a reliable service is implemented by having the receiver acknowledge the receipt of
each message so the sender is sure that it arrived. The acknowledgement process introduces overhead and
delays, which are often worth it but are sometimes undesirable.
A typical situation in which a reliable connection-oriented service is appropriate is file transfer. The owner of the
file wants to be sure that all the bits arrive correctly and in the same order they were sent. Very few file transfer
customers would prefer a service that occasionally scrambles or loses a few bits, even if it is much faster.
Reliable connection-oriented service has two minor variations: message sequences and byte streams. In the
former variant, the message boundaries are preserved. When two 1024-byte messages are sent, they arrive as
two distinct 1024-byte messages, never as one 2048-byte message. In the latter, the connection is simply a
stream of bytes, with no message boundaries. When 2048 bytes arrive at the receiver, there is no way to tell if
they were sent as one 2048-byte message, two 1024-byte messages, or 2048 1-byte messages. If the pages of
a book are sent over a network to a phototypesetter as separate messages, it might be important to preserve the
message boundaries. On the other hand, when a user logs into a remote server, a byte stream from the user's
computer to the server is all that is needed. Message boundaries are not relevant.
As mentioned above, for some applications, the transit delays introduced by acknowledgements are
unacceptable. One such application is digitized voice traffic. It is preferable for telephone users to hear a bit of
noise on the line from time to time than to experience a delay waiting for acknowledgements. Similarly, when
transmitting a video conference, having a few pixels wrong is no problem, but having the image jerk along as the
flow stops to correct errors is irritating.
Not all applications require connections. For example, as electronic mail becomes more common, electronic junk
is becoming more common too. The electronic junk-mail sender probably does not want to go to the trouble of
setting up and later tearing down a connection just to send one item. Nor is 100 percent reliable delivery
essential, especially if it costs more. All that is needed is a way to send a single message that has a high
probability of arrival, but no guarantee. Unreliable (meaning not acknowledged) connectionless service is often
called datagram service, in analogy with telegram service, which also does not return an acknowledgement to
In other situations, the convenience of not having to establish a connection to send one short message is
desired, but reliability is essential. The acknowledged datagram service can be provided for these applications. It
is like sending a registered letter and requesting a return receipt. When the receipt comes back, the sender is
absolutely sure that the letter was delivered to the intended party and not lost along the way.
Still another service is the request-reply service. In this service the sender transmits a single datagram
containing a request; the reply contains the answer. For example, a query to the local library asking where
Uighur is spoken falls into this category. Request-reply is commonly used to implement communication in the
client-server model: the client issues a request and the server responds to it. Figure 1-16 summarizes the types
Figure 1-16. Six different types of serviceof services discussed above.