Bridging a wired network to a (managed by network manager) wireless one
I've got a rather oddball setup that I'm trying to make work.
I've got a PC running Ubuntu 8.04. It's connected to the internet via a wireless network and is controlled by Network Manager. The PC gets its IP through DHCP and all... everything works fine, there.
However, I have a TiVo that needs two things:
1 - Connectivity to the internet to download program info
2 - Connectivity to the PC to play MP3's from it (via byRequest, which is a TiVo server kinda daemon).
This has to happen over a wired ethernet connection between the TiVo and the PC.
I've read a few how-to's about brctl, and I've tried some possible solutions, but haven't gotten them to work. One that I believe I tried was:
# brctl addbr br0
# brctl addif br0 eth0
# brctl addif br0 wlan0
# ifconfig eth0 0.0.0.0
# ifconfig br0 0.0.0.0 up
I left the wlan0 IP alone, because it was being set by DHCP. It was my hope that, since the bridging was supposed to let both adapters see each other's traffic, the IP address from the wireless would suffice for hosts on the wired network *and* that DHCP requests on the wired network would pass on to the wireless where the access-point would give out an IP. This didn't work. ALSO, the PC lost connectivity with the internet as well.
I've tried a few derivatives of this, but to no success. So, I've got a few basic questions.
1 - I've got an Atheros-style wireless card, with "wlan0" and "wmaster0". Am I correct to be using the "wlan0"?
2 - What role do the three IP addresses (eth0, wlan0, and br0) play? When is each one used? Are the wired and wireless interfaces supposed to be reset to 0.0.0.0 and they both use br0's IP? If so, am I supposed to be using DHCP on br0 to obtain an IP, and it just asks on both interfaces?
3 - What are the ramifications if I setup a bridge and then the wireless goes down or changes AP's?
4 - Is is possible to use Network Manager to manage the wireless, or am I going to have to use WPASupplicant?
Disclaimer: I have never successfully used bridging.
I'd run the wired network and hence eth0 on a different subnet (e.g., 192.168.3.0/24) than wlan0, and use NAT (network address translation). When TiVo sends a packet to "the internet" it goes by wire to your PC, which changes its source address to its own and forwards it through wlan0 to your ISP. When a response comes back, the PC undoes the NATting (masquerading) and passes the packet to TiVo. I think the easiest way to achieve that on a dynamically assigned address (as you get on wlan0 by DHCP) is masquerading -- :study: man iptables and look at target MASQUERADE.
If your TiVo sends DHCP requests, you can run a dhcpd (server) on your PC and satisfy them there. That's easy to set up, but make sure it only listens on eth0.
Quigi is right, the easiest way to do what you want is how he suggested you set it up. or use a proxy server on your PC and have the tivo connect to the proxy. I have found that bridging a Wireless connection does not work so well. In theory it should work fine but it doesn't. The way a bridge works essentially is that it takes over the Physical NIC connection and then assigns the interfaces bridged to the bridge access the network through the bridge, it is something like a gateway. Now because a wireless connection and card have other facets to it like wireless connection strength and authentication I have never been able to get it to work because the bridge interface does not have the facilities to deal with these other factors of a wireless connection. But either way good luck.
|All times are GMT -5. The time now is 09:34 PM.|