Skip to content

Commit

Permalink
Merge pull request #242 from PlagueHO/Issue-239
Browse files Browse the repository at this point in the history
Improved Examples for xIPAddress - Fixes #239
  • Loading branch information
Tyson J. Hayes committed Jul 30, 2017
2 parents 7bd6c89 + 6dea7f5 commit 2a850cd
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
- Fix error when setting address on adapter where NameServer
Property does not exist in registry for interface - see
[issue #237](https://github.com/PowerShell/xNetworking/issues/237)
- MSFT_xIPAddress:
- Improved examples to clarify how to set IP Address prefix -
see [issue #239](https://github.com/PowerShell/xNetworking/issues/239)

## 5.0.0.0

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<#
.EXAMPLE
Disabling DHCP and adding a static IP Address for IPv6 and IPv4
using default prefix lengths for the matching address classes
#>
Configuration Example
{
Expand All @@ -25,7 +26,7 @@ Configuration Example
# If no prefix is supplied IPv6 will default to /64.
xIPAddress NewIPv6Address
{
IPAddress = '2001:4898:200:7:6c71:a102:ebd8:f482/64'
IPAddress = '2001:4898:200:7:6c71:a102:ebd8:f482'
InterfaceAlias = 'Ethernet'
AddressFamily = 'IPV6'
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<#
.EXAMPLE
Disabling DHCP and adding multiple static IP Addresses for IPv6
Disabling DHCP and adding multiple static IP Addresses for IPv4 and IPv6
#>
Configuration Example
{
Expand All @@ -22,11 +22,18 @@ Configuration Example
AddressFamily = 'IPv6'
}

xIPAddress NewIPAddress
xIPAddress NewIPv6Address
{
IPAddress = '2001:4898:200:7:6c71:a102:ebd8:f482/64','2001:4598:210:7:6d71:a102:ebe8:f483/64'
InterfaceAlias = 'Ethernet'
AddressFamily = 'IPV6'
}

xIPAddress NewIPv4Address
{
IPAddress = '192.168.10.5/24','192.168.10.6/24'
InterfaceAlias = 'Ethernet'
AddressFamily = 'IPV4'
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<#
.EXAMPLE
Disabling DHCP and adding a static IP Address for IPv6 and IPv4
using specified prefixes in CIDR notation.
#>
Configuration Example
{
param
(
[Parameter()]
[System.String[]]
$NodeName = 'localhost'
)

Import-DscResource -Module xNetworking

Node $NodeName
{
xDhcpClient DisabledDhcpClient
{
State = 'Disabled'
InterfaceAlias = 'Ethernet'
AddressFamily = 'IPv6'
}

xIPAddress NewIPv6Address
{
IPAddress = '2001:4898:200:7:6c71:a102:ebd8:f482/64'
InterfaceAlias = 'Ethernet'
AddressFamily = 'IPV6'
}

xIPAddress NewIPv4Address
{
IPAddress = '192.168.10.5/24'
InterfaceAlias = 'Ethernet'
AddressFamily = 'IPV4'
}
}
}

0 comments on commit 2a850cd

Please sign in to comment.