Download Computer Science 171L

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Wireless security wikipedia , lookup

Zigbee wikipedia , lookup

Net bias wikipedia , lookup

Distributed firewall wikipedia , lookup

Zero-configuration networking wikipedia , lookup

RapidIO wikipedia , lookup

Multiprotocol Label Switching wikipedia , lookup

CAN bus wikipedia , lookup

Airborne Networking wikipedia , lookup

Network tap wikipedia , lookup

Piggybacking (Internet access) wikipedia , lookup

List of wireless community networks by region wikipedia , lookup

Computer network wikipedia , lookup

Serial digital interface wikipedia , lookup

Asynchronous Transfer Mode wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Wake-on-LAN wikipedia , lookup

Deep packet inspection wikipedia , lookup

Packet switching wikipedia , lookup

Internet protocol suite wikipedia , lookup

IEEE 1355 wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

UniPro protocol stack wikipedia , lookup

Transcript
Prof. M. Gerla & R. Dzhanidze. CS 117 Class. Ch.2a
1
Chapter 2a
Introduction to Computer Communications
and
Networking
1. Communication Link
2. General Definition
3. Example of Computer Communication
Systems
4. Networking
a. Telephone Network
b. Computer Networks
c. Cable Television
d. Wireless Networks.
5. Communication Standards
6. OSI/RM
7. Layer Descriptions
8. The TCP/IP Reference Model
a. Protocol Hierarchies
b. Internet Layer
c. Transport Layer
d. Application Layer
e. Host-to-Network Layer
9. Packet Switching and Circuit Switching
10. Connection-oriented and Connectionless
Services
Reference:
“Computer Networks”, Andrew S. Tanenbaum, pg. 1-84.
Prof. M. Gerla & R. Dzhanidze. Class CS 117. Ch. 2a
1.
2
Communication Link
The goal of a communication is to transmit information from a source to a
destination. The diagram in Figure 1 shows the steps in transmitting information.
At each stage, the form of the signal may change, but the information should still
be contained within the signal.
1
2
3
4
5
6
Input
Information
Input Data
or Signal
Transmitted
Signal
Received
Signal
Output Data
or Signal
Output
Information
1
Input
Device
2
Transmitter
Source System
3 Transmission 4
Medium
5
Receiver
Output
Device
6
Destination System
Figure 1. Block diagram of a general communication system.
For instance, a voice radio system receives voice information at stage 1. A
microphone changes it to an electrical signal at stage 2, and the radio transmitter
modulates this signal with a carrier signal at stage 3. The transmitted signal
experiences attenuation and interference while in the transmission medium, so the
received signal at stage 4 will not be identical to the transmitted signal. The
receiver demodulates the signal at stage 5, and a speaker converts this electrical
signal at stage 6. In a successful communication system, the output signal will
carry the same information as the input signal.
2.
General Definitions
Information is the meaning that a human being assigns to data by means of the
conventions applied to those data.
Data is a representation of facts, concepts, or instructions in a formalized manner
suitable for communication, interpretation, or processing by human beings or by
automatic means. In other words, data conveys meaning.
Prof. M. Gerla & R. Dzhanidze. Class CS 117. Ch. 2a
3
Signals are the physical encoding of data, whether by material, electric, or
electromagnetic means. Signals can be analog (continuous in time and amplitude),
discrete (discrete in time, continuous in amplitude), or digital (discrete in time and
amplitude).
An analog signal is a continuously varying signal. For example, voice is an analog
signal, a continuously varying pattern of compression waves in frequencies from
20 to 20,000 Hz.
A discrete signal is a sequence of analog values which changes once every
interval. For example, a sensor may report temperature once every second, and
encode the temperature as a voltage. It will hold this voltage for one minute, then
change the voltage on the next reading.
A digital signal is a sequence of digital values which changes once every interval.
For example, a sensor may test the temperature of an engine once per second, and
report whether the temperature is greater than 200 degrees. If the temperature is
higher than 200 degrees, it will send a voltage of +5 Volts on the transmission
line. If the temperature is less than 200 degrees, it will send a voltage of –5 Volts.
The digital signal is a voltage that changes once per second, with a 1 represented
as +5 Volts, and a 0 represented as –5 Volts.
3.
Example of a Computer Communications System
Figure 2 shows a point-to-point computer communications system. A digital
signal from the source computer is encoded so that bit errors can be detected and
corrected at the destination. (If transmission is sufficiently reliable, the encoder
may use only an error detection code, and any messages with errors will be
retransmitted.)
The encoded signal is modulated for transmission, and at the destination it is
demodulated into an analog signal. The encoded digital signal is regenerated from
this analog signal, the errors are corrected, and the original message reproduced.
Prof. M. Gerla & R. Dzhanidze. Class CS 117. Ch. 2a
m
Message
Generator
gd (t)
4
Message
Encoder
Sd (t)
Error
Control
Encoder
Se (t)
Computer
Modulator
Digital Signal
Encoded Digital Signal
Sm (t)
Modulated Signal
Noise
Analog
Transmission
Line
Sm (t)
Altered Modulated Signal
Analog Signal
Demodulator
Regenerated Encoded Digital Signal
(with possible errors)
Sa (t)
Regenerated Digital Signal
(errors detected and corrected)
Regenerator
Remote Device
Se (t)
m
User
gd (t)
Message
Decoder
Sd (t)
Error
Control
Decoder
Figure 2: Block diagram of a computer communication system.
Prof. M. Gerla & R. Dzhanidze. Class CS 117. Ch. 2a
5
4. Networking
Communication networks enable many users to communicate to each other’s, and
to transfer information in form of voice, video, electronic mail, and computer files.
Principles of communication system are different for different approach.
a. In Telephone Network conversation is accomplished along one link. To set up
a call, a set of circuits has to be connected, joining the two telephone sets. Circuit
switching occurs at the beginning of new telephone call by switching of circuit,
where "circuit" reefers to the capability of transmitting one telephone
conversation. An electronic interface in the switch converts the analog signal
traveling on the link from the telephone set to the switch into digital signal called
a bit stream. The same interface converts the digital signal that travels between the
switches into an analog signal before sending it from the switch to the telephone
(Figure 3).
Analog signal
Codec
Switch
Figure 3. Phone connection to digital network.
The switches themselves are computers, which makes them very flexible. This
flexibility allows such services as call waiting, call forwarding, and call
back.Since the 1980s the transmission links of the telephone network have been
changing to the SONET, or Synchronous Optical Network, standard. SONET rates
are arranged in the Synchronous Transfer Signal (STS), hierarchy shown in
Table 1.
Prof. M. Gerla & R. Dzhanidze. Class CS 117. Ch. 2a
6
Table 1
Carrier
OC-1
OC-3
OC-9
OC-12
OC-18
OC-24
OC-36
OC-48
OC-192
Signal
STS-1
STS-3
STS-9
STS-12
STS-18
STS-24
STS-36
STS-48
STS-192
Rate in Mbps
51,840
155,520
466,560
622,080
933,120
1244,160
1866,240
2488,320
9853,280
STS-n rate is exactly n times the STS-1 rate. Because all clocks in SONET
network are synchronized to the same master clock, it is possible to compose an
STS-n signal by multiplexing exactly n numbers of STS-1 signals.
b. In Computer or Data Communication Networks organization of data
exchange is in packets, and data communications are organized by packet
switching.
Using the packet switching techniques and rules of operations (protocols) was
developed packet switching networks, so called ARPANET. The ARPANET used
single packet format and addressing scheme. Through the ARPANET protocols is
easy to interconnect networks, and it was later evolved into the Internet. The
Internet is used to interconnect a large number of computers and local area
networks throughout the world. Development of the ARPANET architecture was
formalized layered model of Open System Interconnection, or OSI model.
Let us consider the simplest model of company’s information system consisting
one or more databases and some number of system users (employees). In this
model, Figure 4, the data are stored on powerful computers called servers. Often
these are centrally housed and maintained by a system administrator. In contrast,
the employees have simpler machines, called clients, on their desks.
The packet switching technique in some of networks is based on so called
multiple access method of computer interconnections. It dramatically reduces the
cost of interconnection nearby computers in a Local Area Network (LAN).
Prof. M. Gerla & R. Dzhanidze. Class CS 117. Ch. 2a
7
Server
Clients
Network
Figure 4. Model of the information system.
Broadly spiking, there are two types of transmission technology:
1. Broadcast links.
2. 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, sent by any machine
are received by all the others. An address field within the packet specifies the
intended recipient. 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 code is transmitted, it is received and processed by every
machine on the network, this mode of operation is called broadcasting.
Point-to-point networks consist of connections between two 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 routers. As a general rule,
smaller networks, geographically localized networks tend to use broadcasting,
whereas larger networks usually are presented as a point-to-point interconnection
of the small networks. Point-to-point transmission with one sender and one
receiver is called uncasting.
A Local Area networks (LAN) are privately-owned networks within a single
building or campus of up to few kilometers in size. LANs are distinguished from
other kinds of networks by three characteristics: (1) their size, (2) their
transmission technology, (3) their topology.
Prof. M. Gerla & R. Dzhanidze. Class CS 117. Ch. 2a
8
A popular implementation of multiple accesses method in LAN is an Ethernet
Network, IEEE 802.3 standard. Ethernet network is a buss-based broadcast
networks with decentralized control. In Ethernet computers are attached to a
common cable via an interface that today consists of small chip set mounted on the
main board. When computer, attached to the network, Figure 5 a, wants to send a
packet to another computer, it puts the own address and destination address into
the packet header and transmits the packet on the cable. All the computers
attached to the network read the packet, but only the computer with the destination
address indicated on the packet copies it. Ethernet transmission rate 10 Mbps, 100
Mbps even 1Gbps are available.
Another popular multiple access method is so called Token Ring Network, IEEE
802.5 standard. Token Ring networks are ring-based broadcast LAN networks
operating at 4 and 16 Mbps rate. In token rings computers are attached by pointto-point links in a unidirectional ring configuration, Figure 5 b, using token ring
interface boards. When the computers have no information to transmit, the
interfaces pass a token around the ring. The interface boards between the
computers and the network are configured so that they put back on the ring
whatever information they receive with a delay equal to a few bit transmission
times. This enables the token to circulate very fast around the ring.
Suppose computer “A” wants to send a packet to computer “B”. Computer “A”
puts the source address “A” and the destination address “B” into the packet header
and gives the packet to its interface, which then waits for the token. As soon as it
A
Cable
a
B
b
Figure 5. Topology of the Ethernet (a) and Token Ring networks (b).
Prof. M. Gerla & R. Dzhanidze. Class CS 117. Ch. 2a
9
gets the token, the interface of computer “A” transmits this packet, instead of
forwarding the token. The other computers keep forwarding the packet they
receive while making a copy for themselves. In particular, the interface of
computer “B” copies the packet destined to it. The other interfaces discard their
copy of the packet when they find out that it is not for them. When “A” receives
the last bit of its own packet, after the packet has traveled around the ring, it puts
the token back on the ring. What is important is that the computers get to transmit
in turn, when they get the token. Hardware is available for token ring networks at
4 Mbps and at 16 Mbps.
The maximum time a computer waits before it gets to transmit in a token ring or
Ethernet network is small enough for many applications but too large for
interactive audio or video applications. Also, the transmission rate of token ring (4
or 16 Mbps) or 10-Mbps Ethernet networks are too slow for some multimedia
applications.
These limitations of Token Ring network led to develop a new network called:
Fiber Distributed Data Interface (FDDI). FDDI network use optical fibers to
transmit at 100 Mbps; access to the channel is regulated by a timed-token
mechanism. This mechanism is similar to the access control of a token ring, but
with FDDI, the arrivals of token are timed to assure that they are retransmitted
within a fixed time. The high speed of FDDI makes it suitable for networking
workstations with instruction rates of a few hundred Mbps. Because it can
guarantee a token rotation time, FDDI can offer integrated services for
applications that combine audio and video with data.
A Metropolitan Area Networks (MAN) covers a city. A MAN represents
as an interconnected LANs by point-to-point communication links. The
interconnection is controlled by switches that are finding the better way to connect
with desired LAN.
A Wide Area Network (WAN) spans a large geographical area, often a
country or continent. It contains a collection of machines intended for running user
programs, Figure 6. Traditionally these machines called hosts. The hosts are
connected by a communication subnet, or just subnet. The hosts are owned by the
costumers, whereas the 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. Separation of the pure communication aspects of the network
Prof. M. Gerla & R. Dzhanidze. Class CS 117. Ch. 2a
10
(task of a subnet) from the application aspects (task of host), simplifies the
complete network design.
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 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 call router. The collections of
communication lines and routers (but not the hosts) form the subnet.
Faster LAN and WAN networks are today being deployed, using Asynchronous
Transfer Mode (ATM) technology. With ATM, a computer transmits information
at rates between 25 Mbps and 2.5 Gbps in packets of 53 bytes. These fixed-size
packets, called cells, can be switched rapidly by ATM switches. Part of the header
of ATM packet (cell) is the connection identifier and contains a virtual circuit
address, instead of a source and destination address. With the appropriate control
software, network can be connected many ATM switches together to build large
networks. Moreover, the links between ATM switches can be long optical fibers.
Using this technology companies can build a worldwide network. In the ATM
network, data is transmitted from source to destination over a fixed route, just like
in a telephone connection. Unlike telephone networks, however, an ATM
connection is not allocated at a fixed bandwidth. The ATM network determines
how much bandwidth needed to allocate signal, so that information is transmitted
with very low loss rate or delay, as required by the application. Since ATM is
connection-oriented, sending data requires first sending a packet to set up the
connection. As the setup packet wends its way through the subnet, all the routers
on the path make an entry in their internal tables nothing the existence of the
connection and reserving whatever resources are needed for it. ATM
communication is similar to leased lines in the telephone world. Each connection,
temporarily or permanent has a unique connection identifier. Once a connection
has been established, either side can being transmitting data.
Thus, this technology is suited for building large integrated services networks.
Figure 7 summarizes the increase in speed of data networks. Over the 30 years
since 1970, speed has increased by six orders of magnitude, from 10 Kbps to 10
Gbps.
Prof. M. Gerla & R. Dzhanidze. Class CS 117. Ch. 2a
Subnet
11
Router (switch)
Host
Client
Figure 6. Wide Area Network (WAN)
bps
10 G
ATM
Ethernet
FDDI ATM
1G
100M
Token ring
10 M
SMDS
Ethernet
Ethernet
Frame Relay
1M
100K
RS-232-C
10 K
65
70
75
80
85
90
95
00 years
Figure 7. The speed of data networks increased by six orders of magnitude
Prof. M. Gerla & R. Dzhanidze. Class CS 117. Ch. 2a
12
c. Cable Television, originally known as Community Antenna Television or
CATV. CATV was created when the signal from one master antenna was
distributed over a large area using coaxial cable and amplifiers. The key
innovations in cable TV are optical feeder links, digital compression techniques,
and service integration. Today cable TV uses frequency-division multiplexing to
transmit up to 69 analog TV channels, each 4.5 MHz wide. Transmission is over
coaxial cables arranged as a unidirectional tree, with wideband amplifiers used to
compensate for the attenuation of the cable signal. The number of TV a channels is
limited by the bandwidth of coaxial cables. The span of a CATV network is
limited by the noise power, which increases as more amplifiers are added to
compensate for the signal power loss during propagation.
Optical fibers are used to transmit the TV signals over longer distance. Fibers have
a much lower attenuation than coaxial cables, so they can transmit signals over
longer distances before it becomes necessary to use an amplifier. In this
implementation, the transmission over the fiber is still analog. The signal is fed
into the coaxial cable network at various points, where the optical signal is
converted into electrical signals. The cost of each optical transmission line is
spread over a few hundred users. Moreover, existing coaxial cables can be reused.
This hybrid fiber/coaxial cable distribution system has a longer span and better
signal quality than a coaxial cable network. This network called fiber-to-the-curb
(FTTC) network, where "curb" designates a location in some neighborhood where
the fiber is connected to the local coaxial distribution network.
To increase the number of TV channels, the CATV industry is now migrating to a
digital transmission technology. Before transmitting the TV signals, the CATV
company uses a TV codec (coder-decoder) that converts each signal into a bit
stream that represents the video frames. Using algorithms that have been
standardized by Motion Pictures Expert Group (MPEG), the codec compresses the
bit stream to reduce its rate. The bit streams are transmitted over fibers to the curb
and then distributed by the neighborhood coaxial network. The compression gain
now allows the network to transmit about 500 TV channels. Using the first version
of the MPEG standard, MPEG1, a moderate-quality TV signal is encoded as a 1.5
Mbps bit stream, which can be modulated in a signal that has a bandwidth of about
600 kHz. Set-up boxes at the user residence perform the decompression. This
CATV network is still unidirectional. To provide new services, such as video on
demand, Internet access, and telephony, the CATV industry is organizing
bidirectional networks. Such a network connects video servers to users by means
of control messages. The user choices these messages to select the video program,
Prof. M. Gerla & R. Dzhanidze. Class CS 117. Ch. 2a
13
and the video program is sent over the network to the user. A cable modem can
give users access to a shared 3 Mbps (or 10 Mbps) upstream channel to the
Internet.
d. Wireless Networks. The first packet-switched wireless network was developed
in 1971. Alohanet, as the network was called, interconnected computers on four
islands in a star topology: two computers could exchange packets through a
central computer hub.
To a first approximation wireless network can be divided into three main
categories:
1. System interconnection. System interconnection is all about
interconnecting the components of computer using short-range radio. This
short-range wireless network called Bluetooth network.
2. Wireless LANs. Wireless LAN permitting per-to-per communications
networks are now available. There is standard for wireless LANs called
IEEE 802.11, Wireless LAN can operate at bit rates up to about 50 Mbps
over distances of tens of meters.
3. Wireless WANs. The third kind of wireless network is used in wide area
system. The radio network used for cellular telephones is an example of a
low-bandwidth wireless system. This system has already gone through three
generations. a. The first generation was analog and voice only. b. The
second generation was digital and for voice only. c. The third generation is
digital and is for both voice and data. Cellular systems operate below 1
Mbps, but the distances between the base station and the computer or
telephone is measured in kilometers.
Unlike wireline networks, whose backbone speed will soon exceed 1 terabit per
second, bandwidth in wireless networks remains very scare resource. The speed
difference between wireline and wireless access will continue to grow with 100
Mbps Ethernets now common while 2 Mbps wireless LANs still are rare. The
challenge for wireless networks will be to provide connectivity to the Internet,
integrated services, especially voice and data, as well as multimedia Web access.
The key innovations in telephone, computer, CATV, and wireless networks are
summarized in Table 2.
The differences among these types of networks are still great. However, the table 2
shows that each type of network is now able to provide services that were formerly
Prof. M. Gerla & R. Dzhanidze. Class CS 117. Ch. 2a
14
the exclusive province of other networks. We can distinguish in this the tendency
toward "convergence".
Table 2.
Telephone
Computer
Cable TV
Wireless
Networks
Networks
Networks
Circuit switching. Packet-switched
Digitization and
Radio and
Separation of call networks.
compression using TV Broadcast.
control from
signal processing
voice transfer.
Multiple-access
techniques.
Networks.
ISDN and service
Fiber-to-the-curb
Cellular
integration.
Layered architecture, network.
Telephones.
ARPANET
Optical links,
Two-way links.
Wireless LANs
SONET.
Internet, OSI model.
Voice, data
ATM.
Integrated services, Service integration. Integration.
ATM.
Internet is not a network at all, but a vast collection of interconnected different
networks that use certain common protocols and provide certain common services.
It is a usual system in that it was not planned by anyone and is not controlled by
anyone. Many networks exist in the world, with different hardware and software.
For this interconnection is used machines called gateways that provide the
necessary translation, both in terms of hardware and software. A common form of
Internet is a collection of LANs connected by a WAN. In fact, if we replace the
label “subnet” by “WAN” nothing else would have to change.
Subnets, networks and internetworks are often confused. Subnet makes the most
sense in the context of a WAN, 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.
Prof. M. Gerla & R. Dzhanidze. Class CS 117. Ch. 2a
15
5. Communication Standards
An important concept in data communication is the interconnection between the
communication system components. The interconnection could be done if physical
characteristics of the interconnected equipment are fitted to each other. It allows
manufacturers of different systems to interconnect their equipment through
standard interfaces. It also allows software and hardware to integrate well and be
portable on differing systems. So, standards of hardware and software for
interconnection in systems are necessary.
A proprietary (closed) system or standards is manufactured and controlled by
(usually) one company. No other companies are allowed to make equipment or
write software using this standard. Examples are a Local Area Network (LAN)
system and the Apple Macintosh computer. Monopoly by controlling company
may develop any types of equipment or software and the company has total
control. Often the product is not the best possible or is overpriced. The controlling
company can go out of business, and support and replacement parts become
unavailable. We do not consider in the course the closed systems and standards.
With an open system or standards any company can manufacture equipment or
write software. An example is IBM’s PC and also many communication
companies. Product from different companies can operate and communicate with
each other in open system standards. Companies must cooperate on standards.
Standard organizations create and administer standards. Often competing
companies will form a committee to create a standard acceptable to all interested
parties. Then the companies will ask a standard organization for formal
recognition of that standard.
An example is Ethernet, a Local Area Network (LAN) system created by Xerox,
Intel, and Digital Equipment Corporation. These companies asked the Institute of
Electrical and Electronics Engineers (IEEE) to formalize Ethernet, and this
becomes standard IEEE 802.3.
United States has many industrial and governmental standard organizations. The
major standards from industry are the American National Standard Institute
(ANSI), the IEEE, and the Electronic Industries Association (EIA). The major
governmental standards organization is the National institute of Standards and
Technology (NIST). NIST major standards concerns are the standard Volt,
standard Ampere, time, and dimensions for semiconductor manufacture.
Prof. M. Gerla & R. Dzhanidze. Class CS 117. Ch. 2a
16
Computer communication uses different standard for different approach. The RS232-C standard is used for the serial port of computer devices. This standard is for
low bit rate transmissions (up to 38 Kbps) over short distances (less than 30 m).
Both bit rate and distance must be kept small, because transmissions take place
over untwisted wires, which can introduce errors due to cross talk. Cross talk
becomes more severe as the rate and the distance increase.
A serial link is often used to attach a computer to a modem. A modem transmits
data by converting bits into tones (analog signals) that can be transported by the
telephone network, as were voice signals. The receiving modem then converts
these tones back into bits, thus enabling two computers with compatible modems
to communicate over the telephone network as if they were directly connected by a
serial link. Modems conforming to new V.90 standard can transmit 56,000 bps in
the downstream direction. The Synchronous Transmission Standard increases the
transmission rate and the usable length of transmission links. These standards are
known as Synchronous Data Link Control (SDLC). The main idea of SDLC is
to avoid the time wasting by RS-232-C. To eliminate that lost time, SDLC groups
many data bits into packets. The number of bits in packet may be fixed or variable.
6. Open System Interconnection Reference Model
When speaking of how communication systems are organized, one often discusses
the Open System Interconnect (OSI) Reference Model (RM). While not every
system uses all of the RM's layers, a vendor will often refer to the OSI RM in
discussing its system and its relationship to a practical RM layer. The RM is based
on IBM’s Systems Network Architecture (SNA), which was introduced in 1972.
Even a discussion of the Internet Protocol TCP/IP (Transmission Control
Protocol/Internet Protocol), whose layers do not correspond exactly to the OSI
RM, needs some understanding of the OSI RM. The widespread use of the OSI
RM makes it important that we discuss it and learn the function some of the layers.
In a sense, each layer is a kind of virtual machine, offering certain services to the
layer above it, see Figure 8.
Layer n on one machine carries on a conversation with layer n on another
machine. The rules and conversations used in this conversation are known as the
layer n protocol. A protocol is an agreement between the communicating parties
on how communication is to proceed.
Prof. M. Gerla & R. Dzhanidze. Class CS 117. Ch. 2a
Data
17
Data
Application
Application
Presentation
Presentation
Session
Session
Transport
Transport
Network
Network
Data Link
Data Link
Physical
Physical
User application, process
And management functions
Data interpretation, format
And control transformation
Administration and control
Of session between two nodes
Network transparent data transfer and transmission control
Routing, switching and flow
Control over a network
Maintain and release data:
Link, error and flow control
Electrical and mechanical
characteristics
Actual Data Flow
Figure 8. Seven-Layer OSI model
A seven-layer model was developed by the ISO (International Standard
Organization). (Do not mix ISO and OSI). Networks are divided into vertical
layers. These layers are sometimes divided into three groups.
Each layer performs a specific function. Usually intermediate nodes (nodes
between the source and destination used for relaying only) do not need all seven
layers. Often only the end users need all layers. Many network protocols do not
use all layers or do not divide their layers exactly as per the RM, but we still need
an understanding of it.
At the sending source a layer receives the data from the layer above, performs its
task, and passes the data to the layer below. At the receiving, destination, the layer
receives the data from the layer below, performs its task, and passes the data to the
layer above.
A set of layers and protocols is called network architecture. A list of protocols
used by a certain system, one protocol per layer, is called a protocol stack.
Designing, building, testing, and maintaining networks is a very complex task, By
dividing the network into layers or distinct functions we can better define what
each layer does. The only importunities are that each layer perform its function
Prof. M. Gerla & R. Dzhanidze. Class CS 117. Ch. 2a
18
correctly and interface properly with adjacent layers. The function tells what task
the layer is perform, but not how the layer is to perform its task.
The interface protocol tells how a particular layer will communicate with the layer
above it and the layer below it. For software interfaces, information may be passed
in a manner similar to parameter passing in subroutines and functions. The
information must be in a particular format (that is length, the order in which
individual fields appear within a frame, the bit order within individual frames).
The hardware interfaces (physical level) are: voltages, impedance, and
mechanical dimensions.
A frame is the bit pattern sent over the physical link. At minimum, a frame has a
starting signal (delimiter) and an ending delimiter. A frame can be a bit stream
consisting of a start delimiter, address and control fields, data, en error detection
field, and an ending signal delimiter. Frame lengths carrying data range from 424
bits to over 15,000 bits. Often one frame is not long enough to transmit all the
data. The data is divided into segments fitting into the frames.
In early 1970s data-networking technology was in its early life, and no standard
existed. The transmission circuitry was primitive and noisy with Bit Error Rates
between one error per hundred and one error per thousand bits sent. This high
error rate means that an extremely strong error handling system had to be
designed. The result was X.25 protocol and its associated protocols. Error
checking in X.25 is done between each relay node, and between the sending and
receiving nodes. X.25 was an international effort and thus has worldwide support.
In packet switching network a path is not set up before the data is sent. The same
path is used for sending the entire message. Packet arrive in the same order they
were sent, and thus no sequence numbers are needed. However the packets must
contain routing information. Each packet will contain the same route information.
The packet switches examine this routing information and switch the packets
according to this information. A packet sequence number is used for error control,
but not for reassembly.
X.25 is the best-known packet routing protocol. With X.25 packet routing is called
a Switched Virtual Channel (SVC). Each packet contains complete routing
information-Logical Channel Number (LCN) and Logical Channel Group Number
(LCGN). X.25 is the CCITT specification for data transmitting between Data
Prof. M. Gerla & R. Dzhanidze. Class CS 117. Ch. 2a
19
Terminal Equipment (DTE) and Packet Switched Network (PSN). DTE is
equipment at the ends of the path.
X.25 is a Network Layer, level 3 protocol and routes the data, it receives and sends
information from and to the Transport Layer 4 above.
7. Layer Descriptions
Although the protocols associated with the OSI model are rarely used any more,
the model itself is actually quite general and still valid, and features at each layer
are still very important. Later we will discuss TCP/IP model that has opposite
properties, the model itself is not of much use but the protocols are widely used.
For this reason we will look at both of them.
Bottom three layers of the OSI model are called the Communications Subnet. They
are the Physical Layer, the Data Link Layer (DLL), and the Network Layer. The
physical Layer is hardware, and the DLL and Network Layer can be a mixture of
hardware and software.
Layer 1: Physical Layer. The Physical layer is concerned with transmitting raw
bits over a communication channel. The Physical is the actual medium that
conveys the bit stream. This connects the networks together and carries the "ones"
and "zeros" (voltage or light pulses). Typical questions here are how many volts
should be used to represent a “1” and how many for “0”. How many nanoseconds
a bit lists, whether transmission may proceed simultaneously in both directions,
how the initial connection is established and how it is torn down when both sides
are finished, and how many pins the network connector and what each pin is used
for. The design issues here largely deal with mechanical, electrical, and timing
interfaces, and the physical transmission medium which lies below the physical
layer.
The medium can be fiber optics, twisted pair copper wire, coaxial cable,
microwaves, satellite, laser beams, or radio waves. Layer 1 also includes the
antennas, cables, satellites, and connectors. Transmitted signals are modulated
electromagnetic waves that propagate through medium.
The transmitter converts the bits into signals, and the physical layer in the receiver
converts the signals back into bits. The receiver must be synchronized to be able to
recover the arrival bits. To assist the synchronization, the transmitter inserts a
Prof. M. Gerla & R. Dzhanidze. Class CS 117. Ch. 2a
20
specific bit pattern, called a preamble, at the beginning of the packet, indicated by
sync in Figure 9.a. The bit link is unreliable because synchronization errors and
noise in the link can corrupt a packet.
The physical layer transmits bits by converting them into electrical or optical
signal. Physical layer standards specify the modulation scheme (the relation
between the bits and the electromagnetic signals), and the characteristics of the
interface between the transmitter, receiver and the medium. A link's characteristics
impose a limit on how fast it can transmit data. Generally, wireless links are
slower than copper links, and copper links are slower than optical links.
Link layer
A
B
Unreliable
bit link
1
1
Physical
layer
Sync
Figure 9.a. The physical layer
Layer 2: Data Link Layer (DLL). Layer 2 (Figure 9.b) does error control
and flow control, synchronizes the receiver to the incoming bit stream, and
decodes the bit stream. DLL detects errors at the receiver, but usually does not
corrects them. Most systems use a re-transmission of data, but some mobile digital
radio systems use error correction.
 The DLL makes sure that data is not transmitted faster than the receiver can
