次の方法で共有


Win32_IP4PersistedRouteTable class

The Win32_IP4PersistedRouteTable WMI class represents persisted IP routes. By default, the routes added to the routing table are not permanent. Rebooting the computer clears the routes from the table. However, the following command makes the route persist after the computer is restarted: route -p add.

Persistent entries are automatically inserted again in the route table each time the route table is rebuilt. The operating system stores persistent routes in the registry. An entry can be removed through the method call SWbemServices.Delete for scripting or IWbemServices::DeleteInstance for C++ programming.

This class is only applicable to IPv4 and does not return IPX or IPv6 data. For more information, see IPv6 and IPv4 Support in WMI.

The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties. Properties are listed in alphabetic order, not MOF order.

Syntax

[dynamic, provider("RouteProvider"), UUID("{2CAF4666-AC9B-45AB-00A6-AF8C537794C2}"), SupportsCreate, CreateBy("PutInstance"), SupportsDelete, DeleteBy("DeleteInstance"), AMENDMENT]
class Win32_IP4PersistedRouteTable : CIM_LogicalElement
{
  string   Caption;
  string   Description;
  string   Destination;
  datetime InstallDate;
  string   Mask;
  sint32   Metric1;
  string   Name;
  string   NextHop;
  string   Status;
};

Members

The Win32_IP4PersistedRouteTable class has these types of members:

Properties

The Win32_IP4PersistedRouteTable class has these properties.

Caption

Data type: string

Access type: Read-only

Qualifiers: MaxLen (64)

Short description of the object. This property is inherited from CIM_ManagedSystemElement.

Description

Data type: string

Access type: Read-only

Description of the object. This property is inherited from CIM_ManagedSystemElement.

Destination

Data type: string

Access type: Read/write

Qualifiers: key

Destination IP address for this persisted route.

InstallDate

Data type: datetime

Access type: Read-only

Object was installed. This property does not need a value to indicate that the object is installed. This property is inherited from CIM_ManagedSystemElement.

Mask

Data type: string

Access type: Read/write

Qualifiers: key

Mask used in this persisted entry. Use the logical AND operation to combine the mask with the destination address. Compare the result to the value in the ipRouteDest field.

Metric1

Data type: sint32

Access type: Read/write

Qualifiers: key

Primary routing metric for this persisted route. The semantics of this metric are determined by the routing protocol specified in the route's ipRouteProto value. If this property is not used, its value should be set to -1.

Name

Data type: string

Access type: Read-only

Label by which the object is known. When subclassed, this property can be overridden to be a key property. This property is inherited from CIM_ManagedSystemElement.

NextHop

Data type: string

Access type: Read/write

Qualifiers: key

IP address of the next hop of this persisted route. If the route is bound to an interface that is realized via a broadcast medium, this field contains the agent's IP address on that interface.

Status

Data type: string

Access type: Read-only

Qualifiers: MaxLen (10)

Current status of the object. Various operational and nonoperational statuses can be defined. Operational statuses include: "OK", "Degraded", and "Pred Fail" (an element, such as a SMART-enabled hard disk drive, may be functioning properly but predicting a failure in the near future). Nonoperational statuses include: "Error", "Starting", "Stopping", and "Service". The latter, "Service", could apply during mirror-resilvering of a disk, reload of a user permissions list, or other administrative work. Not all such work is online, yet the managed element is neither "OK" nor in one of the other states. This property is inherited from CIM_ManagedSystemElement.

The values are:

"OK"

"Error"

"Degraded"

"Unknown"

"Pred Fail"

"Starting"

"Stopping"

"Service"

Remarks

The Win32_IP4PersistedRouteTable class is derived from CIM_LogicalElement which derives from the CIM_ManagedSystemElement class.

Requirements

Minimum supported client
Windows Vista
Minimum supported server
Windows Server 2008
Namespace
Root\CIMV2
MOF
Wmipiprt.mof
DLL
Wmipiprt.dll

See also

CIM_LogicalElement

Operating System Classes