external help file: containers-toolkit-help.xml Module Name: containers-toolkit online version: schema: 2.0.0
Initializes a NAT network.
Initialize-NatNetwork [[-NetworkName] <String>] [[-Gateway] <String>] [[-CIDR] <Int32>] [-WhatIf]
[[-WinCNIVersion] <String>] [[-WinCNIPath] <String>] [<CommonParameters>]
Initializes a NAT network.
Initializes a NAT network using default values.
PS C:\> Initialize-NatNetwork
Initializes a NAT network using default values.
PS C:\> Initialize-NatNetwork -NetworkName 'natNW' -Gateway '192.168.0.5' -CIDR 32
Size of the subnet mask. Defaults to 16
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: 16
Accept pipeline input: False
Accept wildcard characters: False
Gateway IP address. Defaults to default gateway address.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: Default gateway address
Accept pipeline input: False
Accept wildcard characters: False
Name of the new network. Defaults to 'nat'
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 0
Default value: 'nat'
Accept pipeline input: False
Accept wildcard characters: False
Absolute path to cni folder.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: Path where containerd is installed or $Env:ProgramFiles\Containerd\cni
Accept pipeline input: False
Accept wildcard characters: False
Windows CNI plugin version to use. Defaults to latest version.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: Latest version
Accept pipeline input: False
Accept wildcard characters: False
Shows what would happen if the cmdlet runs. The cmdlet isn't run.
Type: SwitchParameter
Parameter Sets: Setup
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
The version provided needs to match the installed version. To avoid any issues, it is safer to install the latest version.
If Windows CNI plugins are not installed at the default or provided path, the user is prompted to install the missing plugins.
Windows CNI plugins have not been installed.
Do you want to install the Windows CNI plugins?
[Y] Yes [N] No [?] Help (default is "N"):
- If a user enters
Y
, the user to consents to the download and installation of the missing plugins. - If a user enters
N
(default), execution terminates with an error.