LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 07-31-2014, 11:56 AM   #1
Paul!
LQ Newbie
 
Registered: Feb 2014
Posts: 21

Rep: Reputation: Disabled
Bridging (I think!)


I have home server running the home network.

Connection to the internet is by eth1 (actually a PCI modem card), and the home network is on eth0 (192.168.1.x). iptables, masquerading etc. Dhcp is available on eth0. There are a couple of access points around the house, which obviously transparently relay, so phones etc. can pick up an address and connect to the internet. Works great.

Now I want to put an access point on the server, and I want it to look like yet another access point. The server ap is wlan0. How? I have a feeling I should be bridging between wlan0 and eth0, but the examples given are effectively bridging between the internet (eth1) and wlan0.

Your comments would be appreciated

Paul
 
Old 08-01-2014, 07:36 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
Take a look at hostapd, your wireless adapter must support master mode.

Bridging wlan0 and eth0 would allow them to be on the same subnet.
 
Old 08-01-2014, 07:48 AM   #3
Paul!
LQ Newbie
 
Registered: Feb 2014
Posts: 21

Original Poster
Rep: Reputation: Disabled
Thanks Michael

No problem with hostapd (eventually I found an adapter capable of acting as an access point!) I can see the access point and attach, but obviously can't get an ip address yet. So that bit works.

So...if I allocate an address for wlan0 in the same subnet as eth1, and bridge, will I be able to use both at the same time? I'm very nervous about locking myself out. Should I tell dhcpd to allow requests from br0 or eth1 and wlan0? How about iptables, should I replace all references to eth1 with br0?

Essentially the examples always given are sort of like connecting a wire between two physical ports. I want to connect two ports in parallel.

Paul
 
Old 08-01-2014, 08:19 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
Not much experience with bridging but yes you want to use br0 in place of wlan0, eth0 and dhcp
 
Old 08-01-2014, 12:17 PM   #5
Paul!
LQ Newbie
 
Registered: Feb 2014
Posts: 21

Original Poster
Rep: Reputation: Disabled
Great - works well (with one oddity) I'll come on to that. I changed the 'home network port' in iptables from eth0 to br0 in iptables and my firewall is happy.

But, have the line

bridge_ports wlan0 eth0

in my /etc/network/interface file (this is a debian system). However the bridge is formed with only eth0. I can manually add wlan using addif, and then it's fine.
 
Old 08-03-2014, 03:02 AM   #6
Paul!
LQ Newbie
 
Registered: Feb 2014
Posts: 21

Original Poster
Rep: Reputation: Disabled
I guess I can close this now, with only the puzzling failure of wlan0 to join the bridge. The /etc/network/interfaces file brings up the bridge and adds eth0, but I had to add wlan0 automatically/manually with an entry in rc.local. The bridge_waitport parameter either doesn`t work, or doesn`t help in this case. In addition I needed to allow forwarding between the bridge components in iptables.
 
  


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
Bridging Q scottyob Linux - Networking 0 06-16-2009 11:10 AM
VMWare's bridging vs Window's bridging - routing is messed up when Windows bridging brenan99 General 0 05-04-2008 10:24 PM
Help with bridging Mithrilhall Linux - Networking 11 10-20-2006 04:00 PM
Bridging+Bonding for Bridging+HA+Load Balancing? kartheekpn Linux - Networking 0 08-13-2006 02:08 AM
Bridging? JapaneseKamikaz Linux - Networking 0 03-11-2003 03:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

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