Er. Vikas Goyal
A.P. (ECE department, PIET)
Unit 1: Physical Layer and Media
Circuit Switching and Packet
Switching
1
Switched Communications Networks
• Long distance transmission between stations (called “end devices”) is
typically done over a network of switching nodes.
• Switching nodes do not concern with content of data. Their purpose is
to provide a switching facility that will move the data from node to
node until they reach their destination (the end device).
• A collection of nodes and connections forms a communications
network.
• In a switched communications network, data entering the network
from a station are routed to the destination by being switched from
node to node.
Simple Switching Network
Switching Nodes
• Nodes may connect to other nodes, or to some stations.
• Network is usually partially connected
• However, some redundant connections are desirable for reliability
• Three different switching technologies/Switched networks are:
• Circuit switching
• Packet switching
• Message switching
4
Circuit Switching
• Circuit switching:
• There is a dedicated communication path between two stations (end-to-end)
• The path is a connected sequence of links between network nodes. On each physical
link, a logical channel is dedicated to the connection.
• Communication via circuit switching has three phases:
• Circuit establishment (link by link)/Setup Phase
• Routing & resource allocation (FDM or TDM)
• Data transfer
• Circuit disconnect/ Teardown Phase
• Deallocate the dedicated resources
• The switches must know how to find the route to the destination and how to
allocate bandwidth (channel) to establish a connection.
5
A circuit-switched network is made of a set of switches connected by physical
links, in which each link is divided into n channels.
A trivial circuit-switched network
• Figure shows a trivial circuit-
switched network with four
switches and four links. Each
link is divided into n (n is 3 in
the figure) channels by using
FDM or TDM.
Important Points for Circuit Switching
• Circuit switching takes place at the physical layer.
• Before starting communication, the stations must make a reservation for the
resources to be used during the communication. These resources, such as
channels (bandwidth in FDM and time slots in TDM), switch buffers, switch
processing time, and switch input/output ports, must remain dedicated
during the entire duration of data transfer until the teardown phase.
• Data transferred between the two stations are not packetized (physical layer
transfer of the signal).
• There is no addressing involved during data transfer. The switches route the
data based on their occupied band (FDM) or time slot (TDM).
In circuit switching, the resources need to be reserved during the setup phase; the resources
remain dedicated for the entire duration of data transfer until the teardown phase.
As a trivial example, let us use a circuit-switched network to connect eight telephones
in a small area. Communication is through 4-kHz voice channels. We assume that each
link uses FDM to connect a maximum of two voice channels. The bandwidth of each link
is then 8 kHz. Figure 8.4 shows the situation. Telephone 1 is connected to telephone 7;
2 to 5; 3 to 8; and 4 to 6. Of course the situation may change when new connections are
made. The switch controls the connections
Circuit Switching Properties
• Inefficiency
• Channel capacity is dedicated for the whole
duration of a connection
• If no data is send, 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.
9
Packet Switching Principles
• Problem of circuit switching
• designed for voice service
• Resources dedicated to a particular call
• For data transmission, much of the time the connection is idle (say, web
browsing)
• Data rate is fixed
• Both ends must operate at the same rate during the entire period of connection
• Packet switching is designed to address these problems.
• Categorize in two parts:
• Datagram network switching
• Virtual switching
10
Datagram Switching
• Data are transmitted in short packets
• Longer messages are split into series of packets
• Size of the packet is determined by the net­
work and the governing protocol.
• 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
• On each switching node, packets are received, stored briefly (buffered) and passed on to the
next node.
• There is no resource reservation; resources are allocated on demand.
• The allocation is done on a first­come, first-served basis.
• Datagram switching is normally done at the network layer.
Datagram network with four switches (routers)
• Each packet treated independently.
• Packets can take any practical route.
• Packets may arrive out of order.
• Packets may get lost or delayed.
• Up to receiver to re-order packets and recover from missing packets.
Characteristics of Datagram
Switching
13
Routing Table:
• Each switch (or packet switch) has a rout­i
ng table
which is based on the destination address.
• The routing tables are dynamic and are updated
periodically.
• The destination addresses and the corresponding
forwarding output ports are recorded in the tables.
The destination address in the header of a packet in a datagram network remains
the same during the entire journey of the packet.
Efficiency :
• The efficiency of a datagram network is better than that of a circuit-switched network.
• The resources are allocated only when there are packets to be transferred.
• The resources can be reallocated during waiting time for other packets from other
sources.
Delay
• Greater delay in a datagram network
than in a virtual-circuit network.
• No setup and teardown phases, each
packet may experience a wait at a switch
before it is forwarded.
• All packets in a message necessarily not
travel through the same switches, the
delay is not uniform for the packets of a
message.
Total delay = 3T + 3t + w1 + w2
There are three transmission times (3T), three propagation delays (slopes 3t of the lines) and two waiting times (w1 + w2)
Virtual Switching
A virtual-circuit network is a cross between a circuit-switched network and a
datagram network, i.e., normally implemented in the data link layer
• As in a circuit-switched network, there are setup and teardown phases in addition
to the data transfer phase.
• Resources can be allocated during the setup phase, as in a circuit-switched
network, or on demand, as in a datagram network.
• As in a datagram network, data are packetized and each packet carries an address
in the header. However, the address in the header has local jurisdiction (it defines
what should be the next switch and the channel on which the packet is being
carried), not end-to-end jurisdiction
• As in a circuit-switched network, all packets follow the same path established
during the connection.
An example of a virtual-circuit network. The network has switches that allow traffic
from sources to destinations. A source or destination can be a computer, packet
switch, bridge, or any other device that connects other networks.
Addressing
• Two types of addressing are involved: global and local (virtual-circuit identifier)
Global Addressing:
• A source or a destination needs to have a global unique if the network is part of an
international network.
Virtual-Circuit Identifier:
• A VCI, unlike a global address, is a small number that has only switch scope; it is used by a
frame between two switches.
• When a frame arrives at a switch, it has a VCI; when it leaves, it has a different VCI.
• Figure shows how the VCI in a data frame changes from one switch to another.
A source and destination need to go through
three phases in a virtual-circuit network:
setup, data transfer, and teardown
Data Transfer Phase
• To transfer a frame from a source to its
destination, all switches need to have a table
entry for this virtual circuit.
• The switch holds four pieces of information
for each virtual circuit that is already set up.
• But for the moment we assume that each
switch has a table with entries for all active
virtual cir­
cuits.
• The data transfer phase is active until the
source sends all its frames to the destina­
tion.
• The process creates a virtual circuit, not a
real circuit, between the source and
destination.
• Switch 2 receives the setup request frame. The
same events happen here as at switch 1.
• Switch 3 receives the setup request frame. Again,
three columns are completed: incoming port (2),
incoming VCI (22), and outgoing port (3).
• Destination B receives the setup frame, and if it is
ready to receive frames from A, it assigns a VCI to
the incoming frames that come from A, in this
case 77. This VCI lets the destination know that
the frames come from A, and not other sources.
Setup Phase
In the setup phase, two steps are required: the setup request and the acknowledgment.
Setup Request: A setup request frame is sent from the source to the destination. Figure shows the process.
• Source A sends a setup frame to switch 1.
• Switch 1 receives the setup request frame. It knows that a frame going from A to B goes out through port 3. The
switch then forwards the frame through port 3 to switch 2
Acknowledgment: A special frame, called the acknowledgment frame, completes the entries in the switching
tables.
a. The destination sends an acknowledgment to switch 3. The acknowledgment carries the global source and
destination addresses so the switch knows which entry in the table is to be completed. The frame also carries
VCI 77, chosen by the destination as the incoming VCI for frames from A.
b. Switch 3 sends an acknowledgment to switch 2 that contains its incoming VCI in the table.
c. Switch 2 sends an acknowledgment to
switch 1 that contains its incoming VCI in
the table.
d. Finally switch 1 sends an acknowledgment
to source A that contains its incoming VCI in
the table,.
e. The source uses this as the outgoing VCI for
the data frames to be sent to destination B.
Teardown Phase
• In this phase, source A, after sending all
frames to B, sends a special frame called a
teardown request. Destination B responds
with a teardown confirmation frame.
• All switches delete the corresponding entry
from their tables.
A source and destination need to go through
three phases in a virtual-circuit network:
setup, data transfer, and teardown
Data Transfer Phase
• To transfer a frame from a source to its
destination, all switches need to have a table
entry for this virtual circuit.
• The switch holds four pieces of information
for each virtual circuit that is already set up.
• But for the moment we assume that each
switch has a table with entries for all active
virtual cir­
cuits.
• The data transfer phase is active until the
source sends all its frames to the destina­
tion.
• The process creates a virtual circuit, not a
real circuit, between the source and
destination.
Characteristics of Virtual Networking
Efficiency:
• The resource reservation in a virtual-circuit network
can be made during the setup or can be on demand
during the data transfer phase.
• In the first case, the delay for each packet is the
same.
• In the second case, each packet may encounter
different delays.
Delay:
• In a virtual-circuit network, there is a one-time
delay for setup and a one-time delay for teardown.
• The packet is traveling through two switches
(routers). There are three transmis­
sion times (3T),
three propagation times (3t).
• Total delay= 3T + 3t + setup delay+ teardown delay
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.
23
Comparison of communication switching techniques

