Metric (Standard 8 Module Reference)

7/8/2014

Review the applicable Embedded Core modules and any examples for the Metric setting in Windows Embedded 8 Standard (Standard 8).

This setting contains an integer that specifies an interface metric for an IP protocol or the metric the system uses to distinguish between multiple matching routes of the same prefix.

Acceptable values range from 5 to 50. When the system chooses routes, the overall metric used to determine the preference is the sum of the interface metric and the Metric in Routes. The system uses the route with the lowest number first.

Typically, IPv4 and IPv6 interface metrics give preference to a particular interface, such as using wired if both wired and wireless are available. Also, if you do not specify a metric, the system chooses an automatic metric, such as automatically preferring wired over wireless.

Modules

The following table shows the modules that you can apply this setting to. In Image Configuration Editor (ICE), you can follow the corresponding path to set this setting for a module.

Module

Path

Setting Description

TCPIP

Products/Embedded Core/TCPIP/Interfaces/Interface/Ipv4Settings/Metric

Specifies the interface metric for the IPv4 protocol.

TCPIP

Products/Embedded Core/TCPIP/Interfaces/Interface/Ipv6Settings/Metric

Specifies the interface metric for the IPv6 protocol.

TCPIP

Products/Embedded Core/TCPIP/Interfaces/Interface/Routes/Route/Metric

Specifies the metric the system uses to distinguish between multiple matching routes of the same prefix length.

If multiple route prefixes match a packet destination, the route with the longest prefix length is used. If multiple matching routes exist with the same prefix length, then the route with the lower metric is used.

XML Example

The following XML example shows how to set metrics in an interface.

<Interface wcm:action="add">
    <Ipv4Settings>
        <Metric>20</Metric>
    </Ipv4Settings>
    <Ipv6Settings>
        <Metric>30</Metric>
    </Ipv6Settings>
    <Routes>
        <Route wcm:action="add">
            <Identifier>1</Identifier>
             <Metric>10</Metric>
        </Route>
        <Route wcm:action="add">
            <Identifier>10</Identifier>
             <Metric>29</Metric>
        </Route>
    </Routes>
<Identifier>123</Identifier>
</Interface>

For an example of how to configure TCP/IP interface settings, see TCPIP Settings XML Example.

See Also

Concepts

Embedded Core Settings