Network Switching
Network Switching
Network Switching
➢Switching is process to forward packets coming in from one port to a port
leading towards the destination.
➢When data comes on a port it is called ingress, and when data leaves a port or
goes out it is called egress.
➢A communication system may include number of switches and nodes.
Network Switching
Network Switching
At broad level, switching can be divided into two major categories:
Connectionless: The data is forwarded on behalf of forwarding tables.
No previous handshaking is required and acknowledgements are optional.
Connection Oriented: Before switching data to be forwarded to destination,
there is a need to pre-establish circuit along the path between both endpoints.
Data is then forwarded on that circuit.
After the transfer is completed, circuits can be kept for future use or can be
turned down immediately.
Network Switching
Circuit Switching
When two nodes communicate with each other over a dedicated
communication path, it is called circuit switching.
There 'is a need of pre-specified route from which data will travels and no other
data is permitted.
In circuit switching, to transfer the data, circuit must be established so that the
data transfer can take place.
Circuits can be permanent or temporary.
Network Switching
Applications which use circuit switching may have to go through three phases:
➢Set Up Phase
➢Data Transfer Phase
➢Tear Down Phase
Network Switching
➢Circuit switching was designed for voice applications.
➢Telephone is the best suitable example of circuit switching.
➢ Before a user can make a call, a virtual path between caller and callee is
established over the network.(on Physical Layer)
Network Switching
Efficiency
It can be argued that circuit-switched networks are not as efficient as the other
two types of networks because resources are allocated during the entire
duration of the connection. These resources are unavailable to other
connections.
Delay
Although a circuit-switched network normally has low efficiency, the delay in
this type of network is minimal. During data transfer the data are not delayed at
each switch; the resources are allocated for the duration of the connection. The
total delay is due to the time needed to create the connection, transfer data,
and disconnect the circuit.
Network Switching
Message Switching
➢This technique was somewhere in middle of circuit switching and packet
switching.
➢ In message switching, the whole message is treated as a data unit and is
switching / transferred in its entirety.
➢A switch working on message switching, first receives the whole message and
buffers it until there are resources available to transfer it to the next hop.
➢If the next hop is not having enough resource to accommodate large size
message, the message is stored and switch waits.
Message Switching
Message Switching
➢This technique was considered substitute to circuit switching.
➢ As in circuit switching the whole path is blocked for two entities only.
➢Message switching is replaced by packet switching. Message switching has the
following drawbacks:
Every switch in transit path needs enough storage to accommodate entire
message.
Because of store-and-forward technique and waits included until resources are
available, message switching is very slow.
Message switching was not a solution for streaming media and real-time
applications.
Packet Switching
In a packet-switched network, there is no resource reservation; resources are
allocated on demand. The allocation is done on a first come, first-served basis.
When a switch receives a packet, no matter what is the source or destination,
the packet must wait if there are other packets being processed. This lack of
reservation may create delay. For example, if we do not have a reservation at a
restaurant, we might have to wait.
Packet Switching
➢Short comings of message switching gave birth to an idea of packet switching.
➢The entire message is broken down into smaller chunks called packets.
➢The switching information is added in the header of each packet and
transmitted independently.
➢It is easier for intermediate networking devices to store small size packets and
they do not take much resources either on carrier path or in the internal
memory of switches.
➢It has two types: Datagram Networks & Virtual Circuit Networks
Packet Switching (Datagram Networks)
In a datagram network, each packet is treated independently of all others. Packets in this
approach are referred to as datagrams. Datagram switching is normally done at the network
layer. The datagram networks are sometimes referred to as connectionless networks. The term
connectionless here means that the switch (packet switch) does not keep information about the
connection state. There are no setup or teardown phases. Each packet is treated the same by a
switch regardless of its source or destination. A switch in a datagram network uses a routing
table that is based on the destination address. The destination address in the header of a packet
in a datagram network remains the same during the entire journey of the packet.
Packet Switching (Datagram Networks)
Packet Switching (Datagram Networks)
Packet Switching (Datagram Networks)
Efficiency
Virtual-Circuit Identifier: The identifier that is actually used for data transfer is
called the virtual-circuit identifier (VCI). 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
VCl.
Packet Switching (Virtual Circuit Networks)
Phases:
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 table, in its simplest form, has four
columns.
Packet Switching (Virtual Circuit Networks)
Phases:
Setup Phase:
Setup Request
◦ A setup request frame is sent from the source to the destination.
Acknowledgment
◦ A special frame, called the acknowledgment frame, completes the entries in
the switching tables.
Packet Switching (Virtual Circuit Networks)
Phases:
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.
Packet Switching (Virtual Circuit Networks)
Efficiency
Delay