Unit 4 Switching - Routinmanid
Unit 4 Switching - Routinmanid
Networking
Mrs.V.O.Salunkhe Page 1
BSc CS Entire T.Y. Networking
Switching techniques
Circuit Switching
Mrs.V.O.Salunkhe Page 2
BSc CS Entire T.Y. Networking
o Circuit establishment
o Data transfer
o Circuit Disconnect
Mrs.V.O.Salunkhe Page 3
BSc CS Entire T.Y. Networking
o Crossbar Switch
o Multistage Switch
Crossbar Switch
The Crossbar switch is a switch that has n input lines and n output
lines. The crossbar switch has n2 intersection points known
as crosspoints.
Mrs.V.O.Salunkhe Page 4
BSc CS Entire T.Y. Networking
Multistage Switch
Message Switching
Mrs.V.O.Salunkhe Page 5
BSc CS Entire T.Y. Networking
Packet Switching
Mrs.V.O.Salunkhe Page 7
BSc CS Entire T.Y. Networking
Mrs.V.O.Salunkhe Page 8
BSc CS Entire T.Y. Networking
Node takes routing decisions to Node does not take any routing
forward the packets. decision.
Congestion cannot occur as all Congestion can occur when the node
the packets travel in different is busy, and it does not allow other
directions. packets to pass through.
Mrs.V.O.Salunkhe Page 10
BSc CS Entire T.Y. Networking
Circuit Switching
o In this approach, there is a dedicated route between sender
and receiver. Before the link is determined in the circuit
switching approach, the dedicated route will continue until the
connection is eliminated.
Routers
Mrs.V.O.Salunkhe Page 11
BSc CS Entire T.Y. Networking
Router Switch
Mrs.V.O.Salunkhe Page 12
BSc CS Entire T.Y. Networking
Routing Algorithms
Mrs.V.O.Salunkhe Page 14
BSc CS Entire T.Y. Networking
Mrs.V.O.Salunkhe Page 15
BSc CS Entire T.Y. Networking
Mrs.V.O.Salunkhe Page 16
BSc CS Entire T.Y. Networking
Mrs.V.O.Salunkhe Page 17
BSc CS Entire T.Y. Networking
Let dx(y) be the cost of the least-cost path from node x to node y.
The least costs are related by Bellman-Ford equation,
Mrs.V.O.Salunkhe Page 18
BSc CS Entire T.Y. Networking
Where the minv is the equation taken for all x neighbors. After
traveling from x to v, if we consider the least-cost path from v to y,
the path cost will be c(x,v)+dv(y). The least cost from x to y is the
minimum of c(x,v)+dv(y) taken over all neighbors.
o For each neighbor v, the cost c(x,v) is the path cost from x to
directly attached neighbor, v.
o The distance vector x, i.e., Dx = [ Dx(y) : y in N ], containing its
cost to all destinations, y, in N.
o The distance vector of each of its neighbors, i.e., Dv = [ Dv(y) : y
in N ] for each neighbor v of x.
The node x has updated its own distance vector table by using the
above equation and sends its updated table to all its neighbors so
that they can update their own distance vectors.
Algorithm
At each node x,
Initialization
Mrs.V.O.Salunkhe Page 19
BSc CS Entire T.Y. Networking
Sharing Information
Mrs.V.O.Salunkhe Page 20
BSc CS Entire T.Y. Networking
In the above figure, we observe that the router sends the knowledge
to the immediate neighbors. The neighbors add this knowledge to
their own knowledge and sends the updated table to their own
neighbors. In this way, routers get its own information plus the new
information about
out the neighbors.
Routing Table
Mrs.V.O.Salunkhe Page 21
BSc CS Entire T.Y. Networking
Initially, the routing table is created for each router that contains
atleast three types of information such as Network ID, the cost and
the next hop.
o In the above figure, the original routing tables are shown of all
the routers. In a routing table, the first column represents the
Mrs.V.O.Salunkhe Page 22
BSc CS Entire T.Y. Networking
network ID, the second column represents the cost of the link,
and the third column is empty.
o These routing tables are sent to
t all the neighbors.
For Example:
Mrs.V.O.Salunkhe Page 23
BSc CS Entire T.Y. Networking
Mrs.V.O.Salunkhe Page 24
BSc CS Entire T.Y. Networking
sends the copies to all its neighbors. Finally, each and every
router receives a copy of the same information.
o Information sharing: A router sends the information to every
other router only when the change occurs in the information.
Reliable Flooding
Route Calculation
o c( i , j): Link cost from node i to node j. If i and j nodes are not
directly linked, then c(i , j) = ∞.
o D(v): It defines the cost of the path from source code to
destination v that has the least cost currently.
o P(v): It defines the previous node (neighbor of v) along with
current least cost path from source to v.
o N: It is the total number of nodes available in the network.
Algorithm
Initialization
Mrs.V.O.Salunkhe Page 26
BSc CS Entire T.Y. Networking
Step 1:
Mrs.V.O.Salunkhe Page 27
BSc CS Entire T.Y. Networking
Step 2:
In the above table, we observe that vertex D contains the least cost
path in step 1. Therefore, it is added in N. Now, we need to
determine a least-cost path through D vertex.
1. v = B, w = D
2. D(B) = min( D(B) , D(D) + c(D,B) )
3. = min( 2, 1+2)>
4. = min( 2, 3)
5. The minimum value is 2. Therefore, the currently shortest path fro
m A to B is 2.
1. v = C, w = D
2. D(B) = min( D(C) , D(D) + c(D,C) )
3. = min( 5, 1+3)
4. = min( 5, 4)
5. The minimum value is 4. Therefore, the currently shortest path fro
m A to C is 4.</p>
Mrs.V.O.Salunkhe Page 28
BSc CS Entire T.Y. Networking
1. v = E, w = D
2. D(B) = min( D(E) , D(D) + c(D,E) )
3. = min( ∞, 1+1)
4. = min(∞, 2)
5. The minimum value is 2. Therefore, the currently shortest path fro
m A to E is 2.
Step N D(B),P(B) D(C),P(C) D(D),P(D) D(E),P(E) D(F),P(F)
6. Step 3:
7. In the above table, we observe that both E and B have the
least cost path in step 2. Let's consider the E vertex. Now, we
determine the least cost path of remaining vertices through E.
1. v = B, w = E
2. D(B) = min( D(B) , D(E) + c(E,B) )
3. = min( 2 , 2+ ∞ )
4. = min( 2, ∞)
5. The minimum value is 2. Therefore, the currently shortest path fro
m A to B is 2.
1. v = C, w = E
2. D(B) = min( D(C) , D(E) + c(E,C) )
3. = min( 4 , 2+1 )
4. = min( 4,3)
5. The minimum value is 3. Therefore, the currently shortest path fro
m A to C is 3.
1. v = F, w = E
2. D(B) = min( D(F) , D(E) + c(E,F) )
3. = min( ∞ , 2+2 )
4. = min(∞ ,4)
5. The minimum value is 4. Therefore, the currently shortest path fro
m A to F is 4.
Step N D(B),P(B) D(C),P(C) D(D),P(D) D(E),P(E) D(F),P(F)
Step 4:
In the above table, we observe that B vertex has the least cost path
in step 3. Therefore, it is added in N. Now, we determine the least
cost path of remaining vertices through B.
1. v = F, w = C
2. D(B) = min( D(F) , D(C) + c(C,F) )
3. = min( 4, 3+5)
4. = min(4,8)
5. The minimum value is 4. Therefore, the currently shortest path fro
m A to F is 4.
Step N D(B),P(B) D(C),P(C) D(D),P(D) D(E),P(E) D(F),P(F)
Mrs.V.O.Salunkhe Page 30
BSc CS Entire T.Y. Networking
5 ADEBC 4,E
Final table:
5 ADEBC 4,E
6 ADEBCF
Disadvantage:
Hierarchical routing
In hierarchical routing, the routers are divided into regions. Each
router has complete details about how to route packets to
destinations within its own region. But it does not have any idea
about the internal structure of other regions.
As we know, in both LS and DV algorithms, every router needs to
save some information about other routers. When network size is
growing, the number of routers in the network will increase.
Therefore, the size of routing table increases, then routers cannot
Mrs.V.O.Salunkhe Page 31
BSc CS Entire T.Y. Networking
Unicast routing
Mrs.V.O.Salunkhe Page 32
BSc CS Entire T.Y. Networking
Broadcast routing
Mrs.V.O.Salunkhe Page 33
BSc CS Entire T.Y. Networking
Multicast Routing
Mrs.V.O.Salunkhe Page 34
BSc CS Entire T.Y. Networking
The router must know that there are nodes, which wish to receive
multicast packets (or stream) then only it should forward.
Multicast routing works spanning tree protocol to avoid looping.
Multicast routing also uses reverse path Forwarding technique, to
detect and discard duplicates and loops.
Anycast Routing
Mrs.V.O.Salunkhe Page 35
BSc CS Entire T.Y. Networking
Routing Algorithms
Flooding
Mrs.V.O.Salunkhe Page 37
BSc CS Entire T.Y. Networking
Shortest Path
Mrs.V.O.Salunkhe Page 38
BSc CS Entire T.Y. Networking
1. Retransmission Policy :
It is the policy in which retransmission of the packets are taken
care of. If the sender feels that a sent packet is lost or corrupted,
the packet needs to be retransmitted. This transmission may
increase the congestion in the network.
To prevent congestion, retransmission timers must be designed
to prevent congestion and also able to optimize efficiency.
2. Window Policy :
The type of window at the sender’s side may also affect the
congestion. Several packets in the Go-back-n window are re-sent,
although some packets may be received successfully at the
receiver side. This duplication may increase the congestion in the
network and make it worse.
Therefore, Selective repeat window should be adopted as it sends
the specific packet that may have been lost.
3. Discarding Policy :
A good discarding policy adopted by the routers is that the
routers may prevent congestion and at the same time partially
discard the corrupted or less sensitive packages and also be able
to maintain the quality of a message.
In case of audio file transmission, routers can discard less
sensitive packets to prevent congestion and also maintain the
quality of the audio file.
4. Acknowledgment Policy :
Since acknowledgements are also the part of the load in the
network, the acknowledgment policy imposed by the receiver may
also affect congestion. Several approaches can be used to prevent
congestion related to acknowledgment.
Mrs.V.O.Salunkhe Page 39
BSc CS Entire T.Y. Networking
5. Admission Policy :
In admission policy a mechanism should be used to prevent
congestion. Switches in a flow should first check the resource
requirement of a network flow before transmitting it further. If
there is a chance of a congestion or there is a congestion in the
network, router should deny establishing a virtual network
connection to prevent further congestion.
All the above policies are adopted to prevent congestion before it
happens in the network.
1. Backpressure :
Backpressure is a technique in which a congested node stops
receiving packets from upstream node. This may cause the
upstream node or nodes to become congested and reject
receiving data from above nodes. Backpressure is a node-to-node
congestion control technique that propagate in the opposite
direction of data flow. The backpressure technique can be
applied only to virtual circuit where each node has information of
its above upstream node.
Mrs.V.O.Salunkhe Page 40
BSc CS Entire T.Y. Networking
1. Implicit Signaling :
In implicit signaling, there is no communication between the
congested nodes and the source. The source guesses that there
is congestion in a network. For example when sender sends
Mrs.V.O.Salunkhe Page 41
BSc CS Entire T.Y. Networking
2. Explicit Signaling :
In explicit signaling, if a node experiences congestion it can
explicitly sends a packet to the source or destination to inform
about congestion. The difference between choke packet and
explicit signaling is that the signal is included in the packets that
carry data rather than creating a different packet as in case of
choke packet technique.
Explicit signaling can occur in either forward or backward
direction.
Forward Signaling : In forward signaling, a signal is sent in
the direction of the congestion. The destination is warned
about congestion. The receiver in this case adopt policies to
prevent further congestion.
Backward Signaling : In backward signaling, a signal is sent
in the opposite direction of the congestion. The source is
warned about congestion and it needs to slow down.
Mrs.V.O.Salunkhe Page 42
BSc CS Entire T.Y. Networking
Mrs.V.O.Salunkhe Page 43