ch9 PDF
ch9 PDF
ch9 PDF
Packet Switching
Qinqing Zhang and Qi Bi, Bell Laboratory, Alcatel-Lucent Technologies
136
136
136
137
137
138
138
139
141
141
141
142
143
144
144
145
145
139
INTRODUCTION TO PACKET
SWITCHING
Packet switching is the dominant communication technology in modern data networking and telecommunications.
In previous chapters, the concepts of computer networks
were introduced and different type of networks were described based on scale, connection method, functionality,
topology, or services. The communication between computers or devices involves the term switching, which describes how information is exchanged between the input
ports and output ports at each network element.
There have always been two fundamental and competing switching technologies in communications: static
allocation and dynamic allocation of the transmission
bandwidth. The public switched telephone network
(PSTN) is a typical circuit-switched network, where a xed
bandwidth is pre-allocated for the duration of a call. The
early radio system, that is the advanced mobile phone
systems (AMPS), is also circuit-switched where the radio
spectrum is pre-allocated during a mobile call. On the other
hand, message, telegraph, and mail systems have been
operated by dynamically allocating bandwidth or spaces
after a message is received at the time. They never attempt
to schedule bandwidth or space over the end-to-end
source to destination path.
There are three major switching techniques, that is,
packet switching, circuit switching, and message switching.
In packet switching, packets (units of information block)
are individually routed among nodes over data links that are
shared by many other nodes in the data networks. In contrast with circuit switching that pre-allocates the transmission bandwidth for a user, packet switching allocates the
transmission bandwidth dynamically, permitting many
users to share the same transmission link previously required by one user. This improves the transmission efciency especially when users transmit at variable bit rates.
Packet switching optimizes the usage of the bandwidth
available in a network and saves the transmission cost.
It also improves the reliability and functional exibility
of packet delivery in communication networks. Packet
switching has been so successful and become the exclusive
136
FUNDAMENTALS OF PACKET
SWITCHING
Packets
A packet is a block of data that carries user information
exchanged over a communication link. It usually consists
of three elements: header, payload, and trailer, as shown in
Figure 1. The rst element, header, contains address and
administrative information that allows the packet be delivered by the network nodes from the source to the destination. The second element, payload, contains the user
information that needs to be exchanged in the network.
The third element, trailer, usually contains information for
error detection, allowing receivers to verify that packets
do not have errors during transmission. (If errors occur
during transmission and cannot be corrected, the packet
is usually discarded.) Sometimes, a packet may not have a
trailer. The payload together with the header contains all
the information needed for packet delivery.
A packet is analogous to a letter (payload) sent through
the mail (network) with the address (header) written
on the envelope.
Unlike a message (in message switching), the length of
a packet is limited and can vary between successive packets. Packets are usually transmitted via frames, which are
either xed-length or variable length data blocks transmitted over the actual physical links. Sometimes packets and
frames are interchangeable in some places but they actually have different meaning. Packets are usually referred
Header
Payload
Trailer
Nodes
A node is a physical device that is connected as part of a
data network. Nodes can be personal computers, workstations or servers, specialized data processors, cell phones,
personal digital assistants (PDAs), or various other network appliances. Depending on their functionalities,
nodes can be characterized in different types. For example, in the SNA (systems network architecture) network
architecture invented in early stages of computer networks
(Cypser 1978), there are four type of nodes dened. Type
I nodes are terminals. Type 2 nodes are controllers,
machines that supervise the behaviors of terminals. Type 4
nodes are front-end processors, devices that relieve the
main CPU of the processing and interrupt handling in
data communications. Type 5 nodes are the main hosts
themselves. There are no type 3 nodes. Nodes that route
data for the other network devices as well as themselves
are sometimes called super-nodes.
Packet Switching
Circuit Switching and Packet Switching
Computer-to-computer communication has some fundamentally differences from human-to-human communication. When you or your telephone places a telephone call,
the switching equipment at the central ofce attempts to
allocate a physical path all the way from the callers telephone to the called telephone. This switching technique is
called circuit switching. Figure 2 shows a simplied schematic model of circuit switching. In this example, there
are multiple switching elements between the two telephones. Each switch has the same number of incoming
lines and outgoing lines. When a call is placed through a
switch, a physical connection is established between the
incoming ports and outgoing ports. The dotted line shows
the allocated physical path between the two end points.
This dedicated link exists during the entire phone conversation. An important property of circuit switching is that
it needs certain time to setup an end-to-end connection
137
138
PACKET SWITCHING
A3 A2 A1
A3 A2 B2 A1
Message to user A
A3 A2 A1
User A
B3 B2 B1
B2
Message to user B
B3 B1
B3 B2 B1
User B
139
sense of making connections and relaying the speech information. In a packet-switched network, for example, in
the Ethernet local area network (LAN), a switch examines the physical devices media access control or MAC
address in each incoming packet and determines which
output port to forward the packet. Figure 4 illustrates a
simplied structure of a switch matrix in a central ofce.
All the outgoing trunk circuits (numbered 1 to 4) may be
accessed by any of the customer lines (marked A to D).
Figure 5 illustrates a simplied internal structure of a
packet switch device. It consists of a bus, or multiple
buses, connecting together each of the incoming and outgoing ports. Packets received from any of the incoming
ports are rst stored in the buffers. The switching logic
analyzes the address in the packet header and decides
which outgoing port the packet is sent to.
A switch usually uses store-and-forward, or cut-through
forwarding method. In store-and-forward method, the
switch receives and buffers each frame entirely, typically
performs a checksum on the frame, and then forwards
it on the output port. In cut-through method, the switch
only checks the frames physical layer address and then
forwards it to the output port. It does not do any error
checking on the frame.
A switch only connects data from an incoming port
to an output port. It does not monitor the trafc because
each port is isolated, and only the sending and receiving ports are connected when they transmit the data.
Two common methods, that is, port mirroring and switch
monitoring (SMON), were specically designed to allow
A
B
C
D
Port A
Port B
Switches
A switch is a computer networking device that channels
incoming data from any of the multiple incoming physical ports to a specic output port toward its destination.
Switches are used in both circuit-switched networks
and packet-switched networks. In the traditional circuitswitched telephone network, one or more switches are
used to set up a dedicated connection or circuit for an exchange between two or more parties. A telephone exchange
or central ofce houses equipment that is commonly known
as simply a switch, which is a piece of equipment that
connects phone calls. It makes phone calls work in the
Port 1
Port 2
140
PACKET SWITCHING
Bridges
A bridge is a computer networking device that connects
multiple network segments along the data link layer to
operate as a single network. It works by using bridging as
what its name entails, by connecting two sides of the adjacent networks. It forwards the trafc from one network
to another network.
A bridge has intelligence built in the hardware to determine which packets should be transferred into another network. It examines the addresses (indicating a
destination service access point and a source service access point) in the logical link control (LLC) header of each
packet and transfers the relevant packets to the second
network directly or via a second bridge. If the physical
structure of the two networks is different, for example,
one network is an Ethernet, the other is a token ring as
shown in Figure 6, the bridge will transform the packet
into the right format.
Primitive bridges are relatively cheap. They provide a
very economic means for self-congurable interconnection. However, bridges have some limitations of their usage and functionalities. They do not limit the scope of
broadcasts and do not scale to large networks. Bridges
result in very complicated topologies that are extremely
difcult to manage. Thus bridges are not recommended
for large and complex networks. Instead, the router appears and is used to provide a more complex and intelligent functionality of interconnection in packet-switched
networks.
Gateways
A gateway is a computer networking device for interfacing with another network that uses different protocols. It
is also called a protocol converter and can operate at any
layer of the network model. The function of a gateway
is much more complex than that of a router or switch.
Typically, a gateway must convert one protocol stack into
another.
A gateway may contain devices such as protocol translators, impedence matching devices, rate converters, fault
isolators, or signal translators as necessary to provide system interoperability. It also requires the establishment of
mutually acceptable administrative procedures between
the two networks. A protocol translation/mapping gateway interconnects networks with different network protocol technologies by performing the required protocol
conversions.
For example, a gateway may connect a local area network (LAN) or wireless LAN (WLAN) to the Internet or
other wide area network (WAN). In this case the gateway
connects an IPX/SPX (the LAN) to a TCP/IP network (the
Internet), as shown in Figure 8.
Gateways that connect two IP-based networks, like
TCP/IP, have two IP addresses, one on each network. An
address like 192.168.1.xxx is an address in LAN, to which
trafc is sent from the LAN. The other IP address is an
Routers
A router is a computer networking device that forwards
data packets across the network toward their destinations
based on the routing algorithms. A router acts as a junction between two networks and transfers data packets
between them (see Figure 7). Routers are more intelligent
than switches and bridges. They are designed to learn
the topology of complicated networks that are constantly
changing and expanding and determine the best route
for packets or packet ows to their destinations. The key
design of routers is the routing algorithm. Routers can
learn the network topology through experience, that is,
the previous successful routes, and update the routing
table accordingly.
Router
Router
Router
IP Network
LAN
Ethernet LAN
Gateway
Bridge
141
Frame Relay
Frame relay is a standard protocol for fast packet switching in LAN. It has much less overhead than the earlier
X.25 networks and operates more efciently. Packets vary
in length and are call frames for this protocol. Erroneous or bad frames are discarded instead of retransmitted
and thus packets are switched more quickly. Frame relay
began its commercial service in 1992 and is now widely
deployed.
Standards for the frame relay protocol have been developed by American National Standards Institute (ANSI)
and International telephone and telegraph consultative
committee (CCITT), now known as ITU-T simultaneously.
Frame relay is essentially an enhancement of X.25,
taking advantage of the widespread implementation of
ber optic communication links by long-distance carriers. Fiber is much less prone to introducing errors in
a data stream. Therefore frame relay does not use the
Packet-Switched
Network
Figure 9: X.25
structure
data
network
DTE
DCE
DCE
DTE
142
PACKET SWITCHING
ATM
ATM stands for asynchronous transfer mode. ATM is
a high-speed advanced packet-switching scheme. ATM
makes all its packets one length, i.e., the so called
ATM cells. Each cell has 53 bytes, 48 bytes of data, and
5 bytes of header information. These uniformly small
packets or cells let data ow smoothly. ATM also boasts
improved error control compared to conventional packet
switching, as well as numerous other features that make
it a core technology of data networks.
ATM was initially designed to provide a single unied
networking standard that could support both synchronous channel networking and packet-based networking
(IP, frame relay, and so on), whilst supporting multiple
levels of quality of service (QoS) for packet data. It was
intended to resolve the conict between circuit-switched
networks and packet-switched networks by mapping both
bit streams and packet streams onto a stream of small
xed-size cells tagged with virtual circuit identiers. The
cells are typically sent on demand within a synchronous
time-slot pattern in a synchronous bit-stream. The asynchronous part here is the sending of the cells, which does
not need to follow any synchronous pattern.
In its original conception, ATM was considered as the
enabling technology of the broadband integrated services
digital network (B-ISDN) that would replace the existing
PSTN. The full suite of ATM standards provides denitions
Virtual channel (VC): A VC is a generic term representing the unidirectional transport of ATM cells. The cells
carried over a specic VC are identied by a Virtual
channel identier (VCI).
Virtual path (VP): A VP is used to describe a bundle of
VCs. The VCs associated with a VP are transported over
a transmission path within the network as a group. A
VP is identied by a virtual path identier (VPI).
Convergence sublayer (CS): The CS provides the functions needed to support specic services and applications using the ATM transport. The CS is service and
application dependant. Each user attaches to AAL at a
service access point (SAP). The SAP is simply the address of the user application.
Segmentation and reassembly sublayer (SAR): The SAR
sublayer provides the functions of generating cells with
the data received from CS and retrieving the data from
the cells for delivery to CS.
143
less central management. However, because of the automatic recovery, network problems can go undiagnosed
and uncorrected for long periods of time.
TCP
Virtual channel connection (VCC): A VCC extends between points where adaptation layer functionality is
performed. The basic function of the adaptation layer
is to format data for transport over an ATM connection
on the sending end and extract data at the receiving
end. These points are VC connection end points.
Virtual path connection (VPC): A VPC extends from the
point at which VCs are assigned with VCI values and
associated with a VP, to the point where VCs are removed from the VP or have their VCI values modied.
These end points are referred to as the VP connection
end points.
VC and VP connections are established by the permanent VC (PVC) by a network operator manually, or the
switched VC (SVC), established on demand by signaling
procedures between the connection end points.
ATM provides a highly complex technology, with features intended for applications ranging from global telecommunication networks to private local area computer
networks. ATM has been a partial success as a technology,
with widespread deployment, but generally only used as
a transport for IP trafc. Its goal of providing a single integrated technology for LANs, public networks, and user
services has not been achieved.
TCP/IP
The Internet protocol suite is the set of communications
protocols that implement the protocol stack on which the
Internet and most commercial networks run. The TCP/IP
protocol suite has the two most important protocols: the
transmission control protocol (TCP) and the Internet
protocol (IP).
TCP and IP were initially developed by a research
project for the Department of Defense (DOD). The goal
was to connect a number of different networks from different vendors into a network of networks (the so-called
Internet). The Internet protocol suite includes not only
lower-level specications (such as TCP and IP), but also
specications for common applications such as electronic
mail, terminal emulation, and le transfer. Several computers in a small department can use TCP/IP (along with
other protocols) on a single LAN. The IP component provides routing from the department to the enterprise network, then to regional networks, and nally to the global
Internet. A communication network needs to sustain damage on a battleeld. Therefore, the DOD designed TCP/IP
a robust protocol suite that has the capability of automatically recovery from any node or phone line failure. This
design allows the construction of very large networks with
IP
IP is the primary layer 3 protocol in the Internet suite.
The main function of IP layer is to route packets in different network segments. In addition, IP provides fragmentation and reassembly of datagrams (that is, information
units) for transmission over networks with different maximum transmission unit (MTU) sizes. IP represents the
heart of the Internet protocol suite.
IP Addressing
IP address is a globally unique, 32-bit number assigned
by the network information center and network administrator. Globally unique addresses permit IP networks
anywhere in the world to communicate with each other.
By convention, each byte in a 4-byte IP address is expressed as a decimal number (0 to 255) and separated
with a period. For example, the IP address of my machine
is 192.168.1.36.
An IP address is divided into two parts. The rst part
designates the network address; and the second part designates the host address. IP addressing supports three
different network classes. Class A networks allocate 8 bits
for the network address eld and are intended mainly for
use with a few very large networks. Class B networks allocate 16 bits and are intended for use with large networks.
Class C networks allocate 24 bits for the network address
eld and are intended for use with small networks. Class
C networks only provide 8 bits for the host eld. Therefore
144
PACKET SWITCHING
Class A 0
Network
Host
Class B 10
Network
Host
Class C 110
Network
Host
the number of hosts per class C network may be a limiting factor. In all three cases, the left most bit(s) indicate
the network class. Figure 10 shows the address formats
for class A, B, and C IP networks.
It is convenient for most class A and class B networks
to be internally managed as a much smaller and simpler
version of the large network organizations. The two or
three bytes available for host address are often divided
into a subnet number and a workstation ID. Subnets provide extra exibility for the network administrator. The
administrator can subdivide the network into small units.
This is done by borrowing bits from the host portion of
the address and using them as a subnet eld, as depicted
in Figure 11.
The number of bits that can be borrowed for the subnet address varies. To specify how many bits are used
and where they are located in the host eld, IP provides
subnet masks. Subnet masks use the same format and
representation technique as IP addresses. Subnet masks
have ones in all bits except those that specify the host
eld. For example, the subnet mask that species 8 bits
of sub-netting for class A address 192.0.0.0 is 255.255.0.0.
The subnet mask that species 16 bits of sub-netting for
class A address 192.0.0.0 is 255.255.255.0. Subnet masks
can be passed through a network on demand so that new
nodes can learn how many bits of sub-netting are being
used on the network.
IP Routing
An internet is a group of interconnected networks.
The Internet is the collection of networks that permits
communication between most research institutions,
GLOSSARY
10
Network
Host
10
Network
Subnet Host
REFERENCES
CROSS REFERENCES
See ATM (Asynchronous Transfer Mode); Circuit Switching; Frame Relay; Message Switching; TCP/IP Suite.
REFERENCES
ANSI T1-618. 1991. Core aspects of frame protocol for
use with frame relay bearer service. Integrated Services Digital Network (ISDN).
Baran, P. 1964. On distributed communications: Introduction to distributed communications network.
Memorandum RM-3420-PR. RAND Corporation.
http://www.rand.org/publications/RM/baran.list.html.
Baran, P. 1964. On distributed communications networks,
IEEE Transactions on Communications, 12(1), 19.
145