LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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, 11:08 AM   #1
slackerz
Member
 
Registered: Aug 2020
Posts: 73

Rep: Reputation: 23
Bridging two wifi interfaces


I want to find out if it can be done.

Following this guide:

https://jamielinux.com/docs/libvirt-...d-network.html

It shows how to create a virtual bridge. The wifi iface cannot be added to the bridge. So the wifi traffic will need to be routed to the bridge instead. It's well established that the problem can be solved using NAT and without using a bridge. I'm looking not to use NAT (don't ask).

Is routing alone enough? What would be routing config using a bridge for two wireless interfaces wlan0, wlan1 and bridge vbr0 say?
 
Old 12-11-2023, 10:37 AM   #2
jayjwa
Member
 
Registered: Jul 2003
Location: NY
Distribution: Slackware, Termux
Posts: 779

Rep: Reputation: 246Reputation: 246Reputation: 246
Why can't you add the wifi interface to the bridge?
Code:
ip link set dev wlan0 master br0
 
Old 12-11-2023, 11:25 AM   #3
slackerz
Member
 
Registered: Aug 2020
Posts: 73

Original Poster
Rep: Reputation: 23
Quote:
Originally Posted by jayjwa View Post
Why can't you add the wifi interface to the bridge?
Code:
ip link set dev wlan0 master br0
Can't do that. Besides there results the error:

Code:
Error: Device does not allow enslaving to a bridge.
 
Old 12-11-2023, 11:42 AM   #4
slac-in-the-box
Member
 
Registered: Mar 2010
Location: oregon
Distribution: slackware64-15.0 / slarm64-current
Posts: 780
Blog Entries: 1

Rep: Reputation: 432Reputation: 432Reputation: 432Reputation: 432Reputation: 432
ebtables
 
Old 12-11-2023, 12:07 PM   #5
slac-in-the-box
Member
 
Registered: Mar 2010
Location: oregon
Distribution: slackware64-15.0 / slarm64-current
Posts: 780
Blog Entries: 1

Rep: Reputation: 432Reputation: 432Reputation: 432Reputation: 432Reputation: 432
you can have an ethernet bridge with 2 available ethernet interfaces--plug the router/ap for first wifi network via ethernet cable into one of the interfaces; Use another ethernet cable to connect the second wifi network's router/ap to the other ethernet interface on the brige. Use brctl to add both ethernet interfaces to the bridge. now you've bridged the two wireless networks... you could have add a third ethernet interface to the bridge and use ethernet cable to connect that 3rd interface to a dsl modem or some other source of internet, assuming you wish to share internet with both wifi networks... now you have them bridged, and you can use ebtables on the bridge to filter--or tc for traffic shaping, or tcpdump for packet sniffing, etc.
 
Old 12-11-2023, 12:22 PM   #6
slackerz
Member
 
Registered: Aug 2020
Posts: 73

Original Poster
Rep: Reputation: 23
Quote:
Originally Posted by slac-in-the-box View Post
ebtables
If I am not mistaken this is much like NAT except it works at the MAC address layer. Problem can be solved fairly easily using NAT but looking for something a little more performant. Bridge approach would be almost perfect.
 
  


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
[SOLVED] bridging two wireless interfaces the white rabbit Linux - Networking 6 03-05-2012 11:54 AM
Bridging two network interfaces on the same motherboard. Beelzebud Slackware 9 11-07-2010 01:54 PM
VMWare's bridging vs Window's bridging - routing is messed up when Windows bridging brenan99 General 0 05-04-2008 10:24 PM
VPN bridging (two interfaces) question with OpenVPN browny_amiga Linux - Networking 2 04-01-2008 10:51 AM
[SOLVED] iptables 'bridging/routing' two interfaces for VPN PelliX Linux - Networking 10 10-27-2007 04:57 AM

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

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