LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (https://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   Wireless ethernet bridge? (https://www.linuxquestions.org/questions/linux-wireless-networking-41/wireless-ethernet-bridge-615333/)

nirj 01-21-2008 07:54 PM

Wireless ethernet bridge?
 
Hello,

My network is made up of a gateway computer running XP that uses ICS to assign internal IPs to the other computers on my network. I have an ethernet switch hooked up to the port of the gateway facing the network (192.168.0.1), and a wireless access point hooked up to that switch.

In another room, I have a computer with a wireless adapter and an ethernet port. I would like to be able to hook up an ethernet switch to the ethernet port of this computer so that multiple computers can access the internet through the switch. So the computer with the wireless adapter would have internet access as well as pass on that internet access to the switch, which would in turn pass that internet access on to individual computers hooked up to it. The computer with the wireless adapter would sort of be "converting" the wireless network back into a wired one.

I read online that creating a bridge between my wireless network interface and my wired network interface would do it, but after several attempts I still couldn't figure it out. Does anyone know how I might be able to do this?

Thanks in advance,
Nir

finegan 01-21-2008 08:23 PM

brctl is the command. There is a module for this stuff as well, its called: bridge.ko (wow, creative name huh)

brctl addbr br0 (you can call the bridge device monkeybutter0 if you like)
brctl addif br0 eth0
brctl addif br0 wlan0

Then you manipulate the bridge interface with any old layer 3 IP information.

Cheers,

Finegan

nirj 01-21-2008 08:30 PM

Quote:

Originally Posted by finegan (Post 3030818)
brctl is the command. There is a module for this stuff as well, its called: bridge.ko (wow, creative name huh)

brctl addbr br0 (you can call the bridge device monkeybutter0 if you like)
brctl addif br0 eth0
brctl addif br0 wlan0

Then you manipulate the bridge interface with any old layer 3 IP information.

Cheers,

Finegan

Thanks for your reply.

I seem to remember getting that far, and then neither interface could connect to anything. What do you mean by layer 3 ip info? Also, I forgot to mention that every computer on the network is currently set to receive its IP through DHCP.

Nir

finegan 01-21-2008 08:57 PM

OSI networking layers, layer 3 in this case being IP.

Hrm... the steps literally would go:

as examples
using eth0 for the wired card
using wlan0 for the wireless card

ifconfig eth0 0.0.0.0 up
ifconfig wlan0 0.0.0.0 up
iwconfig wlan0 essid "wirelessnetworkname"

Then the bridge stuff...

Getting the wireless card to associate to an access point is actually all layer 2, and you would be better off making certain that it associates with the access point before fiddling with the bridge stuff, think of it as the equivalent of plugging the network card into a switch. In the above case you're bringing up the interfaces without IP addresses, that's because you'll be giving the bridge device the IP address... now, the funky part is that if you get that IP from dhcp, its going to advertise for a dhcp lease accross both of the bridged devices. For simplicity's sake, its best to bring it up statically. Just pick an IP below the dhcp lease range for the wireless router. Almost every wireless router uses a /24 for its network and starts the lease range at 100, so something like:

ifconfig br0 192.168.1.90 up
route add default gw 192.168.1.1

Should work...

Cheers,

Finegan

nirj 01-21-2008 09:31 PM

Thanks again for your reply, finegan. After trying what you said, I couldn't connect to the internet on the computer with the bridge, however when I had the computer with the bridge as well as another computer hooked up to an ethernet switch, the second computer was able to ping the IP of the bridge interface on the other machine (192.168.0.47 at the time) successfully. I set the IP of the bridge statically as you suggested but was unable to ping anything on the machine with the bridge. Any idea how I can get internet on the machine with the bridge? Also, will the second computer i have connected to the switch be able to receive an IP through the bridge, and if so dynamically or statically?

Nir


All times are GMT -5. The time now is 01:33 PM.