Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have:

  • WiFi network with SSID=Network1 (running its own DHCP Server and connected to internet).
  • Computer1 with 1 ethernet interface and 1 WiFi interface.
  • Computer2 with ethernet interface.

My computers are all running Linux.

I would to connect Computer2 to my WiFi network using Computer1. If the network was ethernet i would just bridge both network interfaces in Computer1. But I don't know how to bridge an ethernet network and a WiFi network keeping the Wifi connection with WPA active.

I do not want to do NAT either, I want my computer2 to get an IP address directly from the DHCP server from the Wifi Network.

Diagram:

Computer2 <===(ethernet)===>Computer1<===(wifi network1)===>( INTERNET )
share|improve this question
    
what happens when you try to bridge the ethernet device with the wireless device - they should both be network devices that I thought you should be able to bridge... –  drone.ah Jan 26 '13 at 19:09
    
If I bridge them, my wireless interface stops being associated with the Access Point. –  fazineroso Jan 26 '13 at 20:02
    
You need either WDS or some form of NAT to bridge over WiFi. Otherwise, WiFi is not sufficiently compatible with Ethernet for bridging to work. If you've ruled out NAT and WDS, then it's hopeless. –  David Schwartz Jan 26 '13 at 20:43
    
How does dd-wrt do it then? They don't use NAT when you set routers in AP Client mode. –  fazineroso Jan 26 '13 at 21:26
    
@fazineroso: They do use NAT, otherwise the access point that they have a client connection to wouldn't send them the traffic. –  David Schwartz Jan 28 '13 at 0:16
add comment

closed as off topic by Michael Hampton, Ward, Scott Pack, mfinni, mdpc Jan 26 '13 at 21:18

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

See Bridging wlan0 to eth0

Excerpt:

It is not possible to bridge between wireless (client a.k.a. station mode) and wired intefaces

UPD:

If you want the second computer to get DHCP address from the wireless router, using dhcrelay can achieve that.

share|improve this answer
    
How do WiFi ap clients work then? I had an old Router with DD-WRT that used to do just that. I remember to configure the router as AP Client, and the ethernet ports would get connected to the WiFi Network. –  fazineroso Jan 26 '13 at 21:06
    
@fazineroso: They use NAT. If you look at the packets from the other side, you'll see that the DD-WRT router has rewritten the MAC addresses of devices connected to it so they appear to originate from that router. Over a client connection, an AP only sends packets that are to its clients. Devices connected to the DD-WRT router would not be clients of the access point -- the access point is prohibited from sending their packets to its clients by the WiFi spec. This is why WDS exists. NAT, such as "client bridging", is a workaround. –  David Schwartz Jan 28 '13 at 5:12
    
Well, I remember a computer connected through ethernet to the DD-WRT router would still get the DHCP information from the Original AP (router). And from other wireless stations in the network I could access the computer through the IP address, so it didnt look like NAT at all. –  fazineroso Jan 28 '13 at 7:36
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.