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 12-10-2023, 10:36 AM   #1
slackerz
Member
 
Registered: Aug 2020
Posts: 73

Rep: Reputation: 23
Hostapd Bridge Configuration


Got a question re. Hostapd and its bridge configuration. Look at these settings in a hostapd.conf.

Code:
interface=wlan1
bridge=br0
wlan1 is the AP interface.

What does setting the bridge iface actually do?

A source iface will be added to the bridge br0. Then what becomes the purpose of wlan1?

Which iface will clients on the AP get network access? br0 or wlan1?

Last edited by slackerz; 12-10-2023 at 10:47 AM.
 
Old 12-10-2023, 11:28 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,309

Rep: Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326
The Bridging idea is that 2 network interfaces get combined as a third bridging interface. This idea was around in the days of dialup modems which ran at very low speed, but unless you know the far end supports bridging, it doesn't.

It's also worth examining where the bottleneck is in your network traffic. On my system, the internet connection is the bottleneck. Back in the 1980s, 1200/300 baud modems were common. You could download at 1200bps, but you only uploaded at 300bps (because the other guy was presumably paying for the phone call ). So with 2 folks using these, comms were limited to 300bps. My first modem was 2400/2400 bps. With bridging, under those realities speed could be nearly doubled if you had two modems and two connections.

Laziest to check for bridging support, and forget it when you realise you haven't got it. Comment out the line on bridge interface. You don't need/want it.
 
Old 12-10-2023, 11:46 AM   #3
slackerz
Member
 
Registered: Aug 2020
Posts: 73

Original Poster
Rep: Reputation: 23
Seems I need/want it.

I would like to bridge two wifi interfaces but I can't with WDS. 4addr seems unsupported on the infstructure.

What this boils down to is some sort of v.iface where traffic from both ifaces can be combined. A v.iface can be a bridge (or virtual bridge)?

This is what NAT does. I'm looking for a replacement to NAT.

For example when I setup a DHCP server would I use br0 or wlan1 as the exterior iface?
 
Old 12-10-2023, 01:50 PM   #4
jayjwa
Member
 
Registered: Jul 2003
Location: NY
Distribution: Slackware, Termux
Posts: 779

Rep: Reputation: 246Reputation: 246Reputation: 246
From the text in the example hostapd.conf:
Quote:
# In case of atheros and nl80211 driver interfaces, an additional
# configuration parameter, bridge, may be used to notify hostapd if the
# interface is included in a bridge. This parameter is not used with Host AP
# driver. If the bridge parameter is not set, the drivers will automatically
# figure out the bridge interface (assuming sysfs is enabled and mounted to
# /sys) and this parameter may not be needed.
#
# For nl80211, this parameter can be used to request the AP interface to be
# added to the bridge automatically (brctl may refuse to do this before hostapd
# has been started to change the interface mode). If needed, the bridge
# interface is also created.
Thought I've never tested it, it seems wlan1 would get stuffed into br0 and the traffic from wlan1 would appear in br0. I don't use this setting, but I stuff wlan0 into br0 in my setup. You'd serve DHCP on br0.
 
1 members found this post helpful.
  


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
I got "unknown configuration item 'ieee80211n' in hostapd.conf Angela Wu Linux - Kernel 4 08-30-2013 04:03 PM
Bridge Networking: Access VM behind bridge from outside lin_user2004 Linux - Networking 9 07-26-2013 04:30 AM
bridge / qemu - bridge is natting multicast traffic eantoranz Linux - Networking 1 12-31-2012 06:46 PM
[SOLVED] To bridge or not to bridge (network) Adol Linux - Newbie 2 02-03-2012 09:03 AM
LXer: RC6 To Be Flipped On For Sandy Bridge, Ivy Bridge LXer Syndicated Linux News 0 12-11-2011 06:12 AM

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

All times are GMT -5. The time now is 03:26 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