handle or store it. Thus is called flow control. Memories (buffers) within
the receiving DLL can overflow if the data is coming too fast.
Figure 9.b. illustrates the data link layer for a point-to-point link between two
computers. The transmitter and receiver can execute a specific protocol to retransmit corrupted packets. In the Figure, the protocol entities are represented by
Prof. M. Gerla & R. Dzhanidze. Class CS 117. Ch. 2a
21
the boxes labeled 2. These entities are programs that are usually executed by
dedicated electronic circuits (in the network interface card (NIC)) because of the
high speed. The physical layer transmits bits by converting them into electrical or
optical signals. In many implementations, the physical layer uses synchronization
bits to synchronize the receiver.
The transmitter appends error-detection bits and may number the packets. The
Figure 9.b shows the fields that are added to the packet that the data link layer
transmits; first, the data link layer in the transmitter adds the error detection bits
(CRC) and may add a sequence number to the packet.
A
Reliable
Packet link
B
CRC
2
2
Unreliable link
Sequence no
1
1
Data
link
Layer
Physical
Layer
Sync
Figure 9.b. The data link layer supervises the transmission of packets by the
physical layer.
In a typical implementation, the DLL adds a sequence number and errordetection bits (CRC). Then the physical layer adds a synchronization
preamble. In the receiver, the physical layer strips the preamble and gives the rest
of packet to the data link layer, which uses the error detection bits to verify that
packet is correct. If the data link layer arranges for retransmissions of erroneous
packets, it uses the packet sequence numbers to determine which packet should be
retransmitted. If the data link layer only drops incorrect packets, then it does not
insert a sequence number. The data link layer then strips the error-detection bits
and the sequence number (If present).
Prof. M. Gerla & R. Dzhanidze. Class CS 117. Ch. 2a
22
Sublayer 2a: Media Access Control. Figure 9.2a shows computer attached
to a common link. This computer must regulate the access to that shared link. This
function, called access control, it is performed by a sublayer called the media
access control (MAC) sublayer. Thus, the MAC sublayers in the computer follow
a set of rules- a protocol-to regulate access to the shared link. Because link is
shared, the MAC must append the physical address of the destination, the
specific computer to which the packet is destined. The physical address identifies
uniquely a device attached to shared link.
A
Media access control
Unreliable
Packet link
2a
B
2a
Shared link
MAC addresses
Physical Layer
1
1
A
B
Sync
C
Figure 9.2a. The figure shows three computers that share a common link. The
media access control (MAC) sublayer regulates access to such a common link.
That sublayer adds the addresses of the source and destination to the packet before
giving it to the layer for transmission
Sublayer 2b: Logical Link Control. Figure 9.2b shows logical link control
(LLC) sublayer. It uses the unreliable transmission of packets implemented by the
MAC sublayer to implement either only error detection or reliable packet
transmission between computers attached to a shared link.
The MAC and LLC together constitute the data link layer to implement a packet
transmission service with error detection or a reliable packet transmission service
between computers attached to common link.
Prof. M. Gerla & R. Dzhanidze. Class CS 117. Ch. 2a
23
Figure 9.2c shows a bridge (computer C) between two Ethernet networks.
Computers A, B, and C are attached to one Ethernet. The right part of the figure
shows these three computers attached to the same link. The MAC sublayer in the
three computers implements unreliable packet transmissions. The LLC detects the
errors in the transmissions. The situation is similar for computers C, D, and E
attached to the other Ethernet.
A
Reliable
Packet link
2b
2a
Unreliable packet
link
B
2b
Logical link
sublayer
2a
MAC
sublayer
Figure 9.2b. The logical link control (LLC)
The logical link control (LLC) adds error detection to the transmissions that the
MAC sublayer implements (The LLC can also use a retransmission mechanism to
provide reliable packet transmissions, if desired.
Consider a packet sent by computer A and destined for computer E. Computer C
must store that packet and re-transmit it on the second Ethernet. If the packet sent
by A is destined for computer B, C must not re-transmit it. The decision of C
limited to whether to re-transmit the packet or not.
Prof. M. Gerla & R. Dzhanidze. Class CS 117. Ch. 2a
24
A bridge is a computer equipped with the hardware and software to perform such
decisions and capable of re-transmitting packets at a high rate. The bridge allows
the computers on the two Ethernet networks to function as if they are on the same
Ethernet.
A
B
C
D
E
3
3
3
3
2b
2b
2b
2b
2b
2b
2a
2a
2a
2a
2a
2a
1
1
1
1
1
1
A
E
B
C
D
Figure 9.2c. Computer C is a bridge. It connects two LAN's by copying packets
from one to the other
Layer 3: Network Layer; Layer 3 is concerned with routing the frame. The three
steps of routing are: 1) establishing the connection, 2) maintaining the connection,
and 3) terminating the connection after the data transfer is complete. Routing is
the function to find the path the packets must follow. The network layer appends
unique network addresses of the source and destination computers. An important
addressing scheme in packet-switched networks is that used by the Internet.
Circuit-switch networks, like the telephone network, use different addressing
schemes.
Thus, the network layer uses the transmission over point-to-point links provided
by the data link layer to transmit packets between any two computers attached in a
network. Figure 9.3 shows a router attached to several links. When the router
receives a packet, it must decide on the basis of the network addresses along
which link it should retransmit the packet. The network layer implements this
routing function.
Prof. M. Gerla & R. Dzhanidze. Class CS 117. Ch. 2a
E
A
25
A
B
C
D
E
3
3
3
3
3
C
2
2
2
2
2
2
2
1
1
1
1
1
1
1
B
D
Figure 9.3. Computer C is a router. It is designed to relay packets at a high rate.
Observe that the link between, say, C and D in Figure 9.3 may carry packets
between A and E and between B and E. These packets are statistically multiplexed
by the router C. The network addresses of the packets permit demultiplexing.
Network layer standards specify packet formats, addressing schemes, and routing
protocols.
Another four layers are out of our course concern, so, we do not consider them.
8. The TCP/IP Reference Model
In the Internet are connected hundreds of universities and government
installations, using leased telephone lines. When satellite and radio networks were
added, the existing protocols had trouble networking with them, so a new
reference architecture was needed. Thus, the ability to connect multiple networks
was architecture later become known as the TCP/IP Reference model.
a. Protocol Hierarchies
Layer n on one machine carries on a conversation with layer n on another
machine. The used rules and conversations are collectively known as the layer n
protocol, a protocol is an agreement between the communicating parties on how
communication is to proceed.
Prof. M. Gerla & R. Dzhanidze. Class CS 117. Ch. 2a
26
A five-layer network is illustrated in Figure 10. 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.
Host 2
Host 1
Layer 5
Layer 5 protocol
Layer 5
Layer 5/4 interface
Layer 4
Layer 4 protocol
Layer 4
Layer 4/3 interface
Layer 3
Layer 3 protocol
Layer 3
Layer 3/2 interface
Layer 2
Layer 2 protocol
Layer 2
Layer 2/1 interface
Layer 1
Layer 1 protocol
Layer 1
Physical medium
Figure 10. 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
layer to layer immediately below it, until lowest layer is reached. Below layer 1 is
the physical medium through which actual communication occurs. In Figure 10,
virtual communication is shown by dotted arrows and physical communication is
shown by solid arrows. Between each pair of adjacent layers is an interface. The
interface defines which primitive operations and services the lower layer makes 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 interface between the layers. Each layer perform a specific
collection of well-understood functions.
Now consider a technical example: how to provide communication to the top of
the five-layer network in Figure 10. A massage, M, is produced by an application
Prof. M. Gerla & R. Dzhanidze. Class CS 117. Ch. 2a
27
process running in layer 5 and given to layer 4 for transmission. Layer 4 puts a
header in front of 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 same order if the lower layers do
not maintain sequence. In the same layers, headers can also contain sizes, times,
and other control fields.
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, pre pending a layer 3 header to each packet. In this example, M is split
into two parts, M1 and M2.
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 n are passed up to layer n.
Important difference is between the actual and virtual communication and the
difference between protocols and interfaces.
A service is a set of primitives (operations) that a layer provides to the layer above
it. The service defines what operations the layer is prepared to perform on behalf
of its users, but it says nothing at all about how these operations are implemented.
A service relates to an interface between two layers, with the lower layer being the
service provider and the upper layer being the service user.
A protocol, in contrast, is a set of rules governing the format and meaning of the
packets, or messages that are exchanged by the peer entities within a layer. Entities
use protocols to implement their service definitions. Services and protocols are
distinct concepts.
In other words, services relate to the interfaces between layers, as illustrated in
Figure 11. In contrast, protocols relate to the packets sent between peer entities on
different machines. A protocol relates to the implementation of the service and as
such is not visible to the user of the service.
Prof. M. Gerla & R. Dzhanidze. Class CS 117. Ch. 2a
Layer k+1
28
Layer k+1
Service provided by layer k
Layer k
Layer k
Protocol
Layer k-1
Layer k-1
Figure 11. The relationship between a service and a protocol.
Major goal of the protocol hierarchies was to worry that, hosts, routers and
internetwork gateways might get blown at a moment, and the network must be
able to survive loss of subnet hardware, with existing conversation not being
broken off. In other words it is wanted to remain intact as long as the source and
destination machines were functioning, even if some of the machines or
transmission lines in between were suddenly put out operation.
b. The Internet Layer
All requirements that led to the choice of a packet-switching network based on a
connectionless internetwork layer. This layer, called the internet layer, is the
linchpin that holds the whole architecture together. Its job is to permit hosts to
inject packets into any network and have them travel independently to the
destination (potentially on a different network). They may even arrive in different
order than they were sent, in which case it is the job of higher layers to rearrange
them, if in-order delivery is desired.
The internet layer defines an official packet format and protocol called IP
(Internet Protocol). The job of the internet layer is to deliver IP packets where
they are supposed to go. Packet routing is clearly the major issue here, as is
avoiding congestion. For these reason, it is possible to say that the TCP/IP internet
layer is similar in functionality to the OSI network layer. Figure 12. shows this
correspondence.
Prof. M. Gerla & R. Dzhanidze. Class CS 117. Ch. 2a
29
7
Application
6
Presentation
5
Session
4
Transport
Transport
3
Network
Internet
2
Data link
Host-to-network
1
Physical
OSI
Application
Not presented
in the model
TCP/IP
Figure 12. Correspondence of OSI and TCP/IP Reference models
c. The Transport Layer
It is designed to allow peer entities on the source and destination hosts to carry on
a conversation, just as in the OSI transport layer. Two end-to-end transport
protocols have been defined here:
1. TCP (Transport Control Protocol), is a reliable connection-oriented protocol
that allows a byte stream originating on one machine to be delivered within error
on any other machine in the Internet. It fragments the incoming byte stream into
discrete messages and passes each one on the internet layer. At the destination, the
receiving TCP process reassembles the received messages into the output. TCP
also handles flow control to make sure a first sender cannot swamp a slow receiver
with more messages than it can handle.
2. UDP (User Datagram Protocol), is an unreliable, connectionless protocol for
application that do not want TCP’s sequencing or flow control and wish to provide
their own. It is also widely used for one-shot, client-server-type request-reply
queries and applications in which prompt delivery is more important than accurate
delivery, such as transmitting speech or video. The relation of IP, TCP and UDP is
shown in Figure 13. (IP has been implemented on many other networks).
Prof. M. Gerla & R. Dzhanidze. Class CS 117. Ch. 2a
TELNET
Protocols
FTP
30
SMTP
TCP
DNS
Transport
UDP
Network
IP
Networks
ARPANET
SATNET
Packet
radio
Application
LAN
Physical+
data link
Layer (OS I)
names
Figure 13. Protocols and networks in the TCP/IP model initially
d. The Application Layer
The TCP/IP model does not have session or presentation layers. No need for them
was perceived, so they were not included.
On top of the transport layer is the application layer. It contains all the higher-level
protocols. The early ones included virtual terminal (TELNET), file transfer (FTP),
and electronic mail (SMTP), as shown in Figure 13. The virtual terminal protocol
allows a user on one machine to log onto a distant machine and. Electronic mail
was originally just a kind of file transfer, but later a specialized protocol (SMTP)
was developed for it. Many other protocols have been added to these over the
years, the Domain Name System (DNS) for mapping host names onto their
network addresses, NNTP, the protocol for moving USENET news articles
around, and HTTP, the protocol for fetching pages on the World Wide Web, and
many others.
e. The Host-to-Network Layer
The TCP/IP reference model does really say mach about what happens here,
except to point out that the host has to connect network using some protocol so it
can send IP. This protocol is not defined and varies from host to host network to
network.
Prof. M. Gerla & R. Dzhanidze. Class CS 117. Ch. 2a
31
The OSI and TCP/IP reference models have much in common. Both are based on
concept of a stack of independent protocols. Also, the functionality of the layers is
roughly similar. Despite these fundamental similarities, the two models also have
many differences.
Regardless some problems, the OSI model (minus the session and presentation
layers) has proven to be exceptionally useful for discussing computer networks. In
contrast, the OSI protocols have become popular. The reverse is true of TCP/IP:
the model is practically nonexistent, but the protocols are widely used. Since
computer scientists like to have their cake and eat it, too, we will use a modified
OSI model but concentrate primarily on the TCP/IP and related protocols, as well
as newer ones such as 802, SONET, Bluetooth. In effect, we will use the hybrid
model shown in Figure 14 as the framework.
5
Application layer
4
Transport layer
3
Network layer
2
Data link layer
1
Physical layer
Figure 14. The hybrid reference model to be used in this course.
9. Packet Switching and Circuit Switching
A wide area network (WAN) connects one node to another over relatively large
distance via switching networks. There are two main types of connection
technologies over the public telephone network: Circuit-switching and Packetswitching, Figure 15.
Circuit-Switched Networks. In circuit-switched networks, network resources are
reserved all the way from sender to receiver before the start of the transfer, thereby
creating a circuit. The resources are dedicated to the circuit during the whole
transfer. Control signaling and payload data transfers are separated in circuitswitched networks. Processing of control information and control signaling such
Prof. M. Gerla & R. Dzhanidze. Class CS 117. Ch. 2a
32
as routing is performed mainly at circuit setup and termination. Consequently, the
transfer of payload data within the circuit does not contain any overhead in the
form of headers or the like. Traditional voice telephone service is an example of
circuit switching. An advantage of circuit-switched networks is that they allow
for large amounts of data to be transferred with guaranteed transmission capacity,
thus providing support for real-time traffic. A disadvantage of circuit switching,
however, is that if connections are short-lived when transferring short messages,
for example the setup delay may represent a large part of the total connection time,
thus reducing the network's capacity. Moreover, reserved resources cannot be used
by any other users even if the circuit is inactive, which may further reduce link
utilization.
Networking Technologies
Circuit Switching
FDM
Static
SDH/SONET
TDM
Dynamic
DTM
Packet Switching
ConnectionOriented
ConnectionLess
With VCs
Datagram Net
ATM
Gigabit
Ethernet
Figure 15. Technology Overview
Typical example of circuit switched connection is the public-switched telephone
network (PSTN). The connection must be made before transferring any data. Its
main disadvantage is that a permanent connection is set-up between the nodes, that
requires comparatively long time. Another disadvantage is that the transmitting
and receiving nodes must be operating at the same speed, also, it does not perform
any error detection or flow control.
Packet-Switched Networks Packet switching was developed to cope more
effectively with the data-transmission limitations of the circuit-switched networks
during bursts of random traffic. In packet switching, a data stream is divided into
Prof. M. Gerla & R. Dzhanidze. Class CS 117. Ch. 2a
33
standardized packets. Each contains address, size, sequence, and error-checking
information, in addition to the payload data. The packets are then sent through the
network, where specific packet switches or routers sort and direct each single
packet. Packet-switched networks are based either on connectionless or
connection-oriented technology. In connectionless technology, such as IP,
packets are treated independently of each other inside the network, because
complete information concerning the packet destination is contained in each
packet. This means that packet order is not always preserved, take different paths
through the network. In connection-oriented technology such as asynchronous
transfer mode (ATM), a path through the network—often referred to as a logical
channel or virtual circuit—is established when data transfer begins. Each packet
header then contains a channel identifier that is used at the nodes to guide each
packet to the correct destination.
In many aspects, a packet-switched network is a network of queues. Each network
node contains queues* where incoming packets are queued before they are sent
out on an outgoing link. If the rate at which packets arrive at a switch point
exceeds the rate at which packets can be transmitted, the queues grow. This
happens, for example, if packets from several incoming links have the same
destination link. The queuing causes delay, and if the queues overflow, packets
are lost, which is called congestion. Loss of data generally causes retransmissions
that may either add to the congestion or result in less-effective utilization of the
network. The ability to support real-time traffic in packet-switched networks thus
calls for advanced control mechanisms for buffer handling and direction. As a
result, the complexity and necessary ability to process information, and therefore
the need for computer power, increases sharply when attempt for high
transmission capacity.
*Queue:
1. A collection of items, such as telephone calls, that is arranged in sequence.
Queues are used to store data or log events that occur at random times so that
they may be serviced according to a prescribed discipline that may be fixed or
adaptive.
2. A list or string of items that (a) usually have accumulated over time and (b) are
to be processed in some way and in some sequence, such as examined for a
particular quality and selected from either end or at random.
Prof. M. Gerla & R. Dzhanidze. Class CS 117. Ch. 2a
34
Packet-switching network differs from circuit switching in that the path is not an
actual physical circuit, but it is normally defined as a virtual circuit. This virtual
circuit requires time for communication set-up. Packet switching is one the way
that most people can gain access to computer network to provide switched access
from remote terminals.
Communications between computers, or between computers and terminals, always
involves the transfer of data in blocks rather than continuous data streams. As
Figure 16 shows, packet switching exploits the fact that data blocks can be
transferred between terminals without setting up an end-to-end connection through
the network. Instead they are transmitted on a link-by-link basis, being stored
temporarily at each switch en route where they queue for transmission on an
appropriate outgoing link. Routing decisions are based on addressing information
contained in a “header” appended to the front of each data block. The term
“packet” refers to the header plus data block.
“store & forward”
switches
M1
M2
M3
M5
M4
M4
M1
Remote
Terminal
Data block
Header
Figure 16. Pocket switching
In fact the idea of store-and-forward switching in this way is older than packet
switching. It has been used in a variety of forms to provide massage switched
series in which users could send messages with the advantages of delayed delivery
and broadcast options and retransmission if the message was garbled or lost in
transmission. The distinctive feature of packet switching is that the packets, and
Prof. M. Gerla & R. Dzhanidze. Class CS 117. Ch. 2a
35
consequently the queuing delays in the network, are short enough to allow
interactive transactions.
By adding an error-detecting checksum (in effect a complex parity check) to the
end of each packet errors can be detected on a link-by-link basis and corrected by
retransmission. At each switching node en route packets would be stored until
their correct receipt is acknowledged. This arrangement can also provide a high
degree of protection against failures in the network since packet can be rerouted to
bypass faulty switches or links without the user being aware of a problem.
10. Connection-Oriented and Connectionless Services
Layers can offer two different types of service to the layers above them:
connection-oriented and connectionless.
Connection-oriented service is modeled after the telephone system. To talk to
someone, speaker picks up the phone, dials the number, talks, and then hangs up.
Similarly, to use a connection-oriented network service, the service user first
establishes a connection, uses the connection, and than releases the connection. 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.
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 delivered 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 acknowledgment 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.
Prof. M. Gerla & R. Dzhanidze. Class CS 117. Ch. 2a
36
The concept of using unreliable communication may be confusing at first. After
all, why would anyone actually prefer unreliable communication to reliable
communication? First of all, reliable communication (in our sense, that is,
acknowledged) may not be available. For example, Ethernet does not provide
reliable communication. Packets can occasionally be damaged in transit. It is up to
higher protocol levels to deal with this problem. Second, the delays inherent in
providing a reliable service may be unacceptable, especially in real-time
applications such as multimedia. For these reasons, both reliable and unreliable
communications coexist.