Difference between revisions of "Маршрутизация"
Line 96: | Line 96: | ||
Path vector routing is used for inter-domain routing. It is similar to distance vector routing. In path vector routing we assume there is one node (there can be many) in each autonomous system which acts on behalf of the entire autonomous system. This node is called the speaker node. The speaker node creates a routing table and advertises it to neighboring speaker nodes in neighboring autonomous systems. The idea is the same as distance vector routing except that only speaker nodes in each autonomous system can communicate with each other. The speaker node advertises the path, not the metric of the nodes, in its autonomous system or other autonomous systems. Path vector routing is discussed in RFC 1322; the path vector routing algorithm is somewhat similar to the distance vector algorithm in the sense that each border router advertises the destinations it can reach to its neighboring router. However, instead of advertising networks in terms of a destination and the distance to that destination, networks are advertised as destination addresses and path descriptions to reach those destinations. A route is defined as a pairing between a destination and the attributes of the path to that destination, thus the name, path vector routing, where the routers receive a vector that contains paths to a set of destinations. The path, expressed in terms of the domains (or confederations) traversed so far, is carried in a special path attribute that records the sequence of routing domains through which the reachability information has passed. | Path vector routing is used for inter-domain routing. It is similar to distance vector routing. In path vector routing we assume there is one node (there can be many) in each autonomous system which acts on behalf of the entire autonomous system. This node is called the speaker node. The speaker node creates a routing table and advertises it to neighboring speaker nodes in neighboring autonomous systems. The idea is the same as distance vector routing except that only speaker nodes in each autonomous system can communicate with each other. The speaker node advertises the path, not the metric of the nodes, in its autonomous system or other autonomous systems. Path vector routing is discussed in RFC 1322; the path vector routing algorithm is somewhat similar to the distance vector algorithm in the sense that each border router advertises the destinations it can reach to its neighboring router. However, instead of advertising networks in terms of a destination and the distance to that destination, networks are advertised as destination addresses and path descriptions to reach those destinations. A route is defined as a pairing between a destination and the attributes of the path to that destination, thus the name, path vector routing, where the routers receive a vector that contains paths to a set of destinations. The path, expressed in terms of the domains (or confederations) traversed so far, is carried in a special path attribute that records the sequence of routing domains through which the reachability information has passed. | ||
+ | |||
+ | Each entry in the routing table contains the destination network, the next router and the path to reach the destination. | ||
===Сравнение на рутиращи алгоритмни=== | ===Сравнение на рутиращи алгоритмни=== |
Revision as of 11:33, 7 January 2013
Contents
Какво е маршрутизация
Маршрутизация или рутиране е процес на избиране на път в дадена мрежа, по който да се изпрати мрежовия трафик.
Рутиране има в различни мрежи - телефонни мрежи (комутационни вериги), транспортни мрежи (логистика), компютърни мрежи (пакетна комутация).
В компютърните мрежи информацията се предава на пакети, затова рутирането се занимава с препращането на пакет от комуникационна точка към друга комуникационна точка (нод - възел, който в частност може да е router, bridge, gateway, firewall, switch или host). Целта е информационният пакет да бъде пренесен от началната точка до крайната точка.
Всеки компютър с подходящ софтуер може да изпълнява роля на някои от тези устройства, но при големи натоварвания се препоръчва специализиран хардуер.
Рутиращата машина препраща пакети според своята рутираща таблица, в която са описани пътищата до различни дестинации (мрежи). Оптималното конструиране на рутиращата таблица е много важно за ефективно рутиране.
Трафик според дестинация
- anycast - до всеки от група нодове
- broadcast - до всички нодове
- multicast - до група от нодове
- unicast - до точно определен нод
- geocast - до географска област
Видове рутиране
Статично рутиране
На практика малки мрежи могат да използват ръчно конфигурирани рутиращи таблици, това се нарича статично рутиране (не адаптивно).
Приципно цялата мрежа може да бъде конфигурирана статично, но по този начин мрежата не е устойчива на повреда в даден нод. Ако има промяна и повреда в мрежата трафика няма да може да се пренасочи. Трябва да бъдат обновени съответните рутиращи таблици или да бъде отсранена повредата, за да може мрежата да функционира нормално.
При някои обстоятелства статичното рутиране би могло да е от полза - stub networks, default routes
Пример
To configure a static route to network 10.10.20.0/24, pointing to a next-hop router with the IP address of 192.168.100.1, type:
Cisco IOS ip route 10.10.20.0 255.255.255.0 192.168.100.1 Linux route add -net 10.10.20.0 netmask 255.255.255.0 gw 192.168.1.100
The other option is to define a static route with reference to the outgoing interface which is connected to the next hop towards the destination network.
Cisco IOS ip route 10.10.20.0 255.255.255.0 FastEthernet 0/0 Linux route add -net 10.10.20.0 netmask 255.255.255.0 dev eth0
Динамично рутиране
Големите мрежи имат сложна топология, която своевременно може многократно да се променя. Това прави ръчната конфигурация неприложима. Динамичното (адаптивното) рутиране позволява автоматична настройка на рутиращата таблица. Последната се променя според информацията, която се обменя между нодовете посредством рутиращи протоколи и заложениете локални предпочетания за всеки нод.
Примери за такива протоколи са RIP - Routing Information Protocol и OSPF (Open-Shortest-Path-First protocol). Дънамичното рутиране пробладава в Интернет, но изисква съответните познания за правилното му конфигуриране.
Adaptive routing describes the capability of a system, through which routes are characterized by their destination, to alter the path that the route takes through the system in response to a change in conditions.[1] The adaptation is intended to allow as many routes as possible to remain valid (that is, have destinations that can be reached) in response to the change.
People using a transport system can display adaptive routing. For example, if a local railway station is closed, people can alight from a train at a different station and use another method, such as a bus, to reach their destination. Another example of adaptive routing can be seen within financial markets. For example, ASOR or Adaptive Smart Order Router (developed by Quod Financial), takes routing decisions dynamically and based on real-time market events.
The term is commonly used in data networking to describe the capability of a network to 'route around' damage, such as loss of a node or a connection between nodes, so long as other path choices are available. There are several protocols used to achieve this: RIP OSPF IS-IS IGRP/EIGRP
Алгоритми на рутиращи протоколи
Distance vector algorithms
Вектор на разстоянието.
На всяка връзка между два нода се дава някаква стойност. Всеки нод ще препаща съобщение от точка А към точка B по пътя, който има най малка сумарна стойност.
При първоначалното включване на един нод, той знае единствено за връзките със своите съседи и стойността на тези връзките. Той прави таблица на тези връзки .
(This information, the list of destinations, the total cost to each, and the next hop to send data to get there, makes up the routing table, or distance table.)
Процеса се извършва в следните две стъпки:
- На определено време всеки нод изпраща до своите съседи таблица, в която са описани пътища с най-ниска стойност до мрежите, които са му известни.
- Всеки нод, който получи такава таблица е сравнява със своята таблица.
- Ако открие път до мрежа, която той не знае я добавя в собствената си таблица
- Ако открие път с по-ниска стойност до дадена мрежа от колкото пътя записан в локалната таблица, той замества този запис с този от получената таблица.
- Ако открие път в своята таблица, който минава минава през нода, чиято таблица е получена, но този път не съществува в получената таблица, този път се премахва от локалната таблица.
След време всички нодове ще са открили пътя с най-ниска стойност до всяка мрежа.
Когато някой нод спре да функционира, неговите съседи ще разберат по това, че той не праща съобщения и ще обновят своите таблици. При промяна на топологията.
Link-state algorithms
When applying link-state algorithms, each node uses as its fundamental data a map of the network in the form of a graph. To produce this, each node floods the entire network with information about what other nodes it can connect to, and each node then independently assembles this information into a map. Using this map, each router then independently determines the least-cost path from itself to every other node using a standard shortest paths algorithm such as Dijkstra's algorithm. The result is a tree rooted at the current node such that the path through the tree from the root to any other node is the least-cost path to that node. This tree then serves to construct the routing table, which specifies the best next hop to get from the current node to any other node.
Optimised Link State Routing algorithm
A link-state routing algorithm optimised for mobile ad-hoc networks is the Optimised Link State Routing Protocol (OLSR).[1] OLSR is proactive; it uses Hello and Topology Control (TC) messages to discover and disseminate link state information through the mobile ad-hoc network. Using Hello messages, each node discovers 2-hop neighbor information and elects a set of multipoint relays (MPRs). MPRs distinguish OLSR from other link state routing protocols.
Path vector protocol
Distance vector and link state routing are both intra-domain routing protocols. They are used inside an autonomous system, but not between autonomous systems. Both of these routing protocols become intractable in large networks and cannot be used in Inter-domain routing. Distance vector routing is subject to instability if there are more than a few hops in the domain. Link state routing needs huge amount of resources to calculate routing tables. It also creates heavy traffic due to flooding.
Path vector routing is used for inter-domain routing. It is similar to distance vector routing. In path vector routing we assume there is one node (there can be many) in each autonomous system which acts on behalf of the entire autonomous system. This node is called the speaker node. The speaker node creates a routing table and advertises it to neighboring speaker nodes in neighboring autonomous systems. The idea is the same as distance vector routing except that only speaker nodes in each autonomous system can communicate with each other. The speaker node advertises the path, not the metric of the nodes, in its autonomous system or other autonomous systems. Path vector routing is discussed in RFC 1322; the path vector routing algorithm is somewhat similar to the distance vector algorithm in the sense that each border router advertises the destinations it can reach to its neighboring router. However, instead of advertising networks in terms of a destination and the distance to that destination, networks are advertised as destination addresses and path descriptions to reach those destinations. A route is defined as a pairing between a destination and the attributes of the path to that destination, thus the name, path vector routing, where the routers receive a vector that contains paths to a set of destinations. The path, expressed in terms of the domains (or confederations) traversed so far, is carried in a special path attribute that records the sequence of routing domains through which the reachability information has passed.
Each entry in the routing table contains the destination network, the next router and the path to reach the destination.
Сравнение на рутиращи алгоритмни
Distance-vector routing protocols are simple and efficient in small networks and require little, if any, management. However, traditional distance-vector algorithms have poor convergence properties due to the count-to-infinity problem.
This has led to the development of more complex but more scalable algorithms for use in large networks. Interior routing mostly uses link-state routing protocols such as OSPF and IS-IS.
A more recent development is that of loop-free distance-vector protocols (e.g., EIGRP). Loop-free distance-vector protocols are as robust and manageable as native distance-vector protocols, but avoid counting to infinity, and have good worst-case convergence times.