Unit 1 Circuit and Packet Switching.pptx

  • 1.
    Er. Vikas Goyal A.P.(ECE department, PIET) Unit 1: Physical Layer and Media Circuit Switching and Packet Switching 1
  • 2.
    Switched Communications Networks •Long distance transmission between stations (called “end devices”) is typically done over a network of switching nodes. • Switching nodes do not concern with content of data. Their purpose is to provide a switching facility that will move the data from node to node until they reach their destination (the end device). • A collection of nodes and connections forms a communications network. • In a switched communications network, data entering the network from a station are routed to the destination by being switched from node to node.
  • 3.
  • 4.
    Switching Nodes • Nodesmay connect to other nodes, or to some stations. • Network is usually partially connected • However, some redundant connections are desirable for reliability • Three different switching technologies/Switched networks are: • Circuit switching • Packet switching • Message switching 4
  • 5.
    Circuit Switching • Circuitswitching: • There is a dedicated communication path between two stations (end-to-end) • The path is a connected sequence of links between network nodes. On each physical link, a logical channel is dedicated to the connection. • Communication via circuit switching has three phases: • Circuit establishment (link by link)/Setup Phase • Routing & resource allocation (FDM or TDM) • Data transfer • Circuit disconnect/ Teardown Phase • Deallocate the dedicated resources • The switches must know how to find the route to the destination and how to allocate bandwidth (channel) to establish a connection. 5 A circuit-switched network is made of a set of switches connected by physical links, in which each link is divided into n channels.
  • 6.
    A trivial circuit-switchednetwork • Figure shows a trivial circuit- switched network with four switches and four links. Each link is divided into n (n is 3 in the figure) channels by using FDM or TDM.
  • 7.
    Important Points forCircuit Switching • Circuit switching takes place at the physical layer. • Before starting communication, the stations must make a reservation for the resources to be used during the communication. These resources, such as channels (bandwidth in FDM and time slots in TDM), switch buffers, switch processing time, and switch input/output ports, must remain dedicated during the entire duration of data transfer until the teardown phase. • Data transferred between the two stations are not packetized (physical layer transfer of the signal). • There is no addressing involved during data transfer. The switches route the data based on their occupied band (FDM) or time slot (TDM). In circuit switching, the resources need to be reserved during the setup phase; the resources remain dedicated for the entire duration of data transfer until the teardown phase.
  • 8.
    As a trivialexample, let us use a circuit-switched network to connect eight telephones in a small area. Communication is through 4-kHz voice channels. We assume that each link uses FDM to connect a maximum of two voice channels. The bandwidth of each link is then 8 kHz. Figure 8.4 shows the situation. Telephone 1 is connected to telephone 7; 2 to 5; 3 to 8; and 4 to 6. Of course the situation may change when new connections are made. The switch controls the connections
  • 9.
    Circuit Switching Properties •Inefficiency • Channel capacity is dedicated for the whole duration of a connection • If no data is send, 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. 9
  • 10.
    Packet Switching Principles •Problem of circuit switching • designed for voice service • Resources dedicated to a particular call • For data transmission, much of the time the connection is idle (say, web browsing) • Data rate is fixed • Both ends must operate at the same rate during the entire period of connection • Packet switching is designed to address these problems. • Categorize in two parts: • Datagram network switching • Virtual switching 10
  • 11.
    Datagram Switching • Dataare transmitted in short packets • Longer messages are split into series of packets • Size of the packet is determined by the net­ work and the governing protocol. • 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 • On each switching node, packets are received, stored briefly (buffered) and passed on to the next node. • There is no resource reservation; resources are allocated on demand. • The allocation is done on a first­come, first-served basis. • Datagram switching is normally done at the network layer.
  • 12.
    Datagram network withfour switches (routers) • Each packet treated independently. • Packets can take any practical route. • Packets may arrive out of order. • Packets may get lost or delayed. • Up to receiver to re-order packets and recover from missing packets.
  • 13.
    Characteristics of Datagram Switching 13 RoutingTable: • Each switch (or packet switch) has a rout­i ng table which is based on the destination address. • The routing tables are dynamic and are updated periodically. • The destination addresses and the corresponding forwarding output ports are recorded in the tables. The destination address in the header of a packet in a datagram network remains the same during the entire journey of the packet.
  • 14.
    Efficiency : • Theefficiency of a datagram network is better than that of a circuit-switched network. • The resources are allocated only when there are packets to be transferred. • The resources can be reallocated during waiting time for other packets from other sources. Delay • Greater delay in a datagram network than in a virtual-circuit network. • No setup and teardown phases, each packet may experience a wait at a switch before it is forwarded. • All packets in a message necessarily not travel through the same switches, the delay is not uniform for the packets of a message. Total delay = 3T + 3t + w1 + w2 There are three transmission times (3T), three propagation delays (slopes 3t of the lines) and two waiting times (w1 + w2)
  • 15.
    Virtual Switching A virtual-circuitnetwork is a cross between a circuit-switched network and a datagram network, i.e., normally implemented in the data link layer • As in a circuit-switched network, there are setup and teardown phases in addition to the data transfer phase. • Resources can be allocated during the setup phase, as in a circuit-switched network, or on demand, as in a datagram network. • As in a datagram network, data are packetized and each packet carries an address in the header. However, the address in the header has local jurisdiction (it defines what should be the next switch and the channel on which the packet is being carried), not end-to-end jurisdiction • As in a circuit-switched network, all packets follow the same path established during the connection.
  • 16.
    An example ofa virtual-circuit network. The network has switches that allow traffic from sources to destinations. A source or destination can be a computer, packet switch, bridge, or any other device that connects other networks.
  • 17.
    Addressing • Two typesof addressing are involved: global and local (virtual-circuit identifier) Global Addressing: • A source or a destination needs to have a global unique if the network is part of an international network. Virtual-Circuit Identifier: • A VCI, unlike a global address, is a small number that has only switch scope; it is used by a frame between two switches. • When a frame arrives at a switch, it has a VCI; when it leaves, it has a different VCI. • Figure shows how the VCI in a data frame changes from one switch to another.
  • 18.
    A source anddestination need to go through three phases in a virtual-circuit network: setup, data transfer, and teardown Data Transfer Phase • To transfer a frame from a source to its destination, all switches need to have a table entry for this virtual circuit. • The switch holds four pieces of information for each virtual circuit that is already set up. • But for the moment we assume that each switch has a table with entries for all active virtual cir­ cuits. • The data transfer phase is active until the source sends all its frames to the destina­ tion. • The process creates a virtual circuit, not a real circuit, between the source and destination.
  • 19.
    • Switch 2receives the setup request frame. The same events happen here as at switch 1. • Switch 3 receives the setup request frame. Again, three columns are completed: incoming port (2), incoming VCI (22), and outgoing port (3). • Destination B receives the setup frame, and if it is ready to receive frames from A, it assigns a VCI to the incoming frames that come from A, in this case 77. This VCI lets the destination know that the frames come from A, and not other sources. Setup Phase In the setup phase, two steps are required: the setup request and the acknowledgment. Setup Request: A setup request frame is sent from the source to the destination. Figure shows the process. • Source A sends a setup frame to switch 1. • Switch 1 receives the setup request frame. It knows that a frame going from A to B goes out through port 3. The switch then forwards the frame through port 3 to switch 2
  • 20.
    Acknowledgment: A specialframe, called the acknowledgment frame, completes the entries in the switching tables. a. The destination sends an acknowledgment to switch 3. The acknowledgment carries the global source and destination addresses so the switch knows which entry in the table is to be completed. The frame also carries VCI 77, chosen by the destination as the incoming VCI for frames from A. b. Switch 3 sends an acknowledgment to switch 2 that contains its incoming VCI in the table. c. Switch 2 sends an acknowledgment to switch 1 that contains its incoming VCI in the table. d. Finally switch 1 sends an acknowledgment to source A that contains its incoming VCI in the table,. e. The source uses this as the outgoing VCI for the data frames to be sent to destination B. Teardown Phase • In this phase, source A, after sending all frames to B, sends a special frame called a teardown request. Destination B responds with a teardown confirmation frame. • All switches delete the corresponding entry from their tables.
  • 21.
    A source anddestination need to go through three phases in a virtual-circuit network: setup, data transfer, and teardown Data Transfer Phase • To transfer a frame from a source to its destination, all switches need to have a table entry for this virtual circuit. • The switch holds four pieces of information for each virtual circuit that is already set up. • But for the moment we assume that each switch has a table with entries for all active virtual cir­ cuits. • The data transfer phase is active until the source sends all its frames to the destina­ tion. • The process creates a virtual circuit, not a real circuit, between the source and destination.
  • 22.
    Characteristics of VirtualNetworking Efficiency: • The resource reservation in a virtual-circuit network can be made during the setup or can be on demand during the data transfer phase. • In the first case, the delay for each packet is the same. • In the second case, each packet may encounter different delays. Delay: • In a virtual-circuit network, there is a one-time delay for setup and a one-time delay for teardown. • The packet is traveling through two switches (routers). There are three transmis­ sion times (3T), three propagation times (3t). • Total delay= 3T + 3t + setup delay+ teardown delay
  • 23.
    Advantages of PacketSwitching • 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. 23
  • 24.
    Comparison of communicationswitching techniques