The problem
One day I am setting up my remote dev enrivroment via cabled connectiion with my laptop, and I wanted internet access to my dev machine, but both the remote machine and my laptop are conected to an internal network. Then I realised my laptop is also connected to internet via wifi, that raises the question:
In Windows 11, how to use the bridging feature to share an Ethernet port (connected via cable) as a LAN port to another device, while already being connected to an external network via Wi-Fi?
My Solution
- Bridging the wifi adapter and the cabled network adapter in control panel.
- Set both machine to make them in the same local subnet.
- Set network gateway on the dev machine to the laptop's ip.
- Set a route rule on laptop's cabled network interface, to send all packages toward wifi network interface since it's not in the same subnet.
- Alternativly, set the wifi NIC to be in the same subnet since its connected by the net bridge
Conclusion What is net bridge
Net bridge is a net traffic control device the does not physically seperate NICs on default unlike switch or router, but it can filter broadcast network traffic and seperate subnets by setting.