microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.43k stars 822 forks source link

No internet connection from WSL2 - "Network is unreachable" / "FIB table does not exist." #7127

Closed w-biggs closed 3 years ago

w-biggs commented 3 years ago

Windows Build Number

Microsoft Windows [Version 10.0.19042.1052]

WSL Version

Kernel Version

5.4.72

Distro Version

Ubuntu 20.04

Other Software

No response

Repro Steps

Try to connect to a remote server and it will fail, with the exact error depending on how you are trying to connect. I'm unsure why this happened - it began to occur after running Restart-Service LxssManager in Powershell and has continued to occur after restarting my computer. There hasn't been any recent Windows update as far as I can remember.

Expected Behavior

Internet connections should be functional.

Actual Behavior

Internet connections are not functional. ip route show returns Error: ipv4: FIB table does not exist.

I am not using a VPN and manually setting the nameserver in resolv.conf doesn't seem to do anything.

Diagnostic Logs

wsl.etl is included in the attached ZIP file. wsl.zip

Output of networking.bat ```HNS objects: { "ActivityId":"6F1B78CE-EE98-4513-BBC9-B9D84E96F744", "AdditionalParams":{ }, "CurrentEndpointCount":0, "Extensions":[ { "Id":"E7C3B2F0-F3C5-48DF-AF2B-10FED6D72E7A", "IsEnabled":false, "Name":"Microsoft Windows Filtering Platform" }, { "Id":"E9B59CFA-2BE1-4B21-828F-B6FBDBDDC017", "IsEnabled":false, "Name":"Microsoft Azure VFP Switch Extension" }, { "Id":"430BDADD-BAB0-41AB-A369-94B67FA5BE0A", "IsEnabled":true, "Name":"Microsoft NDIS Capture" } ], "Flags":11, "GatewayMac":"00-15-5D-A4-78-71", "Health":{ "AddressNotificationMissedCount":0, "AddressNotificationSequenceNumber":3, "DHCPNotificationMissedCount":0, "DHCPNotificationSequenceNumber":0, "DNSCacheNotificationMissedCount":0, "DNSCacheNotificationSequenceNumber":0, "DNSNotificationMissedCount":0, "DNSNotificationSequenceNumber":0, "InterfaceNotificationMissedCount":0, "InterfaceNotificationSequenceNumber":0, "LastErrorCode":0, "LastUpdateTime":132693228708004163, "MacAddressNotificationMissedCount":0, "MacAddressNotificationSequenceNumber":0, "NeighborNotificationMissedCount":0, "NeighborNotificationSequenceNumber":0, "RouteNotificationMissedCount":0, "RouteNotificationSequenceNumber":0, "XlatNotificationMissedCount":0, "XlatNotificationSequenceNumber":0 }, "ID":"C08CB7B8-9B3C-408E-8E30-5E16A3AEB444", "IPv6":false, "LayeredOn":"37FE8074-6CC6-48AA-B56B-1F89F8D2045D", "MacPools":[ { "EndMacAddress":"00-15-5D-A4-7F-FF", "StartMacAddress":"00-15-5D-A4-70-00" } ], "MaxConcurrentEndpoints":0, "Name":"Default Switch", "NatName":"ICS095DBB63-8141-4620-876B-5B0968E05915", "Policies":[ ], "State":1, "Subnets":[ { "AdditionalParams":{ }, "AddressPrefix":"192.168.80.0/20", "Flags":0, "GatewayAddress":"192.168.80.1", "Health":{ "LastErrorCode":0, "LastUpdateTime":132693227565780025 }, "ID":"2CDC17D6-4D18-495B-B538-C907E2A4481A", "IpSubnets":[ { "AdditionalParams":{ }, "Flags":3, "Health":{ "LastErrorCode":0, "LastUpdateTime":132693227565780025 }, "ID":"5C06E2E1-88D5-486F-856B-AA397B408DF8", "IpAddressPrefix":"192.168.80.0/20", "ObjectType":6, "Policies":[ ], "State":0 } ], "ObjectType":5, "Policies":[ ], "State":0 } ], "SwitchGuid":"C08CB7B8-9B3C-408E-8E30-5E16A3AEB444", "SwitchName":"Default Switch", "TotalEndpoints":0, "Type":"ICS", "Version":47244640267, "Layer":{ "ActivityId":"E53C61C7-92F1-4C93-BAA1-39C7E166FC72", "AdditionalParams":{ }, "Extensions":[ { "Id":"E7C3B2F0-F3C5-48DF-AF2B-10FED6D72E7A", "IsEnabled":false, "Name":"Microsoft Windows Filtering Platform" }, { "Id":"E9B59CFA-2BE1-4B21-828F-B6FBDBDDC017", "IsEnabled":false, "Name":"Microsoft Azure VFP Switch Extension" }, { "Id":"430BDADD-BAB0-41AB-A369-94B67FA5BE0A", "IsEnabled":true, "Name":"Microsoft NDIS Capture" } ], "Flags":0, "Health":{ "LastErrorCode":0, "LastUpdateTime":132693227565780025 }, "ID":"37FE8074-6CC6-48AA-B56B-1F89F8D2045D", "IsFSE":false, "IsSDN":false, "MacPools":[ { "EndMacAddress":"00-15-5D-F4-FF-FF", "StartMacAddress":"00-15-5D-F4-F0-00" } ], "Name":"Default Switch", "Policies":[ ], "State":0, "SubType":"NAT", "SupportsIpv6":false, "Type":"Layered", "Version":47244640267, "Resources":{ "AdditionalParams":{ }, "AllocationOrder":1, "Allocators":[ { "AdditionalParams":{ }, "AllocationOrder":0, "ExternalNic":false, "Flags":0, "Health":{ "LastErrorCode":0, "LastUpdateTime":132693227565780025 }, "ID":"DAF93415-FA41-4275-A31D-FA5A2AB0D305", "IsPolicy":false, "IsolateSwitch":false, "MacAddress":"Default Switch", "State":3, "SwitchAllocated":true, "SwitchId":"C08CB7B8-9B3C-408E-8E30-5E16A3AEB444", "Tag":"Virtual Switch" } ], "CompartmentOperationTime":0, "Flags":0, "Health":{ "LastErrorCode":0, "LastUpdateTime":132693227565780025 }, "ID":"E53C61C7-92F1-4C93-BAA1-39C7E166FC72", "PortOperationTime":0, "State":1, "SwitchOperationTime":0, "VfpOperationTime":0 } }, "Resources":{ "AdditionalParams":{ }, "AllocationOrder":2, "Allocators":[ { "AdapterNetCfgInstanceId":"{095DBB63-8141-4620-876B-5B0968E05915}", "AdditionalParams":{ }, "AllocationOrder":0, "CompartmendId":0, "Connected":true, "DNSFirewallRules":true, "DevicelessNic":false, "DhcpDisabled":true, "EndpointNicGuid":"4946DC63-759E-4824-BC83-A3649A2750A3", "EndpointPortGuid":"544D08C3-5AF9-4CC4-8CE3-432DEBCB4B6F", "Flags":0, "Health":{ "LastErrorCode":0, "LastUpdateTime":132693227591485122 }, "ID":"0D474547-A213-4658-8D79-C8DFC24E060E", "InterfaceGuid":"095DBB63-8141-4620-876B-5B0968E05915", "IsPolicy":false, "IsolationId":0, "MacAddress":"00-15-5D-A5-E7-69", "ManagementPort":true, "NcfHidden":false, "NicFriendlyName":"Default Switch", "NlmHidden":true, "PreferredPortFriendlyName":"Container NIC 0d474547", "State":3, "SwitchId":"C08CB7B8-9B3C-408E-8E30-5E16A3AEB444", "Tag":"Host Vnic", "WaitForIpv6Interface":false, "nonPersistentPort":false }, { "AdditionalParams":{ }, "AllocationOrder":1, "Dhcp":true, "Dns":true, "ExternalInterfaceConstraint":0, "Flags":0, "Health":{ "DHCPState":2, "DNSState":2, "ICSState":2, "LastErrorCode":0, "LastUpdateTime":132693228657931365 }, "ICSDHCPFlags":0, "ICSFlags":0, "ID":"F7DDDC5D-3320-4920-B5BE-AAB9E6AA9C22", "IsPolicy":false, "Prefix":20, "PrivateInterfaceGUID":"095DBB63-8141-4620-876B-5B0968E05915", "State":3, "SubnetIPAddress":"192.168.80.0", "Tag":"ICS" } ], "CompartmentOperationTime":0, "Flags":0, "Health":{ "LastErrorCode":0, "LastUpdateTime":132693227591465126 }, "ID":"6F1B78CE-EE98-4513-BBC9-B9D84E96F744", "PortOperationTime":0, "State":1, "SwitchOperationTime":0, "VfpOperationTime":0, "parentId":"E53C61C7-92F1-4C93-BAA1-39C7E166FC72" } } { "ActivityId":"D4466C45-4074-4416-97C9-425B9607EB8A", "AdditionalParams":{ }, "CurrentEndpointCount":1, "DNSServerList":"172.30.160.1", "Extensions":[ { "Id":"E7C3B2F0-F3C5-48DF-AF2B-10FED6D72E7A", "IsEnabled":false, "Name":"Microsoft Windows Filtering Platform" }, { "Id":"E9B59CFA-2BE1-4B21-828F-B6FBDBDDC017", "IsEnabled":false, "Name":"Microsoft Azure VFP Switch Extension" }, { "Id":"430BDADD-BAB0-41AB-A369-94B67FA5BE0A", "IsEnabled":true, "Name":"Microsoft NDIS Capture" } ], "Flags":9, "GatewayMac":"00-15-5D-50-77-00", "Health":{ "AddressNotificationMissedCount":0, "AddressNotificationSequenceNumber":1, "DHCPNotificationMissedCount":0, "DHCPNotificationSequenceNumber":0, "DNSCacheNotificationMissedCount":0, "DNSCacheNotificationSequenceNumber":0, "DNSNotificationMissedCount":0, "DNSNotificationSequenceNumber":0, "InterfaceNotificationMissedCount":0, "InterfaceNotificationSequenceNumber":0, "LastErrorCode":0, "LastUpdateTime":132693228708014160, "MacAddressNotificationMissedCount":0, "MacAddressNotificationSequenceNumber":0, "NeighborNotificationMissedCount":0, "NeighborNotificationSequenceNumber":0, "RouteNotificationMissedCount":0, "RouteNotificationSequenceNumber":0, "XlatNotificationMissedCount":0, "XlatNotificationSequenceNumber":0 }, "ID":"B95D0C5E-57D4-412B-B571-18A81A16E005", "IPv6":false, "IsolateSwitch":true, "LayeredOn":"9554BF92-B2A6-4620-93D3-64978D04AAC8", "MacPools":[ { "EndMacAddress":"00-15-5D-50-7F-FF", "StartMacAddress":"00-15-5D-50-70-00" } ], "MaxConcurrentEndpoints":1, "Name":"WSL", "NatName":"ICSA62D02DF-EC10-4E6E-8E1D-23C49CAE870B", "Policies":[ ], "State":1, "Subnets":[ { "AdditionalParams":{ }, "AddressPrefix":"172.30.160.0/20", "Flags":0, "GatewayAddress":"172.30.160.1", "Health":{ "LastErrorCode":0, "LastUpdateTime":132693227919082411 }, "ID":"72A9938B-2B53-4235-B6F4-F2EF6BFEE457", "IpSubnets":[ { "AdditionalParams":{ }, "Flags":3, "Health":{ "LastErrorCode":0, "LastUpdateTime":132693227919082411 }, "ID":"6F7B59DB-76EF-4C50-84BF-9B011DD09213", "IpAddressPrefix":"172.30.160.0/20", "ObjectType":6, "Policies":[ ], "State":0 } ], "ObjectType":5, "Policies":[ ], "State":0 } ], "TotalEndpoints":1, "Type":"ICS", "Version":47244640267, "Layer":{ "ActivityId":"E24D2DDB-7B62-4D16-B4AA-4C3B2ABC75FC", "AdditionalParams":{ }, "Extensions":[ { "Id":"E7C3B2F0-F3C5-48DF-AF2B-10FED6D72E7A", "IsEnabled":false, "Name":"Microsoft Windows Filtering Platform" }, { "Id":"E9B59CFA-2BE1-4B21-828F-B6FBDBDDC017", "IsEnabled":false, "Name":"Microsoft Azure VFP Switch Extension" }, { "Id":"430BDADD-BAB0-41AB-A369-94B67FA5BE0A", "IsEnabled":true, "Name":"Microsoft NDIS Capture" } ], "Flags":0, "Health":{ "LastErrorCode":0, "LastUpdateTime":132693227919092443 }, "ID":"9554BF92-B2A6-4620-93D3-64978D04AAC8", "IsFSE":false, "IsSDN":false, "MacPools":[ { "EndMacAddress":"00-15-5D-FB-FF-FF", "StartMacAddress":"00-15-5D-FB-F0-00" } ], "Name":"WSL", "Policies":[ ], "State":0, "SubType":"NAT", "SupportsIpv6":false, "Type":"Layered", "Version":47244640267, "Resources":{ "AdditionalParams":{ }, "AllocationOrder":1, "Allocators":[ { "AdditionalParams":{ }, "AllocationOrder":0, "ExternalNic":false, "Flags":0, "Health":{ "LastErrorCode":0, "LastUpdateTime":132693227919092443 }, "ID":"F1C505F4-1631-4166-9F9F-1DAC1BED5E93", "IsPolicy":false, "IsolateSwitch":true, "MacAddress":"WSL", "State":3, "SwitchAllocated":true, "SwitchId":"5E68AF17-A7A7-4BC3-BF3D-D80A635EA3D9", "Tag":"Virtual Switch" } ], "CompartmentOperationTime":0, "Flags":0, "Health":{ "LastErrorCode":0, "LastUpdateTime":132693227919092443 }, "ID":"E24D2DDB-7B62-4D16-B4AA-4C3B2ABC75FC", "PortOperationTime":0, "State":1, "SwitchOperationTime":0, "VfpOperationTime":0 } }, "Resources":{ "AdditionalParams":{ }, "AllocationOrder":2, "Allocators":[ { "AdapterNetCfgInstanceId":"{A62D02DF-EC10-4E6E-8E1D-23C49CAE870B}", "AdditionalParams":{ }, "AllocationOrder":0, "CompartmendId":0, "Connected":true, "DNSFirewallRules":true, "DevicelessNic":false, "DhcpDisabled":true, "EndpointNicGuid":"86E4686B-1106-4CF9-9DB0-F343D5F47B4E", "EndpointPortGuid":"364DE496-3241-4587-AFFA-91B81E4BE4B8", "Flags":0, "Health":{ "LastErrorCode":0, "LastUpdateTime":132693227925205636 }, "ID":"E650BCBA-EC70-4DF7-AFD2-577F11673A09", "InterfaceGuid":"A62D02DF-EC10-4E6E-8E1D-23C49CAE870B", "IsPolicy":false, "IsolationId":0, "MacAddress":"00-15-5D-51-E8-18", "ManagementPort":true, "NcfHidden":false, "NicFriendlyName":"WSL", "NlmHidden":true, "PreferredPortFriendlyName":"Container NIC e650bcba", "State":3, "SwitchId":"5E68AF17-A7A7-4BC3-BF3D-D80A635EA3D9", "Tag":"Host Vnic", "WaitForIpv6Interface":false, "nonPersistentPort":false }, { "AdditionalParams":{ }, "AllocationOrder":1, "Dhcp":false, "Dns":true, "ExternalInterfaceConstraint":0, "Flags":0, "Health":{ "DHCPState":1, "DNSState":2, "ICSState":2, "LastErrorCode":0, "LastUpdateTime":132693228658041361 }, "ICSDHCPFlags":0, "ICSFlags":0, "ID":"79E378EE-6E50-482C-A2CB-25565F201FBF", "IsPolicy":false, "Prefix":20, "PrivateInterfaceGUID":"A62D02DF-EC10-4E6E-8E1D-23C49CAE870B", "State":3, "SubnetIPAddress":"172.30.160.0", "Tag":"ICS" } ], "CompartmentOperationTime":0, "Flags":0, "Health":{ "LastErrorCode":0, "LastUpdateTime":132693227925125794 }, "ID":"D4466C45-4074-4416-97C9-425B9607EB8A", "PortOperationTime":0, "State":1, "SwitchOperationTime":0, "VfpOperationTime":0, "parentId":"E24D2DDB-7B62-4D16-B4AA-4C3B2ABC75FC" } } { "ID":"bb2dc3d8-f93e-4137-a893-b6edf0d2b33c", "Name":"Ethernet", "Version":47244640267, "AdditionalParams":{ "SwitchId":"5E68AF17-A7A7-4BC3-BF3D-D80A635EA3D9", "SwitchPortId":"2C72C1DB-80D5-4887-BB74-EDFC958AE2F0" }, "State":2, "VirtualNetwork":"b95d0c5e-57d4-412b-b571-18a81a16e005", "VirtualNetworkName":"WSL", "MacAddress":"00-15-5D-50-76-F7", "IPAddress":"172.30.170.40", "PrefixLength":20, "GatewayAddress":"172.30.160.1", "IPSubnetId":"6f7b59db-76ef-4c50-84bf-9b011dd09213", "DNSServerList":"172.30.160.1", "SharedContainers":[ ], "VirtualMachine":"D381B03C-C43D-4CA0-9E61-0304413820CA" } { "ActivityId":"DC437A69-263C-476C-8CFA-6FD28B76F0DE", "AdditionalParams":{ }, "CompartmentGuid":"B1062982-2B18-4B4F-B3D5-A78DDB9CDD49", "CompartmentId":1, "Containers":[ ], "Flags":0, "Health":{ "LastErrorCode":0, "LastUpdateTime":132693227560386657 }, "ID":"910F7D92-BA2D-4C3F-98AE-7C0AC590D2DC", "IsDefault":true, "Policies":[ ], "State":1, "Version":47244640267 } Routing table: =========================================================================== Interface List 23...98 28 a6 1f b5 ed ......Realtek PCIe GBE Family Controller 3...34 e1 2d 80 c6 7c ......Intel(R) Wireless-AC 9560 160MHz 8...34 e1 2d 80 c6 7d ......Microsoft Wi-Fi Direct Virtual Adapter 24...36 e1 2d 80 c6 7c ......Microsoft Wi-Fi Direct Virtual Adapter #2 12...34 e1 2d 80 c6 80 ......Bluetooth Device (Personal Area Network) 1...........................Software Loopback Interface 1 40...00 15 5d a5 e7 69 ......Hyper-V Virtual Ethernet Adapter 48...00 15 5d 51 e8 18 ......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 10.0.1.1 10.0.1.7 25 10.0.1.0 255.255.255.0 On-link 10.0.1.7 281 10.0.1.7 255.255.255.255 On-link 10.0.1.7 281 10.0.1.255 255.255.255.255 On-link 10.0.1.7 281 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 172.30.160.0 255.255.240.0 On-link 172.30.160.1 5256 172.30.160.1 255.255.255.255 On-link 172.30.160.1 5256 172.30.175.255 255.255.255.255 On-link 172.30.160.1 5256 192.168.80.0 255.255.240.0 On-link 192.168.80.1 5256 192.168.80.1 255.255.255.255 On-link 192.168.80.1 5256 192.168.95.255 255.255.255.255 On-link 192.168.80.1 5256 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 10.0.1.7 281 224.0.0.0 240.0.0.0 On-link 192.168.80.1 5256 224.0.0.0 240.0.0.0 On-link 172.30.160.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 10.0.1.7 281 255.255.255.255 255.255.255.255 On-link 192.168.80.1 5256 255.255.255.255 255.255.255.255 On-link 172.30.160.1 5256 =========================================================================== Persistent Routes: None IPv6 Route Table =========================================================================== Active Routes: If Metric Network Destination Gateway 1 331 ::1/128 On-link 23 281 fe80::/64 On-link 40 5256 fe80::/64 On-link 48 5256 fe80::/64 On-link 48 5256 fe80::61d9:df84:3b42:cc2b/128 On-link 23 281 fe80::d8a4:2fa4:a20a:4717/128 On-link 40 5256 fe80::e55b:f572:a1bc:ea3f/128 On-link 1 331 ff00::/8 On-link 23 281 ff00::/8 On-link 40 5256 ff00::/8 On-link 48 5256 ff00::/8 On-link =========================================================================== Persistent Routes: None Deleting HNS network The LxssManager service is stopping. The LxssManager service could not be stopped. Name : HnsPacketCapture CaptureMode : SaveToFile LocalFilePath : C:\Users\WB\AppData\Local\Temp\WSL\diagnostics\\packets.etl MaxFileSize : 250 MB TraceBufferSize : 0 KB MaxNumberOfBuffers : 0 SessionStatus : NotRunning Name : Microsoft-Windows-NDIS-PacketCapture SessionName : HnsPacketCapture Level : 5 MatchAnyKeyword : 0xFFFFFFFFFFFFFFFF MatchAllKeyword : 0x0 CaptureType : BothPhysicalAndSwitch VmCaptureDirection : IngressAndEgress MultiLayer : False LinkLayerAddress : {} EtherType : {} IpAddresses : {} IpProtocols : {} TruncationLength : 128 + lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.2 LTS Release: 20.04 Codename: focal + uname -a Linux LAPTOP-1B4HQ0RO 5.4.72-microsoft-standard-WSL2 #1 SMP Wed Oct 28 23:40:43 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux + ip a 1: lo: mtu 65536 qdisc noop state DOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: bond0: mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether e2:0f:04:5f:d4:37 brd ff:ff:ff:ff:ff:ff 3: dummy0: mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether 5e:77:77:c8:de:c1 brd ff:ff:ff:ff:ff:ff 4: sit0@NONE: mtu 1480 qdisc noop state DOWN group default qlen 1000 link/sit 0.0.0.0 brd 0.0.0.0 5: eth0: mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether 00:15:5d:5f:ea:f4 brd ff:ff:ff:ff:ff:ff + ip route show Error: ipv4: FIB table does not exist. Dump terminated ++ ip route show ++ awk '/default/ { print $3 }' Error: ipv4: FIB table does not exist. Dump terminated + gateway= + '[' 0 '!=' 0 ']' + ping -c 4 '' ping: : Name or service not known + ping -c 4 1.1.1.1 ping: connect: Network is unreachable + traceroute 1.1.1.1 traceroute to 1.1.1.1 (1.1.1.1), 30 hops max, 60 byte packets connect: Network is unreachable + cat /etc/resolv.conf # This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf: # [network] # generateResolvConf = false nameserver 172.31.192.1 + which curl + curl -m 5 -v https://microsoft.com * Could not resolve host: microsoft.com * Closing connection 0 curl: (6) Could not resolve host: microsoft.com ```
w-biggs commented 3 years ago

I did some more digging and it looks like issue #5437 had occurred because Storage Sense was (inexplicably) automatically turned on. Disabling swap for now fixed the issue but I don't want this to be permanent so I'm figuring out now how to get my user folder decompressed without waiting an (estimated) 19 hours for it to decompress.