1. Trang chủ
  2. » Công Nghệ Thông Tin

Data And Computer Communications

291 715 2
Tài liệu được quét OCR, nội dung có thể không chính xác
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Data And Computer Communications
Tác giả William Stallings
Trường học Pearson Education International
Chuyên ngành Data And Computer Communications
Thể loại Book
Năm xuất bản Seventh Edition
Thành phố New Jersey
Định dạng
Số trang 291
Dung lượng 10,06 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Data And Computer Communications

Trang 1

DAIA AND COMPUTER

COMMUNICATIONS &

Trang 2

DATA AND COMPUTER

Trang 4

-ROAD MAP FOR PART ONE

Chapter 1 Introduction

Chapter 1 provides an overview of Parts Two through Four of the book, giving the “big picture.” In essence, the book deals with four topics: data communi- cations over a transmission link; wide area networks; local area networks; and protocols and the TCP/IP protocol architecture Chapter 1 provides a preview

of the first three of these topics

Chapter 2 Protocols and Architecture Chapter 2 discusses the concept protocol architectures This chapter can be read immediately following Chapter 1 or deferred until the beginning of Part Three, Four, or Five

After a general introduction, the chapter deals with the two most im- portant protocol architectures: the Open Systems [nterconnection (OSI) model and TCP/IP Although the OST model is often used as the framework for discourse in this area, it is the TCP/IP protocol suite that is the basis for most commercially available interoperable products and that is the focus of Part Five of this book.

Trang 6

13 Data Communication Networking

Wide Area Networks Local Area Networks Wireless Networks Metropolitan Area Networks {4 An Example Configuration

Trang 7

10 CliaPreR ft / DATA COMMUNICATIONS AND NEEWORKING OVERVEEN'

AL

KEY POINTS

* The scope of this book is broad, covering three general areas: data communi-

cations, networking, and protocols; the first two are introduced in this chapter

« Data communications deals with the transmission of signals in a reliable and

efficient manner Topics covered include signal transmission, transmission

media, signal encoding, interfacing, data link control, and multiplexing

« Networking deals with the technology and architecture of the communica-

tions networks used to interconnect communicating devices This field is gen-

erally divided into the topics of local area networks (LANs) and wide area

networks (WANS)

The 1970s and 1980s saw a merger of the fields of computer science and data com-

munications that profoundly changed the technology, products, and companies of the

now combined computer-communications industry The computer-communications

revolution has produced several remarkable facts:

+ There is no fundamental difference between data processing (computers) and

data communications (transmission and switching equipment)

« There are no fundamental differences among data, voice, and video

communications

« The distinction among single-processor computer, multiprocessor computer,

local network, metropolitan network, and long-haul network has blurred

One effect of these trends has been a growing overlap of the computer and

communications industries, {rom component fabrication to system integration An-

other result is the development of integrated systems that transmit and process all

types of data and information Both the technology and the technical standards or-

ganizations are driving toward integrated public systems that make virtually all data

and information sources around the world easily and uniformly accessible

This book aims to provide a unified view of the broad field of data and com-

puter communications The organization of the book reflects an attempt to break

this massive subject into comprehensible parts and to build, piece by piece, a survey

of the state of the art This introductory chapter begins with a general model of com-

munications Then, a brief discussion introduces each of the Parts Two through Four

of this book Chapter 2 provides an overview to Part Five

A COMMUNICATIONS MODEL

We begin our study with a simple model of communications, illustrated by the block

diagram in Figure 11a

The fundamental purpose of a communications system is the exchange of data between two parties Figure 1.1b presents one particular example, which is commu-

nication between a workstation and a server over a public telephone network

Trang 8

Figure 1.1 Simplified Communications Model

Another example is the exchange of voice signals between two telephones over the same network The key elements of the model are as follows:

« Source This device generates the data to be transmitted; examples are tele- phones and personal computers

¢ Transmitter: Usually, the data generated by a source system are not transmit- ted directly in the form in which they were generated Rather, a transmitter transforms and encodes the information in such a way as to produce electro- magnetic signals that can be transmitted across some sort of transmission sys- tem For example, a modem takes a digital bit stream from an attached device such as a personal computer and transforms that bit stream into an analog sig- nal that can be handled by the telephone network

¢ Transmission system: This can be a single transmission line or a complex net- work connecting source and destination

* Receiver: The receiver accepts the signal from the transmi

converts it into a form that can be handled by the destination device For exam- ple, a modem will accept an analog signal coming from a network or trans- mission line and convert it into a digital bit stream

¢ Destination: Takes the incoming data from the receiver

This simple narrative conceals a wealth of technical complexity To get some idea of the scope of this complexity, Table 1.1 lists some of the key tasks that must be performed in a data communications system The list is somewhat arbitrary: Elements could be added; items on the list could be merged; and some items repre- sent several tasks that are performed at different “levels” of the system However, the list as it stands is suggestive of the scope of this book

The first item, trans sion system utilization, refers to the need to make effi- cient use of transmission facilities that are typically shared among a number of com- Municating devices Various techniques (referred to as multiplexing) are used to

Trang 9

12 CHAPTER 1 / DATA COMMUNICATIONS AND NETWORKING OVERVIEW

Table 1.40 Communications Tasks

Error detectian and correction Network management Flow control ì

allocate the total capacity of a transmission medium among a number of users Con-

gestion control techniques may be required to assure that the system is not over-

whelmed by excessive demand for transmission services,

To communicate, a device must interface with the transmission system All the

forms of communication discussed in this book depend on the use of electromagnet-

ic signals propagated over a transmission medium Thus, once an interface is estab-

lished, signal generation is required for communication The properties of the signal,

such as form and intensity, must be such that the signal is (1) capable of being prop-

agated through the transmission system, and (2) interpretable as data at the receiver

Not only must the signals be generated to conform to the requirements of the

transmission system and receiver, but also there must be some form of synchronization

between transmitter and receiver The receiver must be able to determine when a signal

begins to arrive and when it ends It must also know the duration of each signal element

Beyond the basic matter of deciding on the nature and timing of signals, there is

a variety of requirements for communication between two parties that might be col-

lected under the term exchange management If data are to be exchanged in both di-

rections over a period of time, the two parties must cooperate For example, for two

parties to engage in a telephone conversation, one party must dial the number of the

other, causing signals to be generated that result in the ringing of the called phone The

called party completes a connection by lifting the receiver For data processing de-

vices, more will be needed than simply establishing a connection; certain conventions

must be decided on These conventions may include whether both devices may trans-

mit simultaneously or must take turns, the amount of data to be sent at one time, the

format of the data, and what to do if certain contingencies such as an error arise

The next two items might have been included under exchange management,

but they seem important enough to list separately In all communications systems,

there is a potential for error; transmitted signals are distorted to some extent before

reaching their destination Error detection and correction are required in circum-

stances where errors cannot be tolerated This is usuaily the case with data process-

ing systems For example, in transferring a file from one computer to another, it is

simply not acceptable for the contents of the file to be accidentally altered Flew

control is required to assure that the source does not overwhelm the destination by

sending data faster than they can be processed and absorbed

Next are the related but distinct concepts of addressing and routing When

more than two devices share a transmission facility, a source system must indicate

the identity of the intended destination The transmission system must assure that

the destination system, and only that system, receives the data Further, the trans-

mission system may itself be a network through which various paths may be taken

A specific route through this network must be chosen

Trang 10

1.2/7 DATA COMMUNICATIONS 13

Recovery is a concept distinct from that of error correction Recovery tech- niques are needed in situations in which an information exchange, such as a data- base transaction or file transfer, is interrupted due to a fault somewhere in the system The objective is either to be able to resume activity at the point of interrup- tion or at least to restore the state of the systems involved to the condition prior to the beginning of the exchange

Message formatting has to do with an agreement between two parties as to the form of the data to be exchanged or transmitted, such as the binary code for characters Frequently, it is important to provide some measure of security in a data com- munications system The sender of data may wish to be assured that only the intend-

ed receiver actually receives the data And the receiver of data may wish to be assured that the received data have not been altered in transit and that the data actually come from the purported sender

Finally, a data communications facility is a complex system that cannot create or run itself Network management capabilities are needed to configure the system, mon- itor its status, react to failures and overloads, and plan intelligently for future growth - Thus, we have gone from the simple idea of data communication between source and destination to a rather formidable list of data communications tasks, In this book, we elaborate this list of tasks to describe and encompass the entire set of activities that can be classified under data and computer communications

1.2, DATA COMMUNICATIONS

Following Part One, this book is organized into four parts Part Two deals with the must fundamental aspects of the communications function, focusing on the trans- mission of signals in a reliable and efficient manner For want of a better name, we have given Part Two the title “Data Communications,” although that term arguably encompasses some or even all of the topics of Parts Three through Five

To get some flavor for the focus of Part Two, Figure 1.2 provides a new per- spective on the communications modef of Figure 1.la We trace the details of this figure using electronic mail as an example

Digital bit Analog Analog Digital bit

stream signal signal Stream

Text -l LÍ WU A/WV LU Text

Figure 1.2 Simplified Data Communications Model

Trang 11

14

CHAPTER U / DATA COMAMIUNICAVTIONS AND NED WORKING OV LRU

Suppose that the input device and transmilter are components of a personal

computer The user of the PC wishes to send a message m to another user, The user

activates the electronic mail package on the PC and enters the message via the key-

board (input device) The character string is briefly buffered in main memory We

can view it as a sequence of bits (g) in memory The personal computer is connected

to some transmission medium, such as a local network or a telephone line, by an /O

device (transmitter), such as a local network transceiver or a modem The input data

are transferred to the transmitter as a sequence of voltage shifts [g(t)] representing

bits on some communications bus or cable The transmitter is connected directly to

the medium and converts the incoming stream [g(+)] into a signal [s(¢)] suitable for

transmission; specific alternatives will be described in Chapter 5

The transmitted signal s(¢) presented to the medium is subject to a number of

impairments, discussed in Chapter 3, before it reaches the receiver Thus, the received

signal r(t) may differ from s(t) The receiver will attempt to estimate the original

s(t), based on r(s) and its knowledge of the medium, producing a sequence of bits

g'(t) These bits are sent to the output personal computer, where they are briefly

buffered in memory as a block of bits (g') In many cases, the destination system will

attempt to determine if an error has occurred and, if so, cooperate with the source

system to eventually obtain a complete, error-free block of data These data are then

presented to the user via an output device, such as a printer or screen The message

(m’) as viewed by the user will usually be an exact copy of the original message (m)

Now consider a telephone conversation In this case the input to the telephone

is a message (7m) in the form of sound waves The sound waves are converted by the

telephone into electrical signals of the same frequency These signals are transmitted

without modification over the telephone line Hence the input signal g(#) and the

transmitted signal s(t) are identical The signal s(¢) will suffer some distortion over

the medium, so that r(r) wilt not be identical to s(1) Nevertheless, the signal r(t) is

converted back into a sound wave with no attempt at correction or improvement of

signal quality Thus, mm’ is not an exact replica of m However, the received sound

message is generally comprehensible to the listener

The discussion so far does not touch on other key aspects of data communica-

tions, including data link control techniques for controlling the flow of data and de-

tecting and correcting errors, and multiplexing techniques for transmission

efficiency All of these topics are explored in Part Two

“OMMUNICATION NETWORKING =

It is often impractical for two communicating devices to be directly, point-to-point

connected This is so for one (or both) of the following contingencies:

The devices are very far apart It would be inordinately expensive, for example,

to string a dedicated link between two devices thousands of kilometers apart

* There is a set of devices, each of which may require a link to many of the oth-

ers at various times Examples are all of the telephones in the world and all of the terminals and computers owned by a single organization Except for the case of a very few devices, it is impractical to provide a dedicated wire between each pair of devices

Trang 12

U3 / DATA COMMUNICATION NETWORKING 15

The solution to this probiem is to attach each device to a communication network There are two major categories into which communications networks are traditionally classified: wide area networks (WANs) and focal area networks (LANs) The distinction between the two, both in terms of technology and application, has become somewhat blurred in recent years, but it remains a useful way of organizing the discussion

Wide Area Networks

Wide area networks generally cover a large geographical area, require the crossing

of public right-of-ways, and rely at least in part on circuits provided by a common carrier Typically, a WAN consists of a number of interconnected switching nodes A transmission from any one device is routed through these internal nodes to the spec- ified destination device These nodes (including the boundary nodes) are not con- cerned with the content of the data; rather, their purpose is to provide a switching facility that will move the data from node to node until they reach their destination Traditionally, WANs have been implemented using one of two technologies: circuit switching and packet switching More recently, frame relay and ATM net- works have assumed major roles

Circuit Switching

In a circuit-switching network, a dedicated communications path is established between two stations through the nodes of the network That path is a connected se- quence of physical links between nodes On each link, a logical channel is dedicated

to the connection Data generated by the source station are transmitted along the dedicated path as rapidly as possible At each node, incoming data are routed or switched to the appropriate outgoing channel without delay The most common example of circuit switching is the telephone network

Packet Switching

A quite different approach is used in a packet-switching network In this case,

it is not necessary to dedicate transmission capacity along a path through the net- work Rather, data are sent out in a sequence of small chunks, called packets Each packet is passed through the network from node to nede along some path leading from source to destination At each node, the entire packet is received, stored briefly, and then transmitted to the next node, Packet-switching networks are com- monly used for terminal-to-computer and computer-to-computer communications Frame Relay

Packet switching was developed at a time when digital long-distance transmis- sion facilities exhibited a relatively high error rate compared to today’s facilities As

a result, there is a considerable amount of overhead built into packet-switching schemes to compensate for errors The overhead includes additional bits added to each packet to introduce redundancy and additional processing at the end stations and the intermediate switching nodes to detect and recover from errors

With modern high-speed telecommunications systems, this overhead is unnec- essary and counterproductive It is unnecessary because the rate of errors has been dramatically lowered and any remaining errors can easily be caught in the end sys- tems by logic that operates above the level of the packet-switching logic It is

Trang 13

16 CHAPTER 1 / DATA COMMUNICATIONS AND NETWORKING OVERVIEW

counterproductive because the overhead involved soaks up a significant fraction of

the high capacity provided by the network :

Frame relay was developed to take advantage of these high data rates and low

error rates, Whereas the original packet-switching networks were designed with a

data rate to the end user of about 64 kbps, frame relay networks are designed to op-

erate efficiently at user data rates of up to 2 Mbps The key to achieving these high

data rates is to strip out most of the overhead involved with error control

ATM

Asynchronous transfer mode (ATM), sometimes referred to as cell relay, is a

culmination of developments in circuit switching and packet switching ATM can be

viewed as an evolution from frame relay The most obvious difference between

frame relay and ATM is that frame relay uses variable-length packets, called frames,

and ATM uses fixed-length packets, called cells As with frame relay, ATM provides

little overhead for error control, depending on the inherent reliability of the trans-

mission system and on higher layers of logic in the end systems to catch and correct

errors By using a fixed packet length, the processing overhead is reduced even fur-

ther for ATM compared to frame relay The result is that ATM is designed to work

in the range of 10s and 100s of Mbps, and in the Gbps range

ATM can also be viewed as an evolution from circuit switching With circuit

switching, only fixed-data-rate circuits are available to the end system ATM allows

the definition of multiple virtual channels with data rates that are dynamically de-

fined at the time the virtual channel is created By using small, fixed-size cells, ATM

is so efficient that it can offer a constant-data-rate channel even though it is using a

packet-switching technique Thus, ATM extends circuit switching to allow multiple

channels with the data rate on each channel dynamically set on demand

Local Area Networks

As with WANs, a LAN is a communications network that interconnects a variety of

devices and provides a means for information exchange among those devices There

are several key distinctions between LANs and WANs:

1 The scope of the LAN is small, typically a single building or a cluster of build-

ings This difference in geographic scope leads to different technical solutions,

as we shail see

2 It is usually the case that the LAN is owned by the same organization that

owns the attached devices For WANS, this is less often the case, or at least a significant fraction of the network assets are not owned This has two implica- tions First, care must be taken in the choice of LAN, because there may be a substantial capital investment (compared to dial-up or leased charges for WANs) for both purchase and maintenance Second, the network management responsibility for a LAN falls solely on the user

3 The internal data rates of LANs are typically much greater than those of WANs

LANs come in a number of different configurations The most common are switched LANs and wireless LANs The most common switched LAN is a switched

Ethernet LAN, which may consist of a single switch with a number of attached

Trang 14

Wireless Networks

As was just mentioned, wireless LANs are common, being widely used in business environments Wireless technology is also common for both wide area voice and data networks Wireless networks provide advantages in the areas of mobility and ease of installation and configuration Chapters 14 and 17 deal with wireless WANs and LANs, respectively

Metropolitan Area Networks

As the name suggests,a MAN occupies a middle ground between LANs and WANs Interest in MANs has come about as a result of a recognition that the traditional point-to-point and switched network techniques used in WANs may be inadequate for the growing needs of organizations While frame relay and ATM promise to meet a wide range of high-speed needs, there is a requirement now for both private and public networks that provide high capacity at low costs over a large area A number of approaches have been implemented, including wireless networks and metropolitan extensions to Ethernet

The primary market for MANs is the customer that has high-capacity needs in

a metropolitan area A MAN is intended to provide the required capacity at lower cost and greater efficiency than obtaining an equivalent service from the local tele- phone company

Typically, an ISP will consist of a number of interconnected servers (only a single server is shown) connected to the Internet through a high-speed link One example of such a link is a SONET (synchronous optical network) line, described in Chapter 8 The Internet consists of a number of interconnected routers that span the globe The routers forward packets of data from source to destination through the Internet The lower portion of Figure {.3 shows a LAN implemented using a single Eth- ermnet switch This is a common configuration at a small business or other small

Trang 15

18 CHAPTER 1 / DATA COMMUNICATIONS AND NETWORKING OVERVIEW

Subscriber:

Residential (e.g., SONET)

provider (ISP}

Firewall host gi

LAN PCs and workstations

Private

Figure 13 A Networking Configuration

organization The LAN is connected to the Internet through a firewall host that pro-

vides security services In this example the firewall connects to the Internet through

an ATM network There is also a router off of the LAN hooked into a private WAN,

which might be a private ATM or frame relay network

A variety of design issues, such as signal encoding and error control, relate to the

links between adjacent elements, such as between routers on the Internet or between

switches in the ATM network, or between a subscriber and an ISP The internal structure

of the various networks (telephone, ATM, Ethernet) raises additional issues We will be

occupied in Parts Two through Four with the design features suggested by Figure 1.3

Trang 16

The Model Standardization within the OSI Framework Service Primitives and Parameters

The OSI Layers 2.4 The TCP/IP Protocol Architecture

The TCP/IP Layers TCP and UDP Operation of TCP and IP TCP/IP Applications Protocol Interfaces 2.5 Recommended Reading and Web Site 2.6 Key Terms, Review Questions, and Problems

Key Terms Review Questions Problems

Appendix 2A The Trivial File Transfer Protocol

Introduction to TFTP TFTP Packets Overview of a Transfer Errors and Delays Syntax, Semantics, and Timing

Trang 17

20

CHAPTER 2 / PROTOCOL ARCHPPEC TURE

KEY POINTS

A protocol} architecture is the layered structure of hardware and software

that supports the exchange of data between systems and supports distrib-

uted applications, such as electronic mail and file transfer

© Ateach layer of a protocol architecture, one or more common protocols are

: implemented in communicating systems Each protocol provides a set of

rules for the exchange of data between systems

© The most widely used protocol architecture is the TCP/IP protocol suite,

which consists of the following layers: physical, network access, internet,

transport, and application : : Loss

¢ Another important protocol architecture is the seven-layer Open Systems

Interconnection (OSI) model "

This chapter provides a context for the detailed material that follows It shows how

the concepts of Parts Two through Five fit into the broader area of computer net-

works and computer communications This chapter may be read in its proper se-

quence or it may be deferred until the beginning of Part Three, Four, or Five.!

We begin this chapter by introducing the concept of a layered protocol archi-

tecture and looking at a simple cxample Next, the chapter introduces the Open

Systems Interconnection (OSI) reference model OS] is a standardized architecture

that is often used to describe communications functions but that is now rarely im-

plemented We then examine the most important protocol architecture, the TCP/IP

protocol suite TCP/IP is an Internet-based concept and is the framework for devel-

oping a complete range of computer communications standards Virtually all com-

puter vendors now provide support for this architecture

When computers, terminals, and/or other data processing devices exchange data, the

procedures involved can be quite complex Consider, for example, the transfer of a

file between two computers There must be a data path between the two computers,

either directly or via a communication network But more is needed Typical tasks to

be performed include the following:

1 The source system must either activate the direct data communication path

or inform the communication network of the identity of the desired destina-

tion system

2 The source system must ascertain that the destination system is prepared to

receive data

3 The file transfer application on the source system must ascertain that the file

management program on the destination system is prepared to accept and

store the file for this particular user

The reader may find it heipful just to skim this chapter on a first reading and then reread it more care~

fully just before embarking on Part Five

Trang 18

2.2.7 A SIMPLE PROTOCOL ARCHITECTURE 21

4, If the file formats used on the two systems are incompatible, one or the other system must perform a format translation function

It is clear that there must be a high degree of cooperation between the two computer systems Instead of implementing the logic for this as a single module, the task is broken up into subtasks, each of which is implemented separately In a proto- col architecture, the modules are arranged in a vertical stack Each layer in the stack performs a related subset of the functions required to communicate with another system It relies on the next lower layer to perform more primitive functions and to conceal the details of those functions It provides services to the next higher layer Ideally, layers should be defined so that changes in one layer do not require changes

in other layers

Of course, it takes two to communicate, so the same set of layered functions must exist in two systems Communication is achieved by having the corresponding,

or peer, layers in two systems communicate The peer layers communicate by means

of formatted blocks of data that obey a set of rules or conventions known as a protocol The key features of a protocol are as follows:

¢ Syntax: Concerns the format of the data blocks

¢ Semantics: Includes control information for coordination and error handling

* Timing: Includes speed matching and sequencing

Appendix 2A provides a specific example of a protocol, the Internet standard Trivial File Transfer Protocol (TFTP)

"A SIMPLE PROTOCOL ARCHITECTURE

Having introduced the concept of a protocol, we can now introduce the concept of

a protocol architecture As an example, Figure 2.1 suggests the way in which a file transfer facility could be implemented Three modules are used A file transfer module could perform tasks 3 and 4 in the preceding list The two modules on the two systems exchange files and commands However, rather than requiring the file transfer module to deal with the details of actually transferring data and com- mands, the file transfer modules each rely on a communications service module This module is responsible for making sure that the file transfer commands and data are reliably exchanged between systems Among other things, this module would perform task 2 We observe that the nature of the exchange between systems

is independent of the nature of the network that interconnects them Therefore, rather than building details of the network interface into the communications ser- vice module, it makes sense to have a third module, a network access module, that performs task [ by interacting with the network

To summarize, the file transfer module contains all of the logic that is unique

to the file transfer application, such as transmitting passwords, file commands, and file records There is a need to transmil these files and commands reliably Howev-

er, the same sorts of reliability requirements are relevant to a variety of applications

Trang 19

22 CHAPTER 2 / PROTOCOL ARCHFFECTURE

Communications | een Communications-related messages Woe »| Communications i

Figure 2.1 A Simplified Architecture for File Trasfer

(e.g., electronic mail, document transfer) Therefore, a separate communications

service module that can be used by a variety of applications meets these require-

ments The communications service module is concerned with assuring that the

two computer systems are active and ready for data transfer and for keeping track

of the data that are being exchanged to assure delivery However, these tasks are

independent of the type of network that is being used Therefore, the logic for ac-

tually dealing with the network is placed in a separate network access module Ị That way, if the network to be used is changed, only the network access module is

affected

Thus, instead of a single module for performing communications there is a

structured set of modules that implements the communications function That struc-

ture is referred to as a protocol architecture An analogy might be useful at this

point Suppose an executive in office X wishes to send a document to an executive in

office Y The executive in X prepares the document and perhaps attaches a note

This corresponds to the actions of the file transfer application in Figure 2.1 Then the

executive in X hands the document to a secretary or administrative assistant (AA)

The AA in X puts the document in an envelope and puts Y’s address and X’s return

address on the outside Perhaps the envelope is also marked “confidential.” The

AA’s actions correspond to the communications service module in Figure 2.1 The

AA in X then gives the package to the shipping department Someone in the ship-

ping department decides how to send the package: mail, UPS, or express courier

The shipping department attaches the appropriate postage or shipping documents

to the package and ships it out The shipping department corresponds to the net-

work access module of Figure 2.1 When the package arrives at Y, a similar layered

set of actions occurs The shipping department at Y receives the package and deliv-

ers it to the appropriate AA or secretary based on the name on the package The

AA opens the package and hands the enclosed document to the executive to whom

Trang 20

2.2 / A SIMPLE PROTOCOL ARCHITECTURE 23

A Three-Layer Model

In very general terms, communications can be said to involve three agents: applica- tions, computers, and networks Applications execute on computers that typically support multiple simultaneous applications Computers are connected to networks, and the data to be exchanged are transferred by the network from one computer to another Thus, the transfer of data from one application to another involves first get- ting the data to the computer in which the application resides and then getting it to the intended application within the computer

With these concepts in mind, it appears natural to organize the communica- tion task into three relatively independent layers: network access layer, transport layer, and application layer

The network access layer is concerned with the exchange of data between a computer and the network to which it is attached The sending computer must pro- vide the network with the address of the destination computer, so that the network may route the data to the appropriate destination The sending computer may wish

to invoke certain services, such as priority, that might be provided by the network, The specific software used at this layer depends on the type of network to be used; different standards have been developed for circuit switching, packet switching, LANs, and others Thus, it makes sense to separate those functions having to do with network access into a separate layer By doing this, the remainder of the communi- cations software, above the network access layer, need not be concerned about the specifics of the network to be used The same higher-layer software should function properly regardless of the particular network to which the computer is attached Regardless of the nature of the applications that are exchanging data, there is usually a requirement that data be exchanged reliably That is, we would like to be assured that all of the data arrive at the destination application and that the data ar- rive in the same order in which they were sent As we shall see, the mechanisms for providing reliability are essentially independent of the nature of the applications Thus, it makes sense to collect those mechanisms in a common layer shared by alf applications; this is referred to as the transport layer

Finally, the application layer contains the logic needed to support the various user applications For each different type of application, such as file transfer, a sepa- rate module is needed that is peculiar to that application

Figures 2.2 and 2.3 illustrate this simple architecture Figure 2.2 shows three computers connected to a network Each computer contains software at the net- work access and transport layers and software at the application layer for one or more applications For successful communication, every entity in the overall system must have a unique address Actually, two levels of addressing are needed Each computer on the network must have a unique network address; this allows the net- work to deliver data to the proper computer Each application on a computer must have an address that is unique within that computer; this allows the transport layer

to support multiple applications at each computer These latter addresses are known

as service access points (SAPs), or ports, connoting the fact that each application is individually accessing the services of the transport layer

Figure 2.3 indicates that modules at the same level on different computers communicate with each other by means of a protocol Let us trace a simple opera- tion Suppose that an application, associated with SAP { at computer X, wishes

Trang 21

24) CHAPTER 2 / PROTOCOI ARCHITECTURE 7

’ network Network ‘access

Network access protocol

Network access protocol

Figure 2.3 Protocols in a Simplified Architecture

to send a message to another application, associated with SAP 2 at computer Y The

application at X hands the message over to its transport layer with instructions to

send it to SAP 2 on computer Y The transport layer hands the message over to the

network access layer, which instructs the network to send the message to computer

Y Note that the network need not be told the identity of the destination service

access point All that it needs to know is that the data are intended for computer Y

Trang 22

2.2 / A SIMPLE PROTOCOL ARCHITECTURE 25

Figure 2.4 Protocol Data Units

To control this operation, controt information, as well as user data, must be transmitted, as suggested in Figure 2.4 Let us say that the sending application gen- erates a block of data and passes this to the transport layer The transport layer may break this block into two smaller pieces to make it more manageable To each of these pieces the transport layer appends a transport header, containing protocol control information The combination of data from the next higher tayer and control information is known as a protocol data unit (PDU); in this case, it is referred to as

a transport PDU The header in each transport PDU contains control information

to be used by the peer transport protocol at computer B Examples of items that may be stored in this header include the following:

* Destination SAP: When the destination transport layer receives the transport PDU, it must know to whom the data are to be delivered

* Sequence number: Because the transport protocol is sending a sequence of PDUs, it numbers them sequentially so that if they arrive out of order, the des- tination transport entity may reorder them

* Error-detection code: The sending transport entity may include a code that

is a function of the contents of the remainder of the PDU The receiving trans- port protocol performs the same calculation and compares the result with the incoming code A discrepancy results if there has been some error in trans- mission In that case, the receiver can discard the PDU and take corrective action

The next step is for the transport layer to hand each PDU over to the network layer, with instructions to transmit it to the destination computer To satisfy this request, the network access protocol must present the data to the network with a request for transmission As before, this operation requires the use of control infor- mation In this case, the network access protocol appends a network access header

Trang 23

26 CHAPTER 2 / PROTOCOL ARCHITECTURE

Figure 2.5 Operation of a Protocol Architecture

to the data it receives from the transport layer, creating a network access PDU Ex-

amples of the items that may be stored in the header include the following:

* Destination computer address: The network must know to whom (which com-

puter on the network) the data are to be delivered

* Facilities requests: The network access protocol might want the network to

make use of certain facilities, such as priority

Figure 2.5 puts all of these concepts together, showing the interaction be-

tween modules to transfer one block of data Let us say that the file transfer mod-

ule in computer X is transferring a file one record at a time to computer Y Each

record is handed over to the transport layer module We can picture this action as

being in the form of a command or procedure call The arguments of this procedure

call include the destination computer address, the destination service access point,

and the record The transport layer appends the destination service access point

and other control information to the record to create a transport PDU This is then

handed down to the network access layer by another procedure call In this case,

the arguments for the command are the destination computer address and the

transport PDU The network access layer uses this information to construct a net-

work PDU The transport PDU is the data field of the network PDU, and the

network PDU header includes information concerning the source and destination

computer addresses Note that the transport header is not “visible” at the network

access layer; the network access layer is not concerned with the contents of the

transport PDU

The network accepts the network PDU from X and delivers it to Y The net-

work access module in Y receives the PDU, strips off the header, and transfers the

enclosed transport PDU to Y’s transport layer module The transport layer exam-

ines the transport PDU header and, on the basis of the SAP field in the header, de-

livers the enclosed record to the appropriate application, in this case the file transfer

module in Y

Ệ :

§

Trang 24

OSI

2.3 / OS! 27 Standardized Protocol Architectures

When communication is desired among computers from different vendors, the soft- ware development effort can be a nightmare Different vendors use different data formats and data exchange protocols Even within one vendor's product line, differ- ent model computers may communicate in unique ways

As the use of computer communications and computer networking prolifer- ates, a one-at-a-time special-purpose approach to communications software devel- opment is too costly to be acceptable The only alternative is for computer vendors

to adopt and implement a common set of conventions For this to happen, standards are needed Such standards would have two benefits:

* Vendors feel encouraged to implement the standards because of an expecta- tion that, because of wide usage of the standards, their products would be less marketable without them

« Customers are in a position to require that any vendor wishing to propose equipment to them implement the standards :

Two protocol architectures have served as the basis for the development of in- teropéerable protocol standards: the TCP/IP protocol suite and the OST reference model TCP/IP is by far the most widely used interoperable architecture OSI, though well known, has never lived up to its early promise There is also a widely used proprietary scheme: IBM’s System Network Architecture (SNA) The remain- der of this chapter looks at OSI and TCP/IP

Standards are needed to promote interoperability among vendor equipment and to encourage economies of scale Because of the complexity of the communications task, no single standard will suffice Rather, the functions should be broken down into more manageable parts and organized as a communications architecture The architecture would then form the framework for standardization This line of rea- soning led the International Organization for Standardization (ISO) in 1977 to es- tablish a subcommittee to develop such an architecture The result was the Open Systems Interconnection (OSI) reference model Although the essential elements

of the model were in place quickly the final ISO standard, ISO 7498, was not pub- lished until 1984 A technically compatible version was issued by CCITT (now ITU-T)

as X.200

The Model

A widely accepted structuring technique, and the one chosen by ISO, is layering The communications functions are partitioned into a hierarchical set of layers Each layer performs a related subset of the functions required to communicate with an- other system It relies on the next lower layer to perform more primitive functions and to conceal the details of those functions {t provides services to the next higher

Trang 25

28 CHAPTER 2 / PROTOCOL ARCHFEECTURE

layer Ideally, the layers should be defined so that changes in one layer do not re-

quire changes in the other layers Thus, we have decomposed one problem into a

number of more manageable subproblems

The task of ISO was to define a set of layers and the services performed by

each layer The partitioning should group functions logically and should have

enough layers to make each layer manageably small, but should not have so many

layers that the processing overhead imposed by the collection of layers is burden-

some The principles that guided the design effort are summarized in Table 2.1

The resulting reference model has seven layers, which are listed with a brief defin-

ition in Figure 2.6, Table 2.2 provides 1SO’s justification for the selection of these

layers

Figure 2.7 illustrates the OSI architecture Each system contains the seven lay-

ers Communication is between applications in the two computers, labeled applica-

tion X and application Y in the figure if application X wishes to send a message to

application Y, it invokes the application layer (layer 7) Layer 7 establishes a peer re-

lationship with layer 7 of the target computer, using a layer-7 protocol (application

protocol) This protocol requires services from layer 6, so the two layer-6 entities use

Table 2.1 Principles Used in Defining the OSI Payers {X 200)

1 Do nọt create so many layers as to mak

_ erating the layers more difficult than

formed or the technology involved: ’

Collect similar functions i

Nee bypassing ( of Sublayer&

Trang 26

23/081 29

Figure 2.6 The OSI Layers

a protocol of their own, and so on down to the physical layer, which actually trans- mits bits over a transmission medium

Note that there is no direct communication between peer layers except at the physical layer That is, above the physical layer, each protocol entity sends data down to the next lower layer to get the data across to its peer entity Even at the physical layer, the OS{ model does not stipulate that two systems be directly con- nected For example, a packet-switched or circuit-switched network may be used to provide the communication link

Figure 2.7 also highlights the use of protocol data units (PDUs) within the OSI architecture First, consider the most common way in which protocols are realized When application X has a message to send to application Y, it transfers those data to

an application entity in the application layer A header is appended to the data that

Trang 27

30) CHAPTER 2 / PROTOCOL ARCHEPEC “TURE i

Table 2.2 Justification of the OSE Layers (X.200) i

1 It is essential that the architecture permits usage of a realistic varicty of physical media

for interconnection with different contro! procedures (for example, V.24, V.25, etc.) Ap-

Plication of principles 3, 5, and 8 (Table 2.1) teads to identification of a physical layer as

the lowest layer in the architecture

2 Some physical communication media (for example, telephone line) Tequire.specific tech- : niques to be used in order to transmit data between systems despite a relatively high error Ệ rate (i.¢., an error rate not acceptable for the great majority of applications) These specific 2 techniques are used in data link control procedures, which have been studied and standard: i ized for a number of years It must also be recognized that new physical communication

media (for example, fiber optics) will require different data link control procedures Applica-

tion of principles 3, 5, and 8 leads to identification of a data tink layer on top.of the physical

3 In the open systems architecture, some open systems will act as the final destination of data,

Some open systems may act only as intermediate nodes (forwarding data to other systems)

Application of principles 3,5, and 7 leads to identification of a network layer on top of the data © |

link layer Network-oriented protocols such as routing, for examiple, wit! be grouped in this `

layer Thus, the network layer will provide a connection path (network connection) b :

a pair of transport entities, including the case where intermediate © nodes are involved

: part’ of the architecture is the transport layer, on n top of the network

: ‘Telieves higher-layer entities from any concer with the transport

6 The remaining set of general interest functions are those = reinted to representation and ma- ,

nipulation of structured data for the benefit of application programs Application of princi-

¿ ples3 and Aleads to the identification af a presentation layer on ton of the.session layer

Finally, there are applications consisting of application processes that

processing, An aspect of these application processes and thể protdcol š

¡ mahicate, comprise the application layer as the highest layer of the:

contains the required information for the peer layer 7 protocol (encapsulation) The

original data plus the header are now passed as a unit to layer 6 The presen-

tation entity treats the whole unit as data and appends its own header (a second

encapsulation) This process continues down through layer 2, which generally adds

both a header and a trailer This layer 2 unit, called a frame, is then passed onto the

transmission medium by the physical layer When the frame is received by the target

system, the reverse process occurs As the data ascend, each layer strips off the out-

ermost header, acts on the protocol information contained therein, and passes the

remainder up to the next layer

At each stage of the process, a layer may segment the data unit it receives from

the next higher layer into several parts, to accommodate its own requirements

These data units must then be reassembled by the corresponding peer layer before

being passed up

avi

Trang 28

23/OSL 31 Outgoing n Ấgicmon 39 — đấmaum PDU construction Incoming

Figure 2.7 The OS! Environment

Standardization within the OSI Framework’

The principal motivation for the development of the OSI model was to provide a framework for standardization Within the model, one or more protocol stan- dards can be developed at each Jayer The model defines in general terms the functions to be performed at that layer and facilitates the standards-making process in two ways:

* Because the functions of each layer are well defined, standards can be devel-

oped independently and simultaneously for each layer This speeds up the standards-making process

* Because the boundaries between layers are well defined, changes in standards

in one layer need not affect already existing software in another layer This makes it easier to introduce new standards

"The concepts introduced in this subsection apply as well to the TCP/P architecture

Trang 29

32 CHAPTER 2 / PROTOCOL ARCHITECTURE

Layer 7 (Application)

layer N+ 1

function Decompose es ý layer N

Figure 2.8 The OSI] Architecture as a Framework for Standardization

Figure 2.8 illustrates the use of the OSI model as such a framework The over-

all communications function is decomposed into seven distinct layers, using the

principles outlined in Table 2.1 These principles essentially amount to using modu-

lar design That is, the overall function is broken up into a number of modules, mak-

ing the interfaces between modules as simple as possible In addition, the design

principle of information hiding is used: Lower layers are concerned with greater

levels of detail; upper layers are independent of these details Each layer provides

services to the next higher layer and implements a protocol to the peer layer in

other systems

Figure 2.9 shows more specifically the nature of the standardization required

at each layer Three elements are Key:

* Protocol specification: Two entities at the same layer in different systems

cooperate and interact by means of a protocol Because two different open sys-

tems are involved, the protocol must be specified precisely This includes

the format of the protocol data units exchanged, the semantics of all fields, and

the allowable sequence of PDUs

* Service definition: In addition to the protocol or protocols that operate at a

given layer, standards are needed for the services that each layer provides to

the next higher layer Typically, the definition of services is equivalent to a

functional description that defines what services are provided, but not how the

services are to be provided š

Trang 30

2.3/7 O8t 33

Service definition (functional description

(service access point)

Figure 2.9 Layer-Specific Standards

* Addressing: Each layer provides services to entities at the next higher layer These entities are referenced by means of a service access point (SAP) Thus,

a network service access point (NSAP) indicates a transport entity that is a user of the network service

The need to provide a precise protocol specification for open systems is self- evident The other two items listed warrant further comment With respect to service definitions, the motivation for providing only a functional definition is as follows First, the interaction between two adjacent layers takes place within the confines of

a single open system and is not the concern of any other open system Thus, as long

as peer layers in different systems provide the same services to their next higher layers, the details of how the services are provided may differ from one system to another without loss of interoperability Second, it will usuaily be the case that adja- cent layers are implemented on the same processor In that case, we would like to leave the system programmer free to exploit the hardware and operating system to provide an interface that is as efficient as possible

With respect to addressing, the use of an address mechanism at each layer, im- plemented as a service access point, allows each layer to multiplex multiple users from the next higher layer Multiplexing may not occur at each layer, but the model allows for that possibility

Service Primitives and Paraineters

The services between adjacent layers in the OSI architecture are expressed in terms

of primitives and parameters A primitive specifies the function to be performed, and the parameters are used to pass data and control information The actual form

of a primitive is implementation dependent An example is a procedure call.

Trang 31

34) CHAPTER 2 / PROTOCOL ARCHIFECTURE ị

Table 2.3 Service Primitive Types

REQUEST A primitive issued by a service uscr to invoke some service and to pass the para-

⁄ meters needed to specify fully the requested service

INDICATION _ A primitive issued by a service provider cither to

1 indicate that a procedure has been invoked by the peer service user on the connection and to provide the associated parameters, or

2 notify the service user of a provider-initiated action

“RESPONSE A primitive issued by a service user to acknowledge or complete some procedure

" 5; ”.:`_ p£eviousty invoked by an indication to that user

CONFIRM A primitive issued by a service provider to acknowledge or complete some proce-

: : dure previously invoked by a request by the service user’

Four types of primitives are used in standards to define the interaction be-

tween adjacent layers in the architecture (X.210) These are defined in Table 2.3

The layout of Figure 2.10a suggests the time ordering of these events For example,

consider the transfer of data from an (N) entity to a peer (N) entity in another sys-

tem The following steps occur:

1, The source (N) entity invokes its (N — 1) entity with a request primitive

Associated with the primitive are the parameters needed, such as the data to

be transmitted and the destination address

2 The source (N — 1) entity prepares an (N — 1) PDU to be sent to its peer

(N — 1) entity

3 The destination (N — 1) entity delivers the data to the appropriate destina- : tion (N) entity via an indication primitive, which includes the data and source

address as parameters

4 Ifan acknowledgment is called for, the destination (NV) entity issues a response

primitive to its (N — 1) entity

Trang 32

23/081 35

5 The (N — 1) entity conveys the acknowledgment in an (N — 1) PDU

6 The acknowledgment is delivered to the (N) entity as a confirm primitive This sequence of events is referred to as a confirmed service, as the initiator receives confirmation that the requested service has had the desired effect at the other end If only request and indication primitives are involved (corresponding to steps 1 through 3), then the service dialogue is a nonconfirmed service; the initiator receives no confirmation that the requested action has taken place (Figure 2.10b)

The OSI Layers

In this section we discuss briefly each of the layers and, where appropriate, give ex- amples of standards for protocols at those layers

Physical Layer

The physical layer covers the physical interface between devices and the rules

by which bits are passed from one to another The physical layer has four important characteristics:

¢ Mechanical: Relates to the physical properties of the interface to a transmis- sion medium Typically, the specification is of a pluggable connector that joins one or more signal conductors, called circuits

* Electrical: Relates to the representation of bits (e.g., in terms of voltage levels) and the data transmission rate of bits

¢ Functional: Specifies the functions performed by individual circuits of the physical interface between a system and the transmission medium

* Procedural: Specifies the sequence of events by which bit streams are exchanged across the physical medium

Physical layer protocols are discussed in some detail in Chapter 6 Examples of standards at this layer are ELA-232-F and portions of wireless and LAN standards Data Link Layer

Whereas the physical layer provides only a raw bit siream service, the data link layer attempts to make the physical link reliable and provides the means to activate, maintain, and deactivate the link The principal service provided by the data link layer

to higher layers is that of error detection and control Thus, with a fully functional data link layer protocol, the next higher layer may assume error-free transmission over the link However, if communication is between two systems that are not directly connect-

ed, the connection will comprise a number of data links in tandem, each functioning in- dependently Thus, the higher layers are not relieved of an error control responsibility Chapter 7 is devoted to data link protocols, Examples of standards at this layer are HDLC and LLC

Network Layer

The network layer provides for the transfer of information between end sys- tems across some sort of communications network, It relieves higher layers of the need to know anything about the underlying data transmission and switching

Trang 33

36 CHAPTER 26 PROPOCOL ARCIN TLC EUR

technologies used to connect systems At this layer, the computer system engages in

a dialogue with the network to specify the destination address and to request certain

network facilities, such as priority

There is a spectrum of possibilities for intervening communications facilities ‘

to be managed by the network layer At one extreme, there is a direct point-to-point i link between stations In this case, there may be no need for a network layer because

the data tink layer can perform the necessary tunction of managing the link

Next, the systems could be connected across a single network, such as a cir-

cuit-switching or packet-switching network As an example, the packet level of the

X.25 standard is a network layer standard for this situation Figure 2.11 shows how

the OSI architecture accommodates the presence of a network The lower three

layers are concerned with attaching to and communicating with the network The

packets that are created by the end system pass through one or more network

nodes that act as relays between the two end systems The network nodes imple-

ment layers 1 through 3 of the architecture In the figure, two end systems are con-

nected through a single network node Layer 3 in the node performs a switching

and routing function Within the node, there are two data tink layers and two phys-

ical layers, corresponding to the links to the two end systems Each data link (and

physical) layer operates independently to provide service to the network layer over

its respective link The upper four layers are “end-to-end” protocols between the

attached end systems

At the other extreme, two end systems might wish to communicate but are not

even connected to the same network Rather, they are connected to networks that,

7 “~~——~——~——- Application-l pplication-layer protocol -— — — —~ —~ -~ ~~ —>] i 7 i

Trang 34

23/ 0st 37 directly or indirectly, are connected to each other This case requires the use of some sort of internetworking technique; we explore this approach in Chapter 18

Transport Layer

The transport layer provides a mechanism for the exchange of data between end systems The connection-oriented transport service ensures that data are deliv- ered error free, in sequence, with no losses or duplications The transport layer may also be concerned with optimizing the use of network services and providing a re- quested quality of service to session entities For example, the session entity may specify acceptable error rates, maximum delay, priority, and security

The size and complexity of a transport protocol depend on how reliable or un- reliable the underlying network and network layer services are Accordingly, ISO has developed a family of five transport protocol standards, each oriented toward a different underlying service In the TCP/IP protocol suite, there are two common transport-layer protocols: the connection-oriented TCP (Transmission Control Protocol) and the connectionless UDP (User Datagram Protocol)

Session Layer

The lowest four layers of the OSI model provide the means for the reliable ex- change of data and may provide various quality of service options For some appli- cations, this basic service is insufficient For example, a remote terminal access application might require a half-duplex dialogue A transaction-processing applica- tion might require checkpoints in the data transfer stream to permit backup and re- covery A message-processing application might require the ability to interrupt a dialogue to prepare a new portion of a message and later to resume the dialogue where it was left off

All these capabilities could be embedded in specific applications at layer 7 However, because these types of dialogue-structuring tools have widespread ap- plicability, it makes sense to organize them into a separate layer: the session layer

The session layer provides the mechanism for controlling the dialogue be- tween applications in end systems In many cases, there will be little or no need for session-layer services, but for some applications, such services are used The key ser- vices provided by the session layer include the following:

» Dialogue discipline: This can be two-way simultancous (full duplex) or two- way alternate (half duplex)

* Grouping: The flow of data can be marked to define groups of data For exam- ple, if a retail store is transmitting sales data to a regional office, the data can

be marked to indicate the end of the sales data for each department This would signal the host computer to finalize running totals for that department and start new running counts for the next department

¢ Recovery: The session layer can provide a checkpointing mechanism, so that

if a failure of some sort occurs between checkpoints, the session entity can retransmit all data since the last checkpoint.

Trang 35

38

CHAPTER 2 / PROTOCOL ARCHTFECEURA

ISO has issued a standard for the session layer that includes, as options, services

such as those just described

Presentation Layer

The presentation layer defines the format of the data to be exchanged be-

tween applications and offers application programs a set of data transformation ser-

vices The presentation layer defines the syntax used between application entities

and provides for the selection and subsequent modification of the representation

used Examples of specific services that may be performed at this layer include data

compression and encryption

Application Layer

The application layer provides a means for application programs to access the

OSI environment This layer contains management functions and generally useful

mechanisms to support distributed applications In addition, general-purpose appli-

cations such as file transfer, electronic mail, and terminal access to remote comput-

ers are considered to reside at this layer

THE TCP/IP PROTOCOL ARCHITECTURE

The TCP/IP protocol architecture is a result of protocol research and development

conducted on the experimental packet-switched network, ARPANET, funded by

the Defense Advanced Research Projects Agency (DARPA) and is generally re-

ferred to as the TCP/IP protocol suite This protocol suite consists of a large collec-

tion of protocols that have been issued as Internet standards by the Internet

Architecture Board (IAB)

The TCP/IP Layers

The TCP/IP model organizes the communication task into five relatively indepen-

dent layers:

Physical layer

Network access layer

Internet layer Host-to-host, or transport layer

* Application layer

The physical layer covers the physical interface between a data transmission device (e.g., workstation, computer) and a transmission medium or network This

layer is concerned with specifying the characteristics of the transmission medium,

the nature of the signals, the data rate, and related matters

Trang 36

2.4 / THE TCP/IP PROTOCOL ARCHITECTURE 39

The network access layer is concerned with the exchange of data between an end system (server, workstation, etc.) and the network to which it is attached The sending computer must provide the network with the address of the destination computer, so that the network may route the data to the appropriate destination The sending computer may wish to invoke certain services, such as priority, that might be provided by the network The specific software used at this layer de- pends on the type of network to be used; different standards have been developed for circuit switching, packet switching (e.g., frame relay), LANs (e.g., Ethernet), and others Thus it makes sense to separate those functions having to do with net- work access into a separate layer By doing this, the remainder of the communica- tions software, above the network access layer, need not be concerned about the specifics of the network to be used The same higher-layer software should func- tion properly regardless of the particular network to which the computer is attached

The network access layer is concerned with access to and routing data across a network for two end systems attached to the same network In those cases where two devices are attached to different networks, procedures are needed to allow data

to traverse multiple interconnected networks This is the function of the internet layer The Internet Protocol (TP) is used at this layer to provide the routing function across multiple networks This protocol is implemented not only in the end systems but also in routers A router is a processor that connects two networks and whose primary function is to relay data from one network to the other on its route from the source to the destination end system

Regardless of the nature of the applications that are exchanging data, there is usually a requirement that data be exchanged reliably That is, we would like to be assured that all of the data arrive at the destination application and that the data ar- rive in the same order in which they were sent As we shall see, the mechanisms for providing reliability are essentially independent of the nature of the applications Thus, it makes sense to collect those mechanisms in a common layer shared by all applications; this is referred to as the host-to-host layer, or transport layer The Transmission Control Protocol (TCP) is the most commonly used protocol to pro- vide this functionality

Finally, the application layer contains the logic needed to support the various user applications For cach different type of application, such as file transfer, a sepa- rate module is needed that is peculiar to that application

Figure 2.12 illustrates the layers of the TCP/IP and OSI architectures, showing roughly the correspondence in functionality between the two

Trang 37

40 CHAPYPER 2 7 PROPOCOE ARCTHERCTOURE

TCP entities A logical connection refers to a given pair of port values For the du-

ration of the connection each entity keeps track of TCP segments coming and going

to the other entity, in order to regulate the flow of segments and to recover from

lost or damaged segments

{n addition to TCP, there is one other transport-level protocol that is in com-

mon use as part of the TCP/IP protocol suite: the User Datagram Protocol (UDP)

UDP does not guarantee delivery, preservation of sequence, or protection against

duplication UDP enables a procedure to send messages to other procedures with a

minimum of protocol mechanism Some transaction-oriented applications make use

of UDP; one example is SNMP (Simple Network Management Protocol), the stan-

dard network management protocol for TCP/IP networks Because it is connection-

less, UDP has very little to do Essentially, it adds a port addressing capability to IP

Operation of TCP and IP

Figure 2.13 indicates how these protocols are configured for communications To

make clear that the total communications facility may consist of multiple networks,

the constituent networks are usually referred to as subnetworks Some sort of net-

work access protocol, such as the Ethernet logic, is used to connect a computer to a

subnetwork This protocol enables the host to send data across the subnetwork to

another host or, if the target host is on another subnetwork, to a router that will for-

ward the data IP is implemented in all of the end systems and the routers It acts as

a relay to move a block of data from one host, through one or more routers, to an-

other host TCP is implemented only in the end systems; it keeps track of the blocks

of data to assure that ali are delivered reliably to the appropriate application

Trang 38

Logical connection

2 Global network FT” address

Figure 2.13 TCP/IP Concepts

For successful communication, every entity in the overall system must have a unique address Actually, two levels of addressing are needed Each host on a sub- network must have a unique global internet address; this allows the data to be deliv- ered to the proper host Each process with a host must have an address that is unique within the host; this allows the host-to-host protocol (TCP) to deliver data to the proper process These latter addresses are known as ports

Let us trace a simple operation Suppose that a process, associated with port 1

at host A, wishes to send a message to another process, associated with port 3 at host

B The process at A hands the message down to TCP with instructions to send it to host B, port 2 TCP hands the message down to IP with instructions to send it to host

B Note that IP need not be told the identity of the destination port All it needs to know is that the data are intended for host B Next, IP hands the message down to the network access layer (e.g., Ethernet logic) with instructions to send it to router J (the first hop on the way to B)

To control this operation, control information as well as user data must be transmitted, as suggested in Figure 2.14 Let us say that the sending process gener- ates a block of data and passes this to TCP TCP may break this block into smaller pieces to make it more manageable To each of these pieces, TCP appends control information known as the TCP header, forming a TCP segment The control infor- mation is to be used by the peer TCP protocol entity at host B Examples of items in this header include the following:

Trang 39

42 CHAPTER 2 / PROTOCOL ARCHITECTURE

Application User data

Figure 2.14 Protocol Data Units in the TCP/IP Architecture

¢ Destination port: When the TCP entity at B receives the segment, it must

know to whom the data are to be delivered

* Sequence number: TCP numbers the segments that it sends to a particular

destination port sequentially, so that if they arrive out of order, the TCP entity

at B can reorder them

* Checksum: The sending TCP includes a code that is a function of the contents

of the remainder of the segment The receiving TCP performs the same calcu-

lation and compares the result with the incoming code A discrepancy results

if there has been some error in transmission

Next, TCP hands each segment over to IP, with instructions to transmit it to B

These segments must be transmitted across one or more subnetworks and relayed

through one or more intermediate routers This operation, too, requires the use of

control information Thus IP appends a header of control information to each seg-

ment to form an IP datagram An example of an item stored in the IP header is the

destination host address (in this example, B)

Finally, each IP datagram is presented to the network access layer for trans-

mission across the first subnetwork in its journey to the destination The network ac-

cess layer appends its own header, creating a packet, or frame The packet is

transmitted across the subnetwork to router J The packet header contains the infor-

mation that the subnetwork needs to transfer the data across the subnetwork Ex-

amples of items that may be contained in this header include the following:

* Destination subnetwork address: The subnetwork must know to which

attached device the packet is to be delivered

* Facilities requests: The network access protocol might request the use of cer-

tain subnetwork facilities, such as priority

Trang 40

2.4 / THE TCP/IP PROTOCOL ARCHITECTURE 43

At router J, the packet header is stripped off and the IP header examined On the basis of the destination address information in the IP header, the IP module in the router directs the datagram out across subnetwork 2 to B To do this, the data- gram is again augmented with a network access header

When the data are received at B, the reverse process occurs At each layer, the corresponding header is removed, and the remainder is passed on to the next high-

er layer, until the original user data are delivered to the destination process

As an aside, the generic name for a block of data exchanged at any protocol level is referred to as a protocol data unit (PDU) Thus, a TCP segment is a TCP PDU

The File Transfer Protocol (FTP) is used to send files from one system to an- other under user command Both text and binary files are accommodated, and the protocol provides features for controlling user access When a user wishes to engage

in file transfer, FTP sets up a TCP connection to the target system for the exchange of control messages This connection allows user ID and password to be transmitted and allows the user to specify the file and file actions desired Once a file transfer is ap- proved, a second TCP connection is set up for the data transfer The file is transferred over the data connection, without the overhead of any headers or control informa- tion at the application level When the transfer is complete, the control connection is used to signal the completion and to accept new file transfer commands

TELNET provides a remote logon capability, which enables a user at a termi- nal or personal computer to logon to a remote computer and function as if directly connected to that computer The protocol was designed to work with simple scroll- mode terminals TELNET is actually implemented in two modules: User TELNET interacts with the terminal I/O module to communicate with a local terminal It con- verts the characteristics of real terminals to the network standard and vice versa Server TELNET interacts with an application, acting as a surrogate terminal han- dier so that remote terminals appear as local to the application Terminal traffic between User and Server TELNET is carried on a TCP connection

Protocol Interfaces

Each layer in the TCP/IP protocol suite interacts with its immediate adjacent layers

At the source, the application layer makes use olf the services of the end-to-end layer and provides data down to that layer A similar relationship exists at the interface of

Ngày đăng: 13/09/2012, 10:21

TỪ KHÓA LIÊN QUAN

w