Metric (network)

from Wikipedia, the free encyclopedia

In the network area, the metric defines a numerical measure for the quality of a connection when using a certain route . The degree can be determined by evaluation or by measurement.

With goodness all factors influencing the choice can be meant. Usually the value relates to the available data transmission rate , the connection quality or the monetary costs incurred. The delay , load, MTU , reliability and the hop count can also be taken into account. The metric used decides whether a high or a low numerical value determines the quality of the route. For example, if the data transmission rate is taken into account, high values ​​are preferred. However, if the metric indicates the monetary costs of a route, a low value will be preferred. If there are several possible routes to the destination, the metric can be used to determine which of these routes is used for the connection.

Categories

Network metrics are distinguished in particular according to how the value of a metric along a path is calculated from the individual metrics along this path. A distinction is made between additive , multiplicative and concave metrics.

Let be a metric for a connection between the network nodes and , and be a path between the nodes and . Then the mentioned metrics are defined as follows:

  • Additive: (e.g. transmission delay)
  • Multiplicative: (e.g. probability of loss)
  • Concave: (e.g. bandwidth)

Routing table

One example of the use of metrics are routing tables , which are used to find paths during routing . The metric is used to decide which of several possible connections is to be used. Depending on the metric used, this is usually the lowest (e.g. transmission delay) or highest (e.g. bandwidth) value.

 Kernel IP routing table
 Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
 91.198.174.2    192.168.0.254   255.255.255.255 UGH   3      0        0 eth0
 91.198.174.2    172.16.0.254    255.255.255.255 UGH   6      0        0 wlan0
 192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
 172.16.0.0      0.0.0.0         255.255.0.0     U     0      0        0 wlan0
 0.0.0.0         172.16.0.254    0.0.0.0         UG    0      0        0 wlan0

In this example there are two network interfaces (column Iface ), eth0 (wired) and wlan0 ( wireless LAN ). There are two special host routes for the IP address 91.198.174.2. This host routes are routes to a single computer , whereas so-called network routes have a route to a network area, so a group of computers. The first entry with metric value 3 says: If a path to the IP address 91.198.174.2 is sought, try to send the data packets via the interface called eth0 (cable). However, the second entry with metric value 6 contains the instruction to send it via interface wlan0 (wireless LAN). So there are two identical entries - apart from the value for the metric - that describe possible paths to the same goal. The value is now used to select which interface is to be used primarily for sending. In the example, all packets that are not intended for one of the two local networks (third and fourth entry) would be forwarded to the standard gateway (last entry) via the wireless LAN , unless they are the destination with the IP address 91.198.174.2, an attempt would first be made to use the cable, since the value of the metric is lower there.

Command to set a route with metric value 1:

ip route add 91.198.172.2 via 192.168.0.254 metric 1 dev eth0

(with GNU / Linux , Windows may use a slightly different syntax)

The range of values ​​of a metric can vary greatly, since only relative values ​​are important for determining the best route. The permitted values ​​for the metric for the routing protocol EIGRP are between 0 and (= 4,294,967,295). When routing with Microsoft Windows XP, however , the range of values ​​only goes from 1 to 9,999.

Web links