LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-20-2007, 06:57 PM   #1
notapplicable
Member
 
Registered: Sep 2005
Location: Suburbia
Distribution: Slackware 14.0
Posts: 68

Rep: Reputation: 15
Trying to make a linux wireless bridge for wireless router


The overall situation, described in more detail than the subject of this thread:
Upstairs, I have a wireless router connected to my internet connection. Downstairs, I have some computers without wireless connections connected to a wireless router. I want to connect one wireless router to the other in order to provide the computers downstairs with an internet connection.

My tested, but not working, solution:
  • Get a Linux box with a wireless connection and an ethernet connection... done.
  • Make the box connect wirelessly to the router upstairs... done.
  • Connect the box, using ethernet, to the router downstairs, to the WAN port... done.
  • The router should see the computer as a dhcp server (it's running dhcpd) and get an IP address from the computer... failed.
  • Because the box is connected to the router's WAN port, it should be serving an internet connection to all the other computers that are downstairs... uninitiated.

Obviously, my solution is missing some steps: namely, getting the computer to serve the wireless router with an internet connection, but right now, I'm trying to get the router to see the computer as a dhcp server and get an IP address from it.

Help? Thanks in advance for any answers.
 
Old 06-20-2007, 07:00 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
What type or routers are they? Some routers are based on linux and have open source firmware that can do this by flashing the router.
 
Old 06-20-2007, 07:02 PM   #3
notapplicable
Member
 
Registered: Sep 2005
Location: Suburbia
Distribution: Slackware 14.0
Posts: 68

Original Poster
Rep: Reputation: 15
They're both Airlink routers.
 
Old 06-20-2007, 09:03 PM   #4
elmr007
Member
 
Registered: Aug 2006
Location: Texas
Distribution: FC6
Posts: 60

Rep: Reputation: 15
Have tryed that with linksys routers...pain in the ***. It's probably seeing your linux box as something like 192.168.4. and it cannot pass out the 4. subnet on the lan side because that is the wan side. I know it's sounds weird but it will cause it to error out.

Easy solution: plug your linux box into the lan side and everything sould work ok.
more complicated solution: get two linksys wrt54G routers and bridge them through the wireless side. you can find documentation on doing the at the linksys website.
 
Old 06-21-2007, 10:48 AM   #5
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
Some airlink routers work with OpenWrt and I'm pretty sure bridging is an option for OpenWrt.
 
Old 06-21-2007, 12:43 PM   #6
notapplicable
Member
 
Registered: Sep 2005
Location: Suburbia
Distribution: Slackware 14.0
Posts: 68

Original Poster
Rep: Reputation: 15
I have an Airlink AR410W.

elmr007: If I were to connect it to the LAN side, the router would not be serving my computer's internet connection to all the other boxes that are downstairs.

Last edited by notapplicable; 06-21-2007 at 12:52 PM.
 
Old 06-21-2007, 01:39 PM   #7
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
Look at the network setup section of this link. It basically would use the linux machine as a bridge only and the router as a switch (disable router and dhcp functionality -- these will be taken care of on the other side of the bridge). This might be why elmr007 said to plug it into a regular port, not the WAN port.

Last edited by pljvaldez; 06-21-2007 at 01:42 PM.
 
Old 06-21-2007, 10:40 PM   #8
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
Quote:
Originally Posted by pljvaldez
Look at the network setup section of this link.
I tried to follow the advice in that link a couple of years ago, but could not get it work as the wireless card driver I was using would not operate as an access point.

But I don't see why you couldn't just configure the linux machine as a router/gateway for the downstairs network, with the wireless router acting as a switch, as suggested. Some wireless routers will even let you configure the WAN port as a extra LAN port.

The upstairs machines would have no access to the downstairs ones (except by port forwarding from the router/gateway), but the OP didn't seem to want that.
 
Old 06-21-2007, 10:48 PM   #9
notapplicable
Member
 
Registered: Sep 2005
Location: Suburbia
Distribution: Slackware 14.0
Posts: 68

Original Poster
Rep: Reputation: 15
Quote:
But I don't see why you couldn't just configure the linux machine as a router/gateway for the downstairs network, with the wireless router acting as a switch, as suggested.
Good idea. Problem is, I don't know how to do that (how would I make the router a switch?)... I've made a network bridge, but it really doesn't create an internet connection for the other computers.

Last edited by notapplicable; 06-21-2007 at 10:49 PM.
 
Old 06-21-2007, 11:23 PM   #10
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
Is the prob. with the linux gateway or configuring the wireless router?

To use a linux machine as a gateway/router there are several custom distros which will run on almost anything. There are polished semi-commercial ones like Clarkconnect with nice web admin interfaces and more lightweight hands-on stuff like LEAF.

Probably you can configure any linux distro in the same way, but most folks have old hardware around and a dedicated machine is less hassle.

I used a LEAF variant for several years on a 486 with just a floppy drive, then Clarkconnect on an old Pentium I, before cheap wireless routers hit the market.

If your wireless router has a web admin interface (are there any that don't?) you can probably turn off DHCP and use only the LAN ports. Then it will be just be a dumb switch. If you don't need wireless you could just use a switch instead.
 
Old 06-22-2007, 11:43 AM   #11
notapplicable
Member
 
Registered: Sep 2005
Location: Suburbia
Distribution: Slackware 14.0
Posts: 68

Original Poster
Rep: Reputation: 15
Ah. I see what's happened: the bridge doesn't even work. I just did a google search of bridging wireless and ethernet connections, and I found the Linux Foundation wiki, which says: "This is a known problem, and it is not caused by the bridge code. Many wireless cards don't allow spoofing of the source address. It is a firmware restriction with some chipsets."

So, to answer your question, maroonbaboon, the problem is with the linux gateway.

Now, having presented myself with these grim facts about wireless networking, I have no idea what to do.

(Someone move this thread to networking, please?)

Last edited by notapplicable; 06-22-2007 at 11:45 AM.
 
Old 06-22-2007, 12:49 PM   #12
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
Well, if you're willing to pay ~$50, I have one of these that works great and is pretty versatile. It can be a client, AP (what you need), or router. It's a good little tool for my toolbox.

I use it mainly in router mode for wired hotel connections when on travel. Let's me roam the room with my lappy. Occasionally I'll use it as a client at home to connect a computer I'm repairing to my network (so I don't have to string wires across the room -- tripping hazard and chewing hazard for my 9 month old ).

Otherwise, if you want a permanent unit, you could get a Linksys WRT54G. If you update the firmware with OpenWRT or Sveasoft, it'll have a client/AP mode.
 
Old 06-22-2007, 08:46 PM   #13
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
Best solution is to haul a cable between the floors. Usually there's some weak spot if you are handy with power tools

Otherwise the downstairs linux PC can join the network upstairs using wireless, and act as a gateway for the downstairs network through its ethernet port. The upstairs router is then the ISP for the downstairs network. I would think any PC running any distro could be configured to do this. I only ever used dedicated distros like the ones I mentioned. You should check your wireless card is supported if you want to go that way.

The suggestion by pljvaldez to use an OpenWRT flashed router is a more elegant solution, but I think pretty much equivalent, except you need to buy the hardware.

If you have two OpenWRT routers apparently you can unify the whole network using something called WDS. See the docs at http://openwrt.org/ .
 
Old 06-22-2007, 09:57 PM   #14
slimm609
Member
 
Registered: May 2007
Location: Chas, SC
Distribution: slackware, gentoo, fedora, LFS, sidewinder G2, solaris, FreeBSD, RHEL, SUSE, Backtrack
Posts: 430

Rep: Reputation: 67
remove the cable from the wan port and plug it into 1 or the 4 computer ports. now it a switch and enable ip_forward on the linux box and configure iptables to allow everything to pass through. it will use the dhcp and everything from up stairs and it should work fine.
 
Old 06-22-2007, 11:26 PM   #15
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
Quote:
Originally Posted by slimm609
...it should work fine.
If the o/p is happy fiddling with IPTables this is certainly the quickest and simplest way to go. Seems harder to find good IPTables tutorials since dedicated routers took over, but here's some things to look at:

http://blog.supportpro.com/2007/03/iptables/

http://iptables-tutorial.frozentux.n...tml/index.html

http://www.yolinux.com/TUTORIALS/Lin...rkGateway.html
 
  


Reply



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
Using linux PC as wireless bridge without using NAT kheldar Linux - Wireless Networking 2 02-05-2007 02:09 AM
How to make a wireless router work? calidris Ubuntu 2 10-23-2006 12:17 PM
wireless linux not connecting to router pc, windows wireless works glorsplitz Linux - Wireless Networking 1 10-01-2006 07:59 PM
Using my laptop to bridge between a wireless gateway and my non-wireless desktop? SocialEngineer Linux - Wireless Networking 2 07-28-2006 10:46 PM
Anyone know of a live-cd which can make my p166 act like a Wireless Bridge? Royle Linux - Wireless Networking 2 09-14-2004 01:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration