You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
846 B
846 B
WSL VM Networking
- Powershell (run as administrator)
- Steps to enable networking between WSL & HyperV
// show switches
$ Get-VMSwitch
// show networking interfaces
$ Get-NetIPInterface
// enable forwarding of wsl
$ Get-NetIPInterface | `
where {$_.InterfaceAlias -eq 'vEthernet (WSL)'} | `
Set-NetIPInterface -Forwarding Enabled -Verbose
// verify forwarding enabled
$ Get-NetIPInterface | where {$_.InterfaceAlias -eq 'vEthernet (WSL)'} | Select-Object ifIndex,InterfaceAlias,ConnectionState,Forwarding
// enble on both WSL & Default switch
$ Get-NetIPInterface | where {$_.InterfaceAlias -eq 'vEthernet (WSL)' -or $_.InterfaceAlias -eq 'vEthernet (Default Switch)'} | Set-NetIPInterface -Forwarding Enabled -Verbose