Switching Networks Unit-i
Switching Networks Unit-i
Networking
1
Overview
• Networks are used to interconnect many devices.
• Now, wide area networks
— Since the invention of the telephone, circuit switching
has been the dominant technology for voice
communications.
— Since 1970, packet switching has evolved
substantially for digital data communications. It was
designed to provide a more efficient facility than circuit
switching for bursty data traffic.
• Two types of packet switching:
– Datagram (such as today’s Internet)
– Virtual circuit (such as Frame Relay, ATM)
2
Circuit Switching Example
3
Circuit Switching
• A Circuit switching network is made of a set of switches
connected by physical links,in which each link is divided
into n channels.
• After all data have been transferred, the circuits are torn
down.
5
Circuit Switching Properties
• Inefficiency
— Channel capacity is dedicated for the whole duration of
a connection
— If no data, capacity is wasted
• Delay
— Long initial delay: circuit establishment takes time
— Low data delay: after the circuit establishment,
information is transmitted at a fixed data rate with no
delay other than the propagation delay. The delay at
each node is negligible.
• Developed for voice traffic (public telephone
network) but can also applied to data traffic.
— For voice connections, the resulting circuit will enjoy a
high percentage of utilization because most of the time
one party or the other is talking.
— But how about data connections?
6
Public Circuit Switched Network
8
Basic Operation
• Data are transmitted in short packets
— Typically at the order of 1000 bytes
— Longer messages are split into series of packets
— Each packet contains a portion of user data plus some
control info
• Control info contains at least
— Routing (addressing) info, so as to be routed to the
intended destination
• store and forward
— On each switching node, packets are received, stored
briefly (buffered) and passed on to the next node.
9
Use of Packets
10
Advantages of Packet Switching
• Line efficiency
— Single node-to-node link can be dynamically shared by
many packets over time
— Packets are queued up and transmitted as fast as
possible
• Data rate conversion
— Each station connects to the local node at its own speed
• In circuit-switching, a connection could be
blocked if there lacks free resources. On a
packet-switching network, even with heavy
traffic, packets are still accepted, by delivery
delay increases.
• Priorities can be used
— On each node, packets with higher priority can be
forwarded first. They will experience less delay than
lower-priority packets. 11
Packet Switching Technique
• A station breaks long message into
packets
• Packets are sent out to the network
sequentially, one at a time
• How will the network handle this stream of
packets as it attempts to route them
through the network and deliver them to
the intended destination?
—Two approaches
• Datagram approach
• Virtual circuit approach
12
Datagram
• Each packet is treated independently, with
no reference to packets that have gone
before.
—Each node chooses the next node on a
packet’s path.
• Packets can take any possible route.
• Packets may arrive at the receiver out of
order.
• Packets may go missing.
• It is up to the receiver to re-order packets
and recover from missing packets.
• Example: Internet 13
Datagram
14
Virtual Circuit
• In virtual circuit, a preplanned route is
established before any packets are sent,
then all packets follow the same route.
• Each packet contains a virtual circuit
identifier instead of destination address,
and each node on the pre established
route knows where to forward such
packets.
—The node need not make a routing decision for
each packet.
• Example: X.25, Frame Relay, ATM
15
Virtual
Circuit
16
Source-Destination data transfer in virtual
circuit network
17
Virtual Circuits v Datagram
• Virtual circuits
— Network can provide sequencing (packets arrive at the
same order) and error control (retransmission between
two nodes).
— Packets are forwarded more quickly
• Based on the virtual circuit identifier
• No routing decisions to make
— Less reliable
• If a node fails, all virtual circuits that pass through that
node fail.
• Datagram
— No call setup phase
• Good for bursty data, such as Web applications
— More flexible
• If a node fails, packets may find an alternate route
• Routing can be used to avoid congested parts of the
network 18
Delay in circuit switching
19
Delay in Datagram
20
Delay in virtual circuit network
21