Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Bridge: WLAN and LAN
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
cdauth
n00b
n00b


Joined: 19 Feb 2006
Posts: 12

PostPosted: Sun Mar 04, 2007 10:40 pm    Post subject: Bridge: WLAN and LAN Reply with quote

I've got a typical mobile workstation: a WLAN card connected via PCMCIA and a built-in ethernet card. I want to use these using a network bridge, but it seems to be impossible to configure that.

My configuration:
eth0 is the LAN network device. I want to use netplug on this.
ra0 is the WLAN device. It uses ndiswrapper as driver and connects to the networks using wpa_supplicant.

Both network devices (or actually the network bridge) shall use dhcpcd to get an IP address, apipa is the fallback method. When the PCMCIA card is not plugged in, the ra0 device does not exist, so it shall not be used for the bridge. When ra0 exists but is not connected, it shall not be used for the bridge. When no cable is plugged into the LAN card, the device is down and shall not be used for the bridge.

What I've tried:
My current configuration looks like this and doesn't work:
Code:

bridge_br0="eth0 ra0"
config_br0=( "dhcpcd" )
fallback_eth0=( "apipa" )
brctl_br0=( "setfd 0" "sethello 0" "stp off" )

config_eth0=( "null" )

modules_ra0=( "wpa_supplicant" )
wpa_supplicant_ra0="-Dwext"
config_ra0=( "null" )


Strange things have happened:

  • After executing rmmod ndiswrapper; modprobe ndiswrapper, net.ra0 and net.br0 are mysteriously being started automatically, which is not my desired behaviour. Actually, wpa_supplicant cannot connect then and net.br0 does not do anything either.
  • With eth0 only for bridge_br0, the whole thing almost worked. When I plugged in the cable, net.br0 was started and dhcpcd successfully configured it. But when I removed the cable, the br0 was removed and was not recreated after pluggin in the cable again.
  • With ra0 only for bridge_br0, wpa_supplicant could connect successfully. dhcpcd received the correct IP address, but immediately after net.ra0 finished starting, the br0 device was removed (sometimes it was even removed while dhcpcd was still running), so I couldn't use it.
  • I've tried to experiment with bridge_add_ra0 and bridge_add_eth0, but I couldn't manage to have dhcpcd run after the device was started.
  • With both eth0 and ra0 in bridge_br0, dhcpcd does not work when the LAN device is not connected. This is not what I want.


Can anyone explain this strage behaviour to me or give me a tip how I can get to work what I want?

What I practically want is that the LAN is used when it's available, if not, the WLAN is used and if that is not available, the network devices should be down. Additionally, I want to use qemu clients in the network, which is only possible using a network bridge according to gentoo-wiki.com. If there is any other possibility to do this, please tell me.
Back to top
View user's profile Send private message
Paczesiowa
Guru
Guru


Joined: 06 Mar 2006
Posts: 593
Location: Oborniki Śląskie, Poland

PostPosted: Sun Mar 04, 2007 10:55 pm    Post subject: Reply with quote

you don't need bridge. bridge is for something totally else.

you should check bonding .
http://gentoo-wiki.com/HOWTO_Setup_Bonded_ethernet_adapters
Back to top
View user's profile Send private message
cdauth
n00b
n00b


Joined: 19 Feb 2006
Posts: 12

PostPosted: Sun Mar 04, 2007 11:01 pm    Post subject: Reply with quote

Hm, that looks interesting, but how can I integrate the qemu client in my local network then?
Back to top
View user's profile Send private message
Paczesiowa
Guru
Guru


Joined: 06 Mar 2006
Posts: 593
Location: Oborniki Śląskie, Poland

PostPosted: Sun Mar 04, 2007 11:28 pm    Post subject: Reply with quote

I didn't use qemu, but vmware use of bridge or nat is implemented inside vmware modules. (basically it just works) no need to worry about host machine (kernel, iptables etc...)
Back to top
View user's profile Send private message
cdauth
n00b
n00b


Joined: 19 Feb 2006
Posts: 12

PostPosted: Mon Mar 05, 2007 8:14 pm    Post subject: Reply with quote

Yeah, qemu uses this too. But there is also the possibility to use the qemu client in the local network. But that's an idea, I could use an additional ip address and redirect all the requests to qemu via iptables. So thank you so far.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum