I've tested in 3 differents PC in my network, with Fedora, Arch and Windows
None of the guest OS have Internet, nor VirtualBox, QEMU/KVM, and WSL2, but when I use brigde networking or MacVtap option in VirtualBox or QEMU, the guests magically can connect to the internet.
Why is that? My problem is that, WSL2 doesn't have an elegant and easy option for brigde networking, so I'll try to fix the problem for the root.
I'm in Windows 11 in my pc now, how can I have access to the internet from my guest OS's using NAT (Network Address Translation) in windows? (AKA wsl2) It has something to do with my router? I've read somewhere that it can be that my router has disabled the option for multiple IP's on the same MAC address or something, DNS?, DHCP?, I've searching for hours by now and nothing fixes my solution, help.
PragmaticMero - Peruvian/My england is bad lol
ask for more details if necesary
PS C:\Users\Myuser> ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . . . . : RyzenWin
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter vEthernet (WSL):
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #3
Physical Address. . . . . . . . . : 00-15-5D-64-26-05
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::485f:6b89:6d87:1a3%40(Preferred)
Autoconfiguration IPv4 Address. . : 169.254.1.163(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.0.0
Default Gateway . . . . . . . . . :
DHCPv6 IAID . . . . . . . . . . . : 671094109
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-2A-70-63-58-50-EB-F6-BD-95-12
NetBIOS over Tcpip. . . . . . . . : Enabled
Ethernet adapter Ethernet:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Realtek PCIe GbE Family Controller
Physical Address. . . . . . . . . : 50-EB-F6-BD-95-12
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::4c1c:758:ec87:a999%11(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.100.38(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : 30 July 2022 17:04:33
Lease Expires . . . . . . . . . . : 31 July 2022 17:04:33
Default Gateway . . . . . . . . . : fe80::1%11
192.168.100.1
DHCP Server . . . . . . . . . . . : 192.168.100.1
DHCPv6 IAID . . . . . . . . . . . : 122743798
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-2A-70-63-58-50-EB-F6-BD-95-12
DNS Servers . . . . . . . . . . . : 192.168.100.1
NetBIOS over Tcpip. . . . . . . . : Enabled
Ethernet adapter VirtualBox Host-Only Network:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : VirtualBox Host-Only Ethernet Adapter
Physical Address. . . . . . . . . : 0A-00-27-00-00-04
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::2dc3:beb9:1961:81df%4(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.56.1(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
DHCPv6 IAID . . . . . . . . . . . : 621412391
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-2A-70-63-58-50-EB-F6-BD-95-12
NetBIOS over Tcpip. . . . . . . . : Enabled
Ethernet adapter vEthernet (Default Switch):
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter
Physical Address. . . . . . . . . : 00-15-5D-4E-A1-40
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::3da3:8742:67c7:7a71%21(Preferred)
IPv4 Address. . . . . . . . . . . : 172.19.192.1(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.240.0
Default Gateway . . . . . . . . . :
DHCPv6 IAID . . . . . . . . . . . : 352327005
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-2A-70-63-58-50-EB-F6-BD-95-12
NetBIOS over Tcpip. . . . . . . . : Enabled
UPDATE :
YES!! I was right, It's my modem/router configuration. Here's what I've done, I've connected a TP-LINK TL-WR850N Wireless N Router to my main modem/router (Through the WAN Ethernet Blue port) and connected the TP-Link router to my main pc with Windows.
Windows has internet, and WSL2 Ubuntu too, when I ping google.com
and update/upgrade the packages, I've searched in the TP-Link configuration and found an option called NAT Forwarding that grabbed my attention.
I've enabled UPnP in my main router, still doesn't work, but It can be advise that you activate it in case of a problem.
And activated IGMP in my main router too, The TP-Link has it enabled by default and for I can see, I can't deactivate it LoL.
Still, no internet in WSL2 Ubuntu, but I guess it's a progress....
I'm going to clarify that, I'm not going to use the TP-Link router and call it a day, I'm paying for 200Mbps for Fiber Internet, and this little router (My ISP send it to me for free, I'm using it for another purpose now) limits the internet speed of my pc to around 90Mbps. The TP-Link has only 10/100Mbps ports, all of them, so yeah, thats a no no.
Thanks for the help.
my router has disabled the option for multiple IP's on the same MAC address
: in the case of NAT, from the router's POV you are using one IP on the same MAC address.Default Switch
) not work either? (It seems a bit strange that your WSL vEthernet has and has only IPv4 link-local address configured on it. Not exactly familiar with WSL though.)