OpenWrt Forum Archive

Topic: Transparent bridge

The content of this topic has been archived on 8 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I just recovered my Netgear WGT634U and have flashed it with a newly built OpenWRT firmware. My WGT634U device doesn't have a WiFi card and that's just fine with me. I would like to attach the WAN port on this device to one of the LAN ports on my main WRT54GS v3 NAT/Firewall router as a transparent bridge. This way all the devices attached to the LAN ports on my WGT634U device will be under the same subnet as the devices attached to the LAN ports on my WRT54GS v3 main router and be able to talk to each others. Can anyone please help?

Transparent client bridges are neither officially supported nor recommended. Use WDS for that kind of setup.

You can make it work somehow if you create a custom build with ebtables enabled and some arp-nat rules to do layer 2 nat.


~ JoW

hi,
looks like the first answer tht ebt can do  sta bridging. Can you plz tell me which arpnat. The one in ebtables  in snat or the patch arpnat used by other ppl like willi ubnt etc (as arpnat patch only works  with 2.6.23 kernel)

regards
norms

mazilo have not a wifi card, so wds is not the answer. Just create one vlan including all ports, disable wan part in network config and disable dhcp. Assign one ip for the wgt634u on the lan side outside dhcp range of your primary router. You're done.

Regards

crisman wrote:

mazilo have not a wifi card, so wds is not the answer.

Indeed. Didn't pay attention - sorry.

crisman wrote:

mazilo have not a wifi card, so wds is not the answer.

You are right. Even using ebtables approach isn't an option for me because my WGT634U runs on a stripped-down OpenWRT firmware that has no WiFi and NAT/Firewall facilities.

Just create one vlan including all ports, disable wan part in network config and disable dhcp. Assign one ip for the wgt634u on the lan side outside dhcp range of your primary router. You're done.

Many thanks to you. I tried your suggestion and it works as you said. The best part is now my WGT634U boots up with plenty of RAM to run asterisk or freeswitch. free utility shows my WGT634U system uses about 6,180KB of RAM after I SSHed into my WGT634U system as shown below:

BusyBox v1.14.4 (2009-10-21 09:03:56 EDT) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 KAMIKAZE (bleeding edge, r18193) ------------------
  * 10 oz Vodka       Shake well with ice and strain
  * 10 oz Triple sec  mixture into 10 shot glasses.
  * 10 oz lime juice  Salute!
 ---------------------------------------------------
root@WGT634U:~# free
              total         used         free       shared      buffers
  Mem:        29260         6032        23228            0          156
 Swap:            0            0            0
Total:        29260         6032        23228
root@WGT634U:~#

In case if anyone is interested, here is the /etc/config/network file on my WGT634U:

#### VLAN configuration
config switch eth0
        option vlan0    "0 1 2 3 4 5*"


#### Loopback configuration
config interface loopback
        option ifname   "lo"
        option proto    static
        option ipaddr   127.0.0.1
        option netmask  255.0.0.0


#### LAN configuration
config interface lan
        option ifname   "eth0.0"
        option proto    static
        option ipaddr   192.168.1.6     <==== Static IP Address for my WGT634U
        option  gateway 192.168.1.1
        option  dns     192.168.1.1
        option netmask  255.255.255.0

Below is a minimal list of packages installed to turn my WGT634U into a transparent switch with a USB2.0 port to support an external USB2.0 mass storage with and/or without a HUB + USB2.0 printer server:

base-files - 33-r18113 - 
bridge - 1.4-1 - 
busybox - 1.14.4-1 - 
curl - 7.19.6-1 - 
ddns-scripts - 1.0.0-4 - 
dropbear - 0.52-3 - 
e2fsprogs - 1.41.9-1 - 
hotplug2 - 1.0-beta-1 - 
kernel - 2.6.30.8-1 - 
kmod-diag - 2.6.30.8-5 - 
kmod-loop - 2.6.30.8-1 - 
kmod-switch - 2.6.30.8-2 - 
kmod-usb2 - 2.6.30.8-1 - 
libblkid - 1.41.9-1 - 
libc - 0.9.30.1-33 - 
libcurl - 7.19.6-1 - 
libext2fs - 1.41.9-1 - 
libgcc - 4.3.3+cs-33 - 
liblua - 5.1.4-5 - 
libncurses - 5.7-1 - 
libopenssl - 0.9.8k-2 - 
libpthread - 0.9.30.1-33 - 
librt - 0.9.30.1-33 - 
libuci - 0.7.5-1 - 
libuci-lua - 0.7.5-1 - 
libuuid - 1.41.9-1 - 
lua - 5.1.4-5 - 
minicom - 2.3-1 - 
mtd - 10 - 
ntpclient - 2007_365-2 - 
nvram - 5 - 
opkg - 215-2 - 
p910nd - 0.93-1 - 
screen - 4.0.3-1 - 
uci - 0.7.5-1 - 
ucitrigger - 0.7.5-1 - 
udevtrigger - 106-1 - 
zlib - 1.2.3-5 -

lsmod dump is shown as follows:

Module                  Size  Used by    Not tainted
ehci_hcd               31920  0 
loop                   10384  0 
switch_robo             3824  0 
switch_core             5120  1 switch_robo
diag                    7312  0

(Last edited by mazilo on 28 Oct 2009, 03:26)

The discussion might have continued from here.