You are not logged in.

#1 2008-07-21 05:36:12

band-aid
Member
Registered: 2008-06-07
Posts: 10

bridge between wired and wireless

This is what I am hoping to accomplish

------------                                                             ------------------------                                                     -------------------------
router          *****wireless connection 802.11******wlan0 - laptop - eth0 --------Wired ethernet---------------- another host(s)
------------                                                             ------------------------                                                     --------------------------

routers IP is 192.168.1.1

The "other host(s)" need to be able to pull information via dhcp from the router.

What I've tried so far

I've installed bridge-utils and enabled ip forwarding in /proc

brctl addbr br0
brctl addif br0 wlan0
brctl addif br0 eth0

This is where I get lost. I think I need to manually configure wlan0 and eth0. In Ubuntu I think I remember setting br0 to bridge_ports in /etc/network.d/interfaces but I am not sure how to do this in Arch.
Any suggestions?

Thanks

band-aid

Ok I think I have been going about this all wrong, is it possible to do what I need to do using iptables masquerading?

Last edited by band-aid (2008-07-21 07:20:33)

Offline

#2 2008-07-21 07:39:27

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: bridge between wired and wireless

For wlan0, connect to the wireless network normally.

For the other... I'm not sure whether you need to setup a static IP network between them, or maybe you'll just be alble to pull an IP via dhcp straight away on the "another host"

James

Offline

#3 2008-07-21 11:43:41

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: bridge between wired and wireless

You can use bridging OR ip masquerading - you don't need both. If you use bridging, wlan0 and eth0 join the bridge, which then gets its own virtual interface br0. This is the interface that gets an IP address, so that the laptop can continue to function normally. In this scenario, everything is on  single subnet, and no ip forwarding or routing manipulation is required.
If you use IP masquerading, you're basically setting up NAT (Network Address Translation). The router and wlan0 are on one subnet, eth0 and the other hosts(s) are on another, and the laptop functions as the router between the two - as well as doing its normal laptop-y things, of course.

There are probably various pros and cons either way - one that occurs to me now is that the IP masquerade option will probably leave you with a double-NAT setup, because your existing router is most likely doing NAT already. This may or may not be a problem for you - depends really on the kind of network apps you will be running. Personally, I prefer bridging in this kind of situation, just because I find it simpler.

Offline

#4 2008-07-21 19:07:38

band-aid
Member
Registered: 2008-06-07
Posts: 10

Re: bridge between wired and wireless

The bridge was able to pull an IP via DHCP. When I add my interfaces to my bridge I lose connectivity. I cannot ping google or my router. When pinging my router I get back destination host unreachable from the bridge. My interfaces cannot get information from the router via DHCP.

If I assign a static IP address to wlan0 I can ping my router but cannot ping google (network is unreachable). I assume this is because the router is not set as its gateway.

Thanks,
band-aid

EDIT: I've got it working

Thanks guys

Last edited by band-aid (2008-07-22 05:35:14)

Offline

#5 2008-08-22 14:03:12

Anders
Member
From: Sweden
Registered: 2006-05-19
Posts: 48
Website

Re: bridge between wired and wireless

Sorry for bumping, but how did you solve your problem?


Running: Arch Linux i686, x86_64, ppc

Offline

Board footer

Powered by FluxBB