Fixing my routing table to make Hyper-V visible from the host machine

Get-NetIPAddress -AddressFamily IPv4 | Format-Table InterfaceIndex, InterfaceAlias, IPAddress, PrefixLength
InterfaceIndex InterfaceAlias                      IPAddress       PrefixLength
-------------- --------------                      ---------       ------------
             8 vEthernet (External Virtual Switch) 169.254.119.152           16
            55 vEthernet (WSL (Hyper-V firewall))  172.29.208.1              20
            42 vEthernet (Default Switch)          172.28.176.1              20
             9 Local Area Connection* 2            169.254.188.32            16
            23 Local Area Connection* 1            169.254.77.99             16
            16 Ethernet                            192.168.0.145             24
            21 Wi-Fi                               192.168.0.170             24
             1 Loopback Pseudo-Interface 1         127.0.0.1                  8
ipconfig
Windows IP Configuration


Ethernet adapter Ethernet:

   Connection-specific DNS Suffix  . :
   IPv4 Address. . . . . . . . . . . : 192.168.0.145
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.0.1

Ethernet adapter vEthernet (External Virtual Switch):

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::d51:fb34:f27:28b5%8
   Autoconfiguration IPv4 Address. . : 169.254.119.152
   Subnet Mask . . . . . . . . . . . : 255.255.0.0
   Default Gateway . . . . . . . . . :

Wireless LAN adapter Local Area Connection* 1:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Wireless LAN adapter Local Area Connection* 2:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Wireless LAN adapter Wi-Fi:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::930:d7b6:c9d9:c9b7%21
   IPv4 Address. . . . . . . . . . . : 192.168.0.170
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.0.1

Ethernet adapter vEthernet (Default Switch):

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::8a2f:88cb:75a9:fd6%42
   IPv4 Address. . . . . . . . . . . : 172.28.176.1
   Subnet Mask . . . . . . . . . . . : 255.255.240.0
   Default Gateway . . . . . . . . . :

Ethernet adapter vEthernet (WSL (Hyper-V firewall)):

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::2577:618e:1f9a:b974%55
   IPv4 Address. . . . . . . . . . . : 172.29.208.1
   Subnet Mask . . . . . . . . . . . : 255.255.240.0
   Default Gateway . . . . . . . . . :
route PRINT -4
===========================================================================
Interface List
 16...84 ba 59 1c 8e 15 ......Intel(R) Ethernet Connection (23) I219-V
  8...84 ba 59 1c 8e 15 ......Hyper-V Virtual Ethernet Adapter #3
 23...b0 47 e9 21 fc 83 ......Microsoft Wi-Fi Direct Virtual Adapter
  9...b2 47 e9 21 fc 82 ......Microsoft Wi-Fi Direct Virtual Adapter #2
 21...b0 47 e9 21 fc 82 ......Intel(R) Wi-Fi 6 AX203
  1...........................Software Loopback Interface 1
 42...00 15 5d 11 68 ce ......Hyper-V Virtual Ethernet Adapter
 55...00 15 5d 32 49 c0 ......Hyper-V Virtual Ethernet Adapter #2
===========================================================================

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0      192.168.0.1    192.168.0.145     25
          0.0.0.0          0.0.0.0      192.168.0.1    192.168.0.170     50
        127.0.0.0        255.0.0.0         On-link         127.0.0.1    331
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    331
  127.255.255.255  255.255.255.255         On-link         127.0.0.1    331
      169.254.0.0      255.255.0.0         On-link   169.254.119.152    281
  169.254.119.152  255.255.255.255         On-link   169.254.119.152    281
  169.254.255.255  255.255.255.255         On-link   169.254.119.152    281
     172.28.176.0    255.255.240.0         On-link      172.28.176.1   5256
     172.28.176.1  255.255.255.255         On-link      172.28.176.1   5256
   172.28.191.255  255.255.255.255         On-link      172.28.176.1   5256
     172.29.208.0    255.255.240.0         On-link      172.29.208.1   5256
     172.29.208.1  255.255.255.255         On-link      172.29.208.1   5256
   172.29.223.255  255.255.255.255         On-link      172.29.208.1   5256
      192.168.0.0    255.255.255.0         On-link     192.168.0.145    281
      192.168.0.0    255.255.255.0         On-link     192.168.0.170    306
    192.168.0.145  255.255.255.255         On-link     192.168.0.145    281
    192.168.0.170  255.255.255.255         On-link     192.168.0.170    306
    192.168.0.255  255.255.255.255         On-link     192.168.0.145    281
    192.168.0.255  255.255.255.255         On-link     192.168.0.170    306
        224.0.0.0        240.0.0.0         On-link         127.0.0.1    331
        224.0.0.0        240.0.0.0         On-link   169.254.119.152    281
        224.0.0.0        240.0.0.0         On-link     192.168.0.145    281
        224.0.0.0        240.0.0.0         On-link     192.168.0.170    306
        224.0.0.0        240.0.0.0         On-link      172.28.176.1   5256
        224.0.0.0        240.0.0.0         On-link      172.29.208.1   5256
  255.255.255.255  255.255.255.255         On-link         127.0.0.1    331
  255.255.255.255  255.255.255.255         On-link   169.254.119.152    281
  255.255.255.255  255.255.255.255         On-link     192.168.0.145    281
  255.255.255.255  255.255.255.255         On-link     192.168.0.170    306
  255.255.255.255  255.255.255.255         On-link      172.28.176.1   5256
  255.255.255.255  255.255.255.255         On-link      172.29.208.1   5256
===========================================================================
Persistent Routes:
  None

The address 192.168.0.123 is accessed from Ethernet adapter with address 192.168.0.145 (line 31), but it does not ping from it:

ping 192.168.0.123 -S 192.168.0.145
Pinging 192.168.0.123 from 192.168.0.145 with 32 bytes of data:
Reply from 192.168.0.145: Destination host unreachable.

It pings only through WiFi:

ping 192.168.0.123 -S 192.168.0.170
Pinging 192.168.0.123 from 192.168.0.170 with 32 bytes of data:
Reply from 192.168.0.123: bytes=32 time=230ms TTL=128
Reply from 192.168.0.123: bytes=32 time=106ms TTL=128
Reply from 192.168.0.123: bytes=32 time=19ms TTL=128

Leave a Reply

Your email address will not be published. Required fields are marked *