MSFT_NetRoute class

Represents the Route class in TCPIP WMIv2 provider.

The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties.

Syntax

[UMLPackagePath("CIM::Network::Routes"), ClassVersion("1.0.0"), dynamic, provider("VpnClientPSProvider"), AMENDMENT]
class MSFT_NetRoute : CIM_NextHopRoute
{
  string   Caption;
  string   Description;
  string   ElementName;
  string   InstanceID;
  string   DestinationAddress;
  uint16   AdminDistance;
  uint16   RouteMetric;
  boolean  IsStatic;
  uint16   TypeOfRoute = 3;
  string   DestinationPrefix;
  uint32   InterfaceIndex;
  string   InterfaceAlias;
  string   NextHop;
  uint8    Publish;
  datetime ValidLifetime;
  datetime PreferredLifetime;
  uint8    Store;
  uint16   AddressFamily;
  uint16   Protocol;
};

Members

The MSFT_NetRoute class has these types of members:

Methods

The MSFT_NetRoute class has these methods.

Method Description
Create Create the Route.
Select Selects the best local IP address and best route to reach the specified remote address.

Properties

The MSFT_NetRoute class has these properties.

AddressFamily

Data type: uint16

Access type: Read-only

To indicate whether the address family for this route is v4 or v6.

IPv4 (2)

IPv6 (23)

AdminDistance

Data type: uint16

Access type: Read-only

The specific administrative distance of this route, overriding any default distances specified by the system or routing service.

This property is inherited from CIM_NextHopRoute.

Caption

Data type: string

Access type: Read-only

Qualifiers: MaxLen (64)

The Caption property is a short textual description (one- line string) of the object.

This property is inherited from CIM_ManagedElement.

Description

Data type: string

Access type: Read-only

The Description property provides a textual description of the object.

This property is inherited from CIM_ManagedElement.

DestinationAddress

Data type: string

Access type: Read-only

The address which serves as the destination to be reached.

This property is inherited from CIM_NextHopRoute.

DestinationPrefix

Data type: string

Access type: Read-only

The destination prefix.

ElementName

Data type: string

Access type: Read-only

A user-friendly name for the object. This property allows each instance to define a user-friendly name in addition to its key properties, identity data, and description information.

Note that the Name property of ManagedSystemElement is also defined as a user-friendly name. But, it is often subclassed to be a Key. It is not reasonable that the same property can convey both identity and a user-friendly name, without inconsistencies. Where Name exists and is not a Key (such as for instances of LogicalDevice), the same information can be present in both the Name and ElementName properties. Note that if there is an associated instance of CIM_EnabledLogicalElementCapabilities, restrictions on this properties may exist as defined in ElementNameMask and MaxElementNameLen properties defined in that class.

This property is inherited from CIM_ManagedElement.

InstanceID

Data type: string

Access type: Read-only

Qualifiers: key, Override ("InstanceID")

Within the scope of the instantiating Namespace, InstanceID opaquely and uniquely identifies an instance of this class. In order to ensure uniqueness within the NameSpace, the value of InstanceID SHOULD be constructed using the following \'preferred\' algorithm:

<OrgID>:<LocalID>

Where <OrgID> and <LocalID> are separated by a colon \':\', and where <OrgID> MUST include a copyrighted, trademarked or otherwise unique name that is owned by the business entity creating/defining the InstanceID, or is a registered ID that is assigned to the business entity by a recognized global authority. (This is similar to the <Schema Name>_<Class Name> structure of Schema class names.) In addition, to ensure uniqueness <OrgID> MUST NOT contain a colon (\':\'). When using this algorithm, the first colon to appear in InstanceID MUST appear between <OrgID> and <LocalID>.

<LocalID> is chosen by the business entity and SHOULD not be re-used to identify different underlying (real-world) elements. If the above \'preferred\' algorithm is not used, the defining entity MUST assure that the resultant InstanceID is not re-used across any InstanceIDs produced by this or other providers for this instance\'s NameSpace.

For DMTF defined instances, the \'preferred\' algorithm MUST be used with the <OrgID> set to \'CIM\'.

This property is inherited from CIM_NextHopRoute.

InterfaceAlias

Data type: string

Access type: Read-only

The user-friendly interface name.

InterfaceIndex

Data type: uint32

Access type: Read-only

The user-friendly interface index.

IsStatic

Data type: boolean

Access type: Read-only

TRUE indicates that this is a static route, and FALSE indicates a dynamically-learned route.

This property is inherited from CIM_NextHopRoute.

NextHop

Data type: string

Access type: Read-only

The next hop address or gateway address.

PreferredLifetime

Data type: datetime

Access type: Read/write

Lifetime over which the route is preferred. The default value is infinite.

Protocol

Data type: uint16

Access type: Read-only

The routing mechanism via which this route was learned.

Other (1)

Local (2)

NetMgmt (3)

Icmp (4)

Egp (5)

Ggp (6)

Hello (7)

Rip (8)

IsIs (9)

EsIs (10)

Igrp (11)

Bbn (12)

Ospf (13)

Bgp (14)

Idpr (15)

Eigrp (16)

Dvmrp (17)

Rpl (18)

Dhcp (19)

Publish

Data type: uint8

Access type: Read/write

One of the following values: No: Not advertised in Route Advertisements. This is the default. Age: Advertised in Route Advertisements with a finite lifetime. Yes: Advertised in Route Advertisements with an infinite lifetime.

No (0)

Age (1)

Yes (2)

RouteMetric

Data type: uint16

Access type: Read-only

RouteMetric provides a numeric indication as to the preference of this route, compared to other routes that reach the same destination.

This property is inherited from CIM_NextHopRoute.

Store

Data type: uint8

Access type: Read-only

One of the following values: Active: Change only lasts until next boot. Persistent: Change is persistent. This is the default.

Persistent (0)

Active (1)

TypeOfRoute

Data type: uint16

Access type: Read-only

An enumerated integer indicating whether the route is administrator-defined (value=2), computed (via a routing protocol/algorithm, value=3) or the actual route implemented in the network (value=4). The default is a computed route.

This property is inherited from CIM_NextHopRoute.

Administrator Defined Route (2)

Computed Route (3)

Actual Route (4)

ValidLifetime

Data type: datetime

Access type: Read/write

Lifetime over which the route is valid. The default value is infinite.

Requirements

Minimum supported client
Windows 8
Minimum supported server
Windows Server 2012
Namespace
Root\Microsoft\Windows\RemoteAccess\Client
MOF
VPNClientPSProvider.mof
DLL
VPNClientPSProvider.dll

See also

CIM_NextHopRoute