Export (0) Print
Expand All

MSFT_NetRoute class

Represents an IP route for the TCP/IP (Internet Protocol Suite) WMIv2 provider.

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

Syntax

[Dynamic, Provider("NetTCPIP")]class MSFT_NetRoute : CIM_NextHopRoute
{
  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.

MethodDescription
Create

Create an IP route.

Find

Retrieves an IP route to the specified remote address.

 

Properties

The MSFT_NetRoute class has these properties.

AddressFamily
Data type: uint16
Access type: Read-only

Gets a value that indicates whether the route uses the IPv4 or IPv6 address family. This property gets one of the following values.

ValueMeaning
2

IPv4

23

IPv6

 

DestinationPrefix
Data type: string
Access type: Read-only

Gets the destination prefix of the route.

InterfaceAlias
Data type: string
Access type: Read-only

Gets the interface alias of the route.

InterfaceIndex
Data type: uint32
Access type: Read-only

Gets the interface index of the route.

NextHop
Data type: string
Access type: Read-only

Gets the address of the next hop for the route.

PreferredLifetime
Data type: datetime
Access type: Read/write

Gets and sets the preferred end time of the lifetime of the route. The default value for this property is infinite.

Protocol
Data type: uint16
Access type: Read-only

The protocol from which the route was learned.

ValueMeaning
1

other protocol

2

local routing

3

Network Management static routing protocol (NETMGMT)

4

Internet Control Message Protocol (ICMP)

5

Exterior Gateway Protocol (EGP)

6

Gateway-to-Gateway Protocol (GGP)

7

Hellospeak protocol (HELLO)

8

Routing Information Protocol (RIP)

9

Intermediate System to Intermediate System (IS-IS)

10

End System to Intermediate System (ES-IS)

11

Interior Gateway Routing Protocol (IGRP)

12

BBN protocol

13

Open Shortest Path First (OSPF)

14

Border Gateway Protocol (BGP)

15

Interdomain Routing Protocol (IDPR)

16

Enhanced Interior Gateway Routing Protocol (EIGRP)

17

Distance Vector Multicast Routing Protocol (DVMRP)

18

Routing Protocol for Low-Power and Lossy Networks (RPL)

19

Dynamic Host Configuration Protocol (DHCP)

 

Publish
Data type: uint8
Access type: Read/write

Gets and sets a value that indicates how to advertise the route. The default value for this property is 0.

ValueMeaning
0

Do not advertise the route.

1

Advertise the route for a specific interval.

2

Advertise the route indefinitely.

 

Store
Data type: uint8
Access type: Read-only

Gets a value that indicates whether the state of the route persists after a reboot. This property can contain one of the following values.

ValueMeaning
0

The state of the route persists after a reboot.

1

The state of the route does not persist after a reboot.

 

ValidLifetime
Data type: datetime
Access type: Read/write

Gets and sets the valid end time of the lifetime of the route. The default value for this property is infinite.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Namespace

Root\StandardCimv2

MOF

NetTCPIP.mof

DLL

NetTCPIP.dll

See also

NetTCPIP Provider Classes

 

 

Community Additions

ADD
Show:
© 2015 Microsoft