2

I'm developing openWRT SDK AA version. How do I set bridge interface between ethernet and wireless interface? Can I create extra interface, say A besides those existing WAN and LAN and then bridge interface A and LAN tog

1 Answer 1

1

You cannot bridge WiFi client interfaces. The reason is explained on the OpenWrt Wiki:

enter image description here

The 802.11 standard only uses three MAC addresses for frames transmitted between the Access Point and the Station. Frames transmitted from the Station to the AP don't include the ethernet source MAC of the requesting host and response frames are missing the destination ethernet MAC to address the target host behind the client bridge.

  1. Bridged Host sends a packet to the Target host
  2. Frame is relayed via the W-LAN Client and the MAC address of the transmitting wireless adapter is used as source MAC, the sending ethernet MAC is discarded
  3. W-LAN AP receives the frame and redirects it to the Target
  4. Target receives the frame and generates a response
  5. Target responds to the received frame using the (wrong) source MAC as destination
  6. W-LAN AP relays the frame to the W-LAN Client with the given destination MAC W-LAN Client receives the frame and assumes it is the final destination since it's wireless MAC is used in the frame, the packet is not forwarded Bridged Host never sees a response frame since the W-LAN Client became the destination, no connection is possible

However, in access point mode, bridging is possible. Just use the following in /etc/config/wireless:

config 'wifi-iface'
    option 'network'    'lan'
    ...

In /etc/config/network the lan interface has to be a bridge interface:

config 'interface' 'lan'
    option 'type' 'bridge'
    ...

Of course, you can use any name, not just lan.

If you just want a bridge with multiple interfaces, you can create a VLAN interfaces that aren’t “connected” to anything.

4
  • Thanks Daniel. Actually I'm referring how to bridge the eth and ath interface of Access Point (AP). =)
    – Jess
    Jul 29, 2016 at 9:46
  • That’s described below the quote. Do you need additional information?
    – Daniel B
    Jul 29, 2016 at 9:56
  • is that mean i can create another interface "A" besides LAN and WAN?
    – Jess
    Jul 29, 2016 at 9:58
  • Just create another config section for it in /etc/config/network. You might need to adjust the firewall rules, too.
    – Daniel B
    Jul 29, 2016 at 10:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .