0

I am connected via ethernet to a router which gives me an IP via dhcp. I want to share that dhcp of the real router via wifi of my laptop to devices around. My plan is to bridge ethernet and wifi, get an ip for this bridge using windows' dhcp client (works so far) and then "forward" the dhcp server's access via the bridged wifi interface to what ever devices that are able to connect successfully to the machine's hotspot.

Problem is - the dhcp server of the hotspot preventing the original router's dhcp access I hoped to share using this bridge.

So my plan is to disable windows hotspot's dhcp server, thus allowing the router's dhcp server to be accessed by hotspot-wifi-connected devices.

Couldn't find how to do that, is there a simple way to accomplish that?

Edit (some additional information) : The ip range I am getting from the real router is 10.0.0.x, the ip range of windows' hotspot I am sharing is 192.168.137.x. By successfully disabling windows hotspot's built in dhcp server, I hope that the 10.0.0.x dynamic allocation range will be accessible via wifi due to the bridge. I know I could probably edit the ip on my wifi devices statically to 10.0.0.x but I'm not interested in doing static work at all, I want this to work dynamically.

Edit 2 (more additional information, this works in reverse) : I was easily able to achieve to reverse of what I'm trying to accomplish; If I create a hotspot in my android device, connect windows wifi to it, bridge wifi to ethernet and connect ethernet to a switch, then all devices connected to that switch are receiving access to android hotspot's dhcp server and get an ip allocated and internet access via that hotspot, so I know this WORKS in THAT direction, all I'm trying to accomplish is the reverse of this working direction

Edit 3 :

The reverse (hotspot<-->wifi[dev0]--bridge--ethernet[dev0]-->switch--ethernet[dev1]) only works if this bridge combo exists in only one machine of the network, meaning that if by accident I have 2 machines with the wifi-ethernet bridge combo, then they cancel each other out and neither work.

1 Answer 1

0

Just to correct a misconception - it's not possible for a bridge to request an IP and forward it to a client. Only the client can request it.

As per this discussion bridging Wi-Fi to Ethernet on Windows isn't possible.

According to this Microsoft support question you can achieve this by applying static IP addressing to your bridge adapter and the clients.

I think trying to do this is unnecessarily complicating things. If ICS is correctly configured, it will NAT the traffic from the Wi-Fi clients. They should be able to access all the available network resources, including the internet. The client traffic in the internet will be NATted again by the router, but this should not cause problems. Usually double-NAT is problematic only when there's a need for port forwarding so a resource provided by the client can be reached from the internet.

Sharing Wi-Fi internet connection through wired connection isn't the same thing as the reverse. Wired NIC acts a passive device. It doesn't have an IP address, only the Wi-Fi adapter does. That's bridging. In reverse the Wi-Fi adapter is necessarily an active interface, as it handles the client associations which isn't a thing on wired connectivity at all.

Changing the IP addressing as described by Microsoft support disables the ICS DHCP service. However static IP addressing is still needed. This means ICS going from Wi-Fi to wire ICS doesn't bridge the traffic, it routes it. Googling today I found another possible way to disable the DHCP, but I suspect that also requires static IPs for clients.

What you're trying to do is using your Windows system as a passive AP. One notable difference in the concepts is that an AP radio doesn't have an IP; all communication between the AP radio and the client happens on Layer 2. Consequently what you could try is disable IP addressing from your Wi-Fi interface altogether, then create a bridge. I don't know if this is even possible; it may be that Windows only allows bridging to one direction.

8
  • Of course you can bridge a hotspot (i.e. AP) with e.g. an Ethernet NIC. What won't work is bridging a client (i.e. station) to one. With that said though, I have no idea if Windows is flexible enough to allow you to set up a bridged hotspot.
    – Tom Yan
    Sep 16, 2021 at 1:41
  • For the record, with certain NAT-ish MAC address manipulation, which is made possible in Linux by nftables, it is not a tough job to workaround the limitation in the client case to get at least IPv4 works essentially. (With recent kernel you also need the help of passthru MACVLAN)
    – Tom Yan
    Sep 16, 2021 at 1:47
  • @TomYan I haven't tested bridging with Windows and have none to test with, so referred to older discussion about the issue; and Microsoft support :-) I removed the OpenWRT reference - it's old so possibly outdated, pic is unclear and I don't even have an AP so can't run a trace to verify its claims. Sep 16, 2021 at 2:07
  • Hi all, please read Edit 2 I just added, I was able to achieve this in reverse without any difficulties: [Android hotspot -> windows 10 wifi <--bridged-->windows 10 ethernet-->switch-->other devices (tv, xbox, other pcs) receiving access to android hotspot's dhcp] so I KNOW it works in one way, no reason it shouldn't work the other way right? I really want the devices on the original question to receive ips from the router's dhcp server even though they don't have direct access to it. Sep 16, 2021 at 23:11
  • Updated my answer. Sep 17, 2021 at 7:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .