Computer Network Unit 1 q what are the topologies in computer n/w ?


Download 392.71 Kb.
bet27/57
Sana09.06.2023
Hajmi392.71 Kb.
#1474191
1   ...   23   24   25   26   27   28   29   30   ...   57
Bog'liq
Computer Network

Shortest Path
Links between routers have a cost associated with them. In general it could be a function of distance, bandwidth, average traffic, communication cost, mean queue length, measured delay, router processing speed, etc.
The shortest path algorithm just finds the least expensive path through the network, based on the cost function.
Dijkstra's algorithm is an example. You can start from source/destintation (doesn't matter in a unidirectional graph).

  1. Set probe node to starting node.

  2. Probe neighboring nodes and tentatively label them with (probe node, cummulative distance from start).

  3. Search all tentatively labeled nodes (and not just the nodes labeled from the current probe) for the minimum label, make this minimum node's label permanent, and make it the new probe node.

  4. If the probe node is the destination/source, stop, else goto 2.

Comments

  • The distance part of the node labels is cummulative distance from the starting node, not simply distance from the last probe node.

  • The key to discovering that you've gone down a bad (greater distance) path is that you examine all nodes with temporary labels in step 3. This means that you switch the probe node to another, shorter path if the you run into an high cost link.

  • If you label each node with it's predecessor on the path, and the distance to that node, then you can easily find the route you desire (albeit backwards) by starting at the destination and following the trail of predecessors backwards. You'll also know the distance from source to destination from the label on the destination.



Flooding


Every incoming packet is sent out on every other link by every router.
Super simple to implement, but generates lots of redundant packets. Interesting to note that all routes are discovered, including the optimal one, so this is robust and high performance (best path is found without being known ahead of time). Good when topology changes frequently (USENET example).
Some means of controlling the expansion of packets is needed. Could try to ensure that each router only floods any given packet once.
Could try to be a little more selective about what is forwarded and where.



Download 392.71 Kb.

Do'stlaringiz bilan baham:
1   ...   23   24   25   26   27   28   29   30   ...   57




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling