LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 09-23-2009, 02:33 PM   #1
bthornton
LQ Newbie
 
Registered: Mar 2005
Posts: 23

Rep: Reputation: 15
Problems Bridging wlan0 <--> eth0...


I've got small network with a typical wifi router serving as both a gateway to the Internet and an access point for wireless clients. I've also got a small gigabit Ethernet network with 3 hosts that I would like to participate transparently with the wifi network. One of these hosts is running Linux (Ubuntu Jaunty) and has a wifi card in it as well, so the plan is to bridge that wifi interface to the Ethernet interface and achieve full connectivity with that.

I've been reading the BRIDGE-STP-HOWTO and the instructions do not work. Right after I add the wifi interface (wlan0) to the bridge, I lose connectivity to the wireless network; ifconfig shows that wlan0 still has an IP but I cannot ping the wifi gateway. Same results when I bring the new bridge interface up.

Obviously I'm doing something wrong, and it doesn't help that the HOWTO doesn't cover wifi links. I have a feeling it has something to do with the order/mechanism by which the physical interfaces are initiated. Currently, my wifi connection is setup by NetworkManager when I log in; hence, wlan0 is already running when I add it to the bridge. (The fact that the HOWTO says to "Zero IP the interfaces" after creating the bridge leads me to believe that the interfaces must come up after the bridge has been created--but NetworkManager doesn't appear to know how to work with briges.).

Can someone point me in the right direction here? I'd *like* to keep using NetworkManager if possible because it seems to handle connecting with WPA2 with ease.

Thanks.
 
Old 09-24-2009, 06:12 AM   #2
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,373

Rep: Reputation: 557Reputation: 557Reputation: 557Reputation: 557Reputation: 557Reputation: 557
Am I correct in thinking you have

1. 3 boxes as a gigabit network, wired to a typical router (Does that do gigabit? It's hardly typical then)
2. A wifi card in one of the boxes which you want to use to give yourself a 1001Mb connection to your router (which I presume has a slow (by comparison) feed out? How is this going to speed anything up? You are asking a lot of the bridging code. If the wifi box is a laptop, beware of 'ethernet switching' being set in the bios, which switches off one when the other is active.

That apart, I really think you need to hack into your router. As for pointing you in the right direction, allow me to quote the Irishman when asked for directions to somewhere: "If I was you, I wouldn't start from here at all!" :-)
 
Old 09-24-2009, 09:46 AM   #3
bthornton
LQ Newbie
 
Registered: Mar 2005
Posts: 23

Original Poster
Rep: Reputation: 15
business_kid: Not quite. Let me do a better job of explaining my network ASCIIly...

Code:
                     *
                     |
[[INTERNET]]-----[wifi router/AP]

=================== WALLS =================================

   *
   |
[Linux PC]-----[gigabit switch]-----[network printer]
                         |
                         |
                    [Windows PC]

             *
             |
          [laptop]

(Note that asterisks indicate a wireless link; all other implied links are Ethernet.)
Incidentally, the "wifi router/AP" is typical router hardware (Linksys WRT54GL) but I am running atypical router firmware on it (Tomato). I'm not really doing anything complex with it, but it does run a DHCP server that statically assigns addresses.

What I'm essentially going for here is to have all of my computers/printer appear to be on the same 192.168.1.x network. Obviously, that's easy for the laptop and Linux PC: They just connect to the wifi router and get assigned an address. But what if I want to print from the laptop? Or if I want to access the Internet from the Windows PC? In both of these cases, the Linux PC needs to act as a bridge to those packets.

I have had this "kinda working" by using NAT before, but NAT imposes the following limitations:

1. The Windows PC and printer can't get their IP from the DHCP server (which is only reachable via wireless)

2. The Windows PC and laptop can't share files easily with SMB because they are on separate networks.

I know I can refine the NAT setup more by proper routing and using a DHCP relay agent and installing a WINS server, etc. ... But bridging just looks easier on paper.
 
Old 09-25-2009, 03:25 AM   #4
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,373

Rep: Reputation: 557Reputation: 557Reputation: 557Reputation: 557Reputation: 557Reputation: 557
You'll have tpo give up on NetworkManager if you want to get clever, and use the init scripts instead. Otherwise you will end up in a home for the bewildered. With that setup, you can probably assign static IPs to everything, and then enter the appropriate lines in /etc/hosts. What mode are you setting each wifi interface to?
 
  


Reply

Tags
bridge, ethernet, network manager, ubuntu, wifi, wpa2


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VMWare's bridging vs Window's bridging - routing is messed up when Windows bridging brenan99 General 0 05-04-2008 10:24 PM
Bridging interfaces (eth0 + eth1 = br0) Mithrilhall Linux - Networking 1 10-27-2007 05:35 AM
bridging my lappy eth0 to the wlan0 ndiswrapper Sousis2U Linux - Wireless Networking 2 09-11-2005 03:53 PM
wlan0 doesn't work without eth0? linuxhippy Fedora 8 07-26-2005 07:43 PM
route wlan0 to eth0 hwood7587 Linux - Networking 1 07-13-2003 06:47 PM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration