LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices

Reply
 
Search this Thread
Old 09-30-2003, 12:30 PM   #1
jim64
Member
 
Registered: Jun 2003
Distribution: Gentoo, Slackware
Posts: 51

Rep: Reputation: 15
Wireless + Enet bridge using linux 2.4 or 2.6?


Hi
Does any one know how to make a wireless bridge with linux 2.4 or 2.6 kernel. When i say bridge i mean bridge not AP. In other words i want to have one computer with a wireless card and a ethernet card that will connect to an AP and then share that connection with about 3 computers on ethernet. Is this possible or is it not. I have already tried to use brctl to set up a bridge between my wireless and wired. No luck.

My situation.
I am a college student who has about 3 desktops and 1 laptop. One mac in the kitchen/den for mp3s and movies, another mac in my room for school work, and a linux/win doul boot machine in my room. i have a 4th box thats a pentium 2 that i could set up as a full time bridge once i figure out how to set it up. For experiments sake i have a laptop that has an orinoco gold card that uses the orinoco driver or a lynksys card using the hostap driver. Once i get that working then i will set it up on some linux desktop full time. Below is a diagram of what i want to do.

Big school college network (Access point)
||WIFI||
||WIFI||
My bridge (what i need to know how to build)
||ETH||
||ETH||
(my 3 or 4 desktops)

I have tried to rout before but have had no luck b4 maybe due to the schools router or something but had no luck and its not what i want to do because i want every thing to pass through. I purchased the linksys WET11 bridge and it worked great for like a day then it would randomly lock up and become un responsive (likeley caused by all the arp traffic for nachi and msblast that every one had). One day it locked and would not come back to i took it back to fry's. I want to make a linux box that will do something like that.

Sorry for the long winded question but i wanted to be specific about it. When i search for bridge on google, ldp, or linuxquestions.org all i find is stuff on how to build an AP out of linux and i already know how to do that so that doesn't help. Please i am begging for help on this one.

If you want you can IM me on aim: p2prat or i can chat on irc if you want that way others can listen and also learn something.

Thanks
jim
 
Old 09-30-2003, 05:45 PM   #2
hakcenter
Member
 
Registered: Apr 2003
Location: Not to far from the computer screen
Distribution: RedHat 9.0
Posts: 324

Rep: Reputation: 30
This is all iptables assuming you get the Cards working

2.4* for now

WIFI = eth0 = subA
Ethernet = eth1 = subB

subA = 192.168.1.0/255.255.255.0
subB = 10.0.0.0/255.255.255.0
*adjust subnets to whatever they really are

service iptables stop
service iptables save
service iptables start

iptables -A INPUT -m state --state INVALID -j DROP
iptables -A FORWARD -m state --state INVALID -j DROP
iptables -A OUtPUT -m state --state INVALID -j DROP

iptables -t nat -A PREROUTING -m state --state INVALID -j DROP
iptables -t nat -A OUTPUT -m state --state INVALID -j DROP
iptables -t nat -A POSTROUTING -m state --state INVALID -j DROP

iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -i eth0 -j ACCEPT
iptables -A INPUT -i eth1 -j ACCEPT
iptables -A INPUT -j DROP

iptables -A FORWARD -s subA -d subB -j ACCEPT
iptables -A FORWARD -s subB -d subA -j ACCEPT
iptables -A FORWARD -j DROP

iptables -t nat -A POSTROUTING -s subA -d subB -j MASQUERADE
iptables -t nat -A POSTROUTING -s subB -d subA -j MASQUERADE

iptables -P INPUT DROP
iptables -P FORWARD DROP


Last edited by hakcenter; 09-30-2003 at 05:48 PM.
 
Old 10-01-2003, 03:51 AM   #3
MMHein
LQ Newbie
 
Registered: Sep 2003
Location: On the planet Earth
Distribution: Debian GNU/Linux "Woody"
Posts: 22

Rep: Reputation: 15
You're requirements are identical to mine!

Theoretically Proxy ARP/IP Bridging should do the trick, but I couldn't get it flying until now!

Requirements
============
I want to bridge a wired ethernet with an wireless LAN, where systems on both sides can communicate with each other.

Environment
===========
WLAN Access Point (AP#01): D-Link DWL-1000AP
IP: 10.10.10.88
Netmask: 255.255.224.0 (don’t ask me why, it’s due to history, and can’t be changed)

Ethernet/WLAN-Bridge (BR#01): Siemens Scenic Mobile 510 AGP notebook
OS: Debian GNU/Linux 3.0r1 Kernel 2.4.22
Hostname: sm510agp-bridge
eth0: D-Link DFE-660
IP: 192.168.0.250
Netmask: 255.255.255.0
Promiscious Mode
eth1: Lucent Orinoco Silver WaveLAN
IP: 10.10.10.79
Netmask: 255.255.224.0
Promiscious Mode

PC#01: NoName
OS: Win2k SP#3
Hostname: scrappy
eth0:
IP: 192.168.0.10
Netmask: 255.255.255.0
Default Gateway: 192.168.0.250

+-------+ +-------+ + + +-------+ /--------\
| PC#01 +-------+ BR#01 +-+ <<<>>> +-+ AP#01 +-----+ LAN#02 +
+-------+ +-------+ +-------+ \--------/
eth0 eth0 eth1

Approaches
==========
1.) Ethernet Bridge
-------------------
Using default bridging features coming along with Linux, I had to learn that bridging a wired with a wireless LAN won’t work because of MAC address issues, and the Orinoco card can’t be operated using the HostAP driver. => DISMISS!

2.) Proxy ARP/IP Bridge
-----------------------
Okay, IP Bridging or Proxy ARP seemed to be the solution; I got ‘iptools2’, I got ‘parprouted’, compiled and installed the software, configured everything accordingly, and....from BR#01 I could successfully do a ‘ping’ to the AP#01 and any system on LAN#02 and PC#01. When using PC#01 and trying the same, I can successfully ping both interfaces of BR#01, but not a single step further!

3.) Router
----------
Hmm, approach 2.) didn’t work, why not just configuring the Debian box as a router?

bash# route add -net 192.168.0.0 netmask 255.255.255.0 dev eth0
bash# route add -net 10.10.0.0 netmask 255.255.224.0 dev eth1

When trying this configuration the results are just the same as with approach 2.).

From PC#01 I can’t go past the WLAN connection!
 
Old 10-01-2003, 11:53 AM   #4
jim64
Member
 
Registered: Jun 2003
Distribution: Gentoo, Slackware
Posts: 51

Original Poster
Rep: Reputation: 15
What do you mean subA subB below? Are you just telling me that i should set up each interfaces IPs as follows? Or is this something i need to put into a config file of some kind?

> WIFI = eth0 = subA
>Ethernet = eth1 = subB

>subA = 192.168.1.0/255.255.255.0
>subB = 10.0.0.0/255.255.255.0
>*adjust subnets to whatever they really are

This is all i have to run and it should work?

Thank you so much for your reply. Up to now no one has helped me with this.
Jim
 
Old 10-01-2003, 12:01 PM   #5
hakcenter
Member
 
Registered: Apr 2003
Location: Not to far from the computer screen
Distribution: RedHat 9.0
Posts: 324

Rep: Reputation: 30
you should have the subs Match whatever is the existing network configuration is.

You need some more things... like enabling forwarding
/etc/sysctl.conf
net.ipv4.ip_forward=1

not sure if you need to setup a static route since the machine has both cards. Can't remember exactly
 
Old 10-01-2003, 01:24 PM   #6
jim64
Member
 
Registered: Jun 2003
Distribution: Gentoo, Slackware
Posts: 51

Original Poster
Rep: Reputation: 15
So how do i setup a static route. Is there a "how to" some where? Sorry to ask so many questions but i am still learning and need simple instructions.

thanks
jim
 
Old 10-01-2003, 01:28 PM   #7
hakcenter
Member
 
Registered: Apr 2003
Location: Not to far from the computer screen
Distribution: RedHat 9.0
Posts: 324

Rep: Reputation: 30
I woulnd't worry about it unless the configuration doesn't work.

Which I don't think you'll need to setup static routes on the bridge, but maybe for routers that need to be connected.
 
Old 10-02-2003, 02:52 AM   #8
MMHein
LQ Newbie
 
Registered: Sep 2003
Location: On the planet Earth
Distribution: Debian GNU/Linux "Woody"
Posts: 22

Rep: Reputation: 15
I did it!

No iptables, only Proxy ARP/IP bridge! And it works perfectly fine! From PC#01 I can access any in-house system, as well as any system available on the inet!

And it's really simple and straight forward, you only have to know how to do it! ;-)

The setup is not as follows:
* any system on my LAN are masked 255.255.224.0 (due to history!)
* any system got an IP address like 10.10.10.x
* on BR#01 I configured:
- disabled promiscous mode on both the wired, and the wireless interface
- enable IP forwarding (echo "1" > /proc/sys/net/ipv4/ip_forward)
- added a static route for PC#01 via device eth0
- added a static route for network 10.10.0.0 netmask 255.255.224.0 via device eth1
- started parprouted eth1 eth0

et voilá.... )
 
Old 10-02-2003, 04:40 PM   #9
jim64
Member
 
Registered: Jun 2003
Distribution: Gentoo, Slackware
Posts: 51

Original Poster
Rep: Reputation: 15
Congrats thats really cool! Now that you got yours working can you help me please. I would be so grateful if you could make a simple how to in noob terms so that i can also do it. Not reall basic just give a little more detail. What config files do i need to edit and what should they say.

Thanks a ton. I am going to try to go by what has been said so far but i am sure i will not get far.

Jim
 
Old 10-03-2003, 03:58 AM   #10
MMHein
LQ Newbie
 
Registered: Sep 2003
Location: On the planet Earth
Distribution: Debian GNU/Linux "Woody"
Posts: 22

Rep: Reputation: 15
Environment
===========

Any#01 Hub Linux Proprietary Hub Any#02
+-------+ /------\ +-------+| <<<>>> |+-------+ /------\ +-------+
| PC#01 +-----{ LAN#01 }-----+ BR#01 ++ ++ AP#01 +-----{ LAN#02 }-----+ PC#02 |
+-------+ \------/ +-------+ +-------+ \------/ +-------+
eth0 eth0 eth1 eth0 eth0
192.168.0.10 192.168.0.252 | 192.168.0.254 192.168.0.20
192.168.0.253

Netmask: 255.255.255.0

BR#01
=====
Software
--------
* Debian GNU/Linux 3.0p1 (my case)
* Kernel 2.4.22 (bridging enabled) (my case)
* Orinoco driver (orinoco_cs) => http://www.hpl.hp.com/personal/Jean_...x/Orinoco.html
* wireless tools 26 (iwconfig, etc.) => http://www.hpl.hp.com/personal/Jean_...nux/Tools.html
* iptools2 (ip, etc.) => ftp://ftp.inr.ac.ru/ip-routing/
* Proxy ARP/IP Bridge (parprouted) => http://freshmeat.net/projects/parprouted/

Configuration
-------------
1) /etc/network/interfaces

# all available interfaces
auto lo eth0 eth1

# The loopback interface
iface lo inet loopback

# The first network card (wired)
iface eth0 inet static
address 192.168.0.252
netmask 255.255.255.0

# The first network card (wireless)
iface eth1 inet static
address 192.168.0.253
netmask 255.255.255.0

2) /etc/init.d/ifdownup (executable; sym.link -> /etc/rc[2345].d/S30ifdownup)

/sbin/ifdown -a
sleep 2
/sbin/ifup -a
sleep 2

3) /etc/init.d/ipbridge (executeable; sym.link -> /etc/rc[2345].d/S30ipbridge)

/sbin/ifconfig eth0 0.0.0.0
/sbin/ifconfig eth1 0.0.0.0
/usr/local/sbin/parprouted eth1 eth0
echo “1” > /proc/sys/net/ipv4/ip_forward

4) /etc/init.d/routing (executeable; sym.link -> /etc/rc[2345].d/S30routing)

/sbin/route add -host 192.168.0.10 dev eth0
/sbin/route add -net 192.168.0.0 netmask 255.255.255.0 dev eth1
 
Old 10-03-2003, 02:17 PM   #11
jim64
Member
 
Registered: Jun 2003
Distribution: Gentoo, Slackware
Posts: 51

Original Poster
Rep: Reputation: 15
Thanks i will try that tonight or tomorrow some time and see what happens. Sorry but one more question. What is iptools2? searching on linuxquestions only led me to 2 of your posts. And i could not find any thing when i searched for it on source forge. Google also does not turn up any thing relevant about it. I went to that link you sent me but there is nothing about iptools2 in there.

Thanks again
 
Old 10-07-2003, 02:49 AM   #12
jim64
Member
 
Registered: Jun 2003
Distribution: Gentoo, Slackware
Posts: 51

Original Poster
Rep: Reputation: 15
Nope did not work for me. I guess i should have stated my question better.

I should have said:
Any one out there know how to bridge wired and wireless transparently? Is it possible under linux? What would it be level 2 or 3? The linksys WET11 is able to do this but i already purchased one and it crapped out on me all the time then one day it just stoped turning on all togather. So i took it back to the store. Others on large networks have also reported issues where the wet11 becomes unresponsave but i have yet to hear of one doing like mine did. So this is why i turn to linux. If any one has any ideas i would realy apreciate it. I will contenue to search the net on how to do this.

Thanks hakcenter and MMheim for your posts and time.

jim
 
Old 04-14-2004, 08:17 PM   #13
k6ctw
LQ Newbie
 
Registered: Jul 2003
Posts: 1

Rep: Reputation: 0
Lightbulb WET11 and Red Hat

I have purchased a Linksys WET11 Ethernet bridge for use with a Red Hat Enterprise Linux 3 Workstation (desktop) system. I have, as per information I saw on another site, set the WET11 and the PC with a fixed IP address within the appropriate domain and have not used DHCP. I am able to contact the Wireless Acccess Point (WAP11 another Linksys product) and set configurations, and manage the unit over the wireless link, so I know that I am getting that far. Now my problem is getting access to my DNS entries. I hve tried building a Route to them in the network device entries (using the WAP11 address) but so far no luck. Any ideas ?

My network looks like this:

PC----WET11 ---(encrypted air interface)---WAP11 -- router ----------cable modem



A note, I have previously set up a Linux laptop with a WPC11 (pcmcia) and it did not need any of this fancy fixed IP stuff etc.

All replies appreciated.
 
Old 09-21-2005, 07:04 AM   #14
pipoun
LQ Newbie
 
Registered: Sep 2005
Posts: 1

Rep: Reputation: 0
Hello everyone,

This is an up for this thread because I've been searching for too long to solve my problem.

I have a similar problem than yours. I want to create a bridge between a wireless network (connected to the Internet) and a wired net.
But, I don't want my bridge to be totally transparent because, it's not a server, it's my main PC. Moreover, due to my ISP, I can not, for the moment, use static adresses, I have to use dhcp.

So I've heard about parprouted, which seemed to be the answer. But how can I use it with these other constraints (bridge access to the net, dhcp)?

I will be very gratefull if you would have a solution for me.
 
Old 10-19-2005, 08:46 AM   #15
tru2life
LQ Newbie
 
Registered: Oct 2005
Posts: 1

Rep: Reputation: 0
Bridging Help

I read thorugh this thread and it seems to be the help I am looking for but I am not the Linux guru I wish I was.

Basically I am wanting to use an old box with Linux on it as a bridge, like a Linksys WET11, to add a network capable printer to the wireless network. I set a budget abd the printer ate it up but I do have a Linksys PCI wireless card and an old box so I think this should work.

So the idea is to use the wire nice to plug into the printer and use the wireless PCI card to connect to the wireless network so the printer can be accessible to all devices on the wired or wireless network.

So I don't need another subnet, I want to use my existing network where the wired and wireless device are all on the same subnet. So DHCP would need to pass through, not worried about DNS because the bridge won't need access to the net. Doesn't even need DHCP just to be able to print from anywhere.

The box I have isn't great, PII 300 but should be able to handle this no problem.

If someone would be so kid as ro reccomend:
1. A distro for this lil project
2. Reccomend a setup
3. Actual process to set up
4. Prayers, cause the wife is unhappy about not being able to use the printer the way we talked about.

Thanks for any help provided in advance!!
 
  


Reply


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
Using my laptop to bridge between a wireless gateway and my non-wireless desktop? SocialEngineer Linux - Wireless Networking 2 07-28-2006 11:46 PM
Wireless Bridge? yilez Linux - Wireless Networking 2 12-01-2005 02:16 PM
Wireless Linux through a bridge: Will it work? NSFrankenstein Linux - Wireless Networking 3 09-15-2004 07:31 PM
linux gentoo network not connecting through wireless bridge indatasys Linux - Wireless Networking 1 05-30-2004 10:26 AM
do i have to bridge a wireless and wired connection on the same linux box ulto Linux - Wireless Networking 2 04-07-2004 01:37 PM


All times are GMT -5. The time now is 07:27 AM.

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