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>]
[[-WinCNIVersion] <String>] [[-WinCNIPath] <String>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]
Initializes a NAT network.
Initializes a NAT network using default values.
PS C:\> Initialize-NatNetworkInitializes a NAT network using default values.
PS C:\> Initialize-NatNetwork -NetworkName 'natNW' -Gateway '192.168.0.5' -CIDR 32Size 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: FalseBypass confirmation to install any missing dependencies (Windows CNI plugins and HNS module)
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseGateway IP address. Defaults to default gateway address.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseName 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: FalseAbsolute path to cni folder, e.g. ~\cni (not ~\cni\bin).
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: $env:ProgramFiles\containerd\cni
Accept pipeline input: False
Accept wildcard characters: FalseWindows CNI plugins version to use. Defaults to latest version.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: latest
Accept pipeline input: False
Accept wildcard characters: FalsePrompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseShows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
The specified version must match the installed version. To avoid compatibility issues, it is recommended to install the latest version.
If the CNI plugins are not found at the default or specified path, the user will be prompted to install them —unless -Confirm
is explicitly set to $false, in which case the plugins will be installed automatically without prompting.
If the user declines the installation, the NAT network setup operation will be terminated with a warning.