routing 最短路径算法分析
合集下载
相关主题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Shortest-Path Algorithms
Virtually all packet-switching networks and all internets base their routing decision on some form of least-cost criterion. If the criterion is to minimize the number of hops, each link has a value of 1. More typically, the link value is inversely proportional to the link capacity, proportional to the current load on the link, or some combination. Given a network of nodes connected by bidirectional links, where each link has a cost associated with it in each direction, define the cost of a path between two nodes as the sum of the costs of the links traversed. For each pair of nodes, find a path with the least cost. Dijkstra’s Algorithm Dijkstra’s algorithm can be stated as: Find the shortest paths from a given source node to all other
Page 1 of 7
NETWORK SWITCHING AND ROUTING HOMEWORK
The following picture suggests how fixed routing might be implemented.
Flooding This technique requires no network information whatsoever and works as follows. A packet is sent by a source node to every one of its neighbors. At each node, an incoming packet is retransmitted on all outgoing links except for the link on which it arrived. Each packet should have unique identifiers so that duplicates can be discarded. There’s some ways to limit the incessant retransmission.One way to prevent this is for each node to remember the identity of those packets it has already retransmitted. And the other way is to include a hop count field with each packet. Three remarkable properties: • All possible routes between source and destination are tried. • At least one copy of the packet to arrive at the destination will have used a minimum-hop route. • All nodes that are directly or indirectly connected to the source node are visited. The following picture is one example of flooding:
Routing Strategies
A large number of routing strategies have evolved for dealing wΒιβλιοθήκη Baiduth the routing requirements of packet-switching networks. Next, I’ll make a brief introduction of the following four key strategies: fixed, flooding, random, and adaptive. Fixed Routing For fixed routing, a single, permanent route is configured for each source-destination pair of nodes in the network. Either of the least-cost routing algorithms could be used. The routes are fixed, or at least only change when there is a change in the topology of the network. Thus, the link costs used in designing routes cannot be based on any dynamic variable such as traffic.
NETWORK SWITCHING AND ROUTING HOMEWORK
STUDENT ID: 2012210547 NAME: 陈 玲
Routing--Shortest-Path Algorithms Routing
Routing is the process of selecting best paths in a network. In the past, the term routing was also used to mean forwarding network traffic among networks. However this latter function is much better described as simply forwarding. Routing is performed for many kinds of networks, including the telephone network (circuit switching), electronic data networks (such as the Internet), and transportation networks. In packet switching network One of the most complex and crucial design aspects of switched data networks is routing. The routing function attempts to find the least-cost route through the network, with cost based on number of hops, expected delay, or other metrics. Adaptive routing algorithms typically rely on the exchange of information about traffic conditions among nodes. The following picture is an example of network configuration:
Page 2 of 7
NETWORK SWITCHING AND ROUTING HOMEWORK
Random Routing Random routing has the simplicity and robustness of flooding with far less traffic load. With random routing, a node selects only one outgoing path for retransmission of an incoming packet. The selection of outgoing link can be random and round-robin. A refinement of this technique is to assign a probability to each outgoing link and to select the link based on that probability. Like flooding, random routing requires the use of no network information. Because the route taken is random, the actual route will typically not be the least-cost route nor the minimum-hop route. Adaptive Routing In virtually all packet-switching networks, some sort of adaptive routing technique is used.That is, the routing decisions that are made change as conditions on the network change due to failure or congestion. For adaptive routing to be possible, information about the state of the network must be exchanged among the nodes. The following picture is one example of adaptive routing:
Page 3 of 7
NETWORK SWITCHING AND ROUTING HOMEWORK
Disadvantages: • The routing decision is more complex; • The tradeoff between the quality of the information and the amount of overhead. • An adaptive strategy may react too quickly, causing congestion-producing oscillation, or too slowly, being irrelevant. Advantages: • An adaptive routing strategy can improve performance, as seen by the network user. • An adaptive routing strategy can aid in congestion control. Because an adaptive routing strategy tends to balance loads, it can delay the onset of severe congestion..