Skip to content

Hyper-V (and probably virtualbox) break UDP discovery #101

@BuongiornoTexas

Description

@BuongiornoTexas

I'm not sure if this a strictly a bug, but I'm reporting here so people are aware of it and can work around the issue. I do have a workaround, but I haven't done enough testing to see if the workaround breaks Hyper-V, so YMMV.

I'm running Windows 10 with Hyper-V installed and have an HS110 on my network. When I run kasa or kasa discover from this machine I get nothing.

Direct IP connection also works fine, as does connect by hostname.

If I disable the Hyper-V vEthernet virtual adapters, discovery works fine.

I'm not confident on terminology, but it looks as though the problem arises due Hyper-V virtual adapters having higher priority than the physical ethernet card - more precisely, on my machine the interface metrics for both the vEthernet adapter and the vEthernet Default switch are than lower interface metrics than the physical card.

I fixed problem this by changing the interface metrics on all of the virtual adapters and switches to have higher metrics than the physical adapter. After this discovery works.

Notes:

  1. Grab ifIndex for adapter with:

Get-NetIPInterface

  1. With admin enabled powershell, set the interface metric for adapter 12 to 45.

Set-NetIPInterface -InterfaceIndex 12 -InterfaceMetric 45

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions