Skip to content

Latest commit

 

History

History
334 lines (277 loc) · 8.18 KB

NetworkIpConfiguration.adoc

File metadata and controls

334 lines (277 loc) · 8.18 KB

DSC Resource 'NetworkIpConfiguration'

NetworkIpConfiguration sets the IP configuration and network routes.

Source

DSC Resource

Documentation

Table 1. Attributes of category 'NetworkIpConfiguration'
Parameter Attribute DataType Description Allowed Values

DisableNetbios

Boolean

Disable NetBios on all network interfaces.
See NetBios

  • False (default)

  • True

ConfigureIPv6

Int16

0 - 255

Interfaces

Hashtable[]

List of network interfaces

Routes

Hashtable[]

List of network routes

Table 2. Attributes of category 'NetworkIpConfiguration/Interfaces'
Parameter Attribute DataType Description Allowed Values

InterfaceAlias

Key

String

Alias of the network interface for which the IP address should be set.

Note

To use a specifc InterfaceAlias a network adapter configuration is necessary.

Default: Ethernet

Note

If you define settings in different YAML layer files the InterfaceAlias must be specified in every file to support merging.

IpAddress

String

The desired IP address, optionally including prefix length using CIDR notation.
See IPAddress

Prefix

Int

IP address prefix.
IPv4 classes:

  • Class A - /8
    → 16.777.216 addresses

  • Class B - /16
    → 65.536 addresses

  • Class C - /24
    → 256 addresses

Default: 24

Gateway

String

The desired default gateway address.
See DefaultGatewayAddress

DnsServer

String[]

The desired DNS Server address(es).
See DNSServerAddress

InterfaceMetric

UInt32

Specifies the metric for an IP interface (IPv4 and IPv6).

Note

Typically, the interface metric gives preference to a particular interface, such as using wired if both wired and wireless are available. The default (empty) value is automatic.

DisableNetbios

Boolean

Disable the NetBios on the network interface.
See NetBios

  • False (default)

  • True

EnableLmhostsLookup

Boolean

Enable the LMHOSTS lookup on the network interface.

  • False (default)

  • True

EnableDhcp

Boolean

Enable the Dynamic Host Configuration Protocol (DHCP) for the IP interface.
See NetIPInterface

Note

If set to True the paramters IpAddress, Gateway and DnsServers must be empty.

  • False (default)

  • True

DisableIPv6

Boolean

Disable IPv6 on the network interface.
See NetAdapterBinding

  • False (default)

  • True

NetworkCategory

String

Specifies the category of the network.

You cannot set the category to DomainAuthenticated (only test is supported). The server automatically sets the value of DomainAuthenticated when the network is authenticated to a domain controller.

The acceptable values for this parameter are:

  • Public - Networks in a public place such as an airport or coffee shop. Your PC is hidden from other devices on the network and can’t be used for printer and file sharing.

  • Private - Networks at home or work, where you know and trust the people and devices on the network. Your PC is discoverable and can be used for printer and file sharing if you set it up.

  • DomainAuthenticated - Networks at a workplace that are joined to a domain.

  • Public

  • Private

  • DomainAuthenticated

Table 3. Attributes of category 'NetworkIpConfiguration/Routes'
Parameter Attribute DataType Description Allowed Values

InterfaceAlias

Key

String

Specifies the alias of a network interface.

Note

To use a specifc InterfaceAlias a network adapter configuration is necessary.

Default: Ethernet

AddressFamily

Key

String

Specifies the IP address family.

  • IPv4 8default)

  • IPv6

DestinationPrefix

Key

String

Specifies a destination prefix of an IP route.

A destination prefix consists of an IP address prefix and a prefix length, separated by a slash (/).

NextHop

Key

String

Specifies the next hop for the IP route.

Ensure

String

Specifies whether the route should exist.

  • Present (default)

  • Absent

RouteMetric

UInt16

Specifies an integer route metric for an IP route.

Default: 256

Publish

String

Specifies the publish setting of an IP route.

  • No (default)

  • Yes

  • Age

PreferredLifetime

Real64

Specifies a preferred lifetime in seconds of an IP route.

Example
NetworkIpConfiguration:
  DisableNetBios: true
  ConfigureIPv6: 32
  Interfaces:
    - InterfaceAlias: Ethernet
      IpAddress:      10.0.0.1
      Prefix:         8
      Gateway:        10.0.0.254
      DnsServer:
        - 10.1.1.1
        - 10.1.1.2
      EnableDhcp:     false

    - InterfaceAlias:  Wi-Fi
      EnableDhcp:      true
      DisableIPv6:     true
      InterfaceMetric: 50

  Routes:
    - InterfaceAlias:    Ethernet
      DestinationPrefix: 192.168.0.0/16
      NextHop:           192.168.120.0
      RouteMetric:       200
Recommended Lookup Options in Datum.yml (Excerpt)
default_lookup_options: MostSpecific

lookup_options:

  NetworkIpConfiguration:
    merge_hash: deep
  NetworkIpConfiguration\Interfaces:
    merge_baseType_array: Unique
    merge_hash_array: DeepTuple
    merge_options:
      tuple_keys:
        - InterfaceAlias
  NetworkIpConfiguration\Routes:
    merge_baseType_array: Unique
    merge_hash_array: DeepTuple
    merge_options:
      tuple_keys:
        - InterfaceAlias
        - AddressFamily
        - DestinationPrefix
        - NextHop