Freitag, 10. August 2012

openWRT Bridge with Relayd (Pseudobridge)


Recipe for Bridging with Atheros Chipsets


Works for TP-Link TL-WR703n as an example.

based on this two links
http://trac.gateworks.com/wiki/relayd
http://wiki.openwrt.org/doc/recipes/relayclient
https://forum.openwrt.org/viewtopic.php?pid=173467#p173467


Connect your Router with your WAN-Router Device (modem, switch, ... )
root@OpenWrt:~# opkg update
root@OpenWrt:~# opkg install relayd

root@OpenWrt:~# opkg install luci-proto-relay
root@OpenWrt:~# opkg install wpad

root@OpenWrt:~# /etc/init.d/relayd enable

set ip Address of the LAN to something different
root@OpenWrt:/etc/config vi network
config interface lan
        option ifname   eth0
        option type     bridge
        option proto    static
        option ipaddr   10.0.1.1 
        option netmask  255.255.255.0

reboot or restart network.
root@OpenWrt:~# /etc/init.d/network restart

Set your IP Address of your PC to 10.0.1.2
Connect your Router with your PC.
disable any DHCP.

Connect to Luci with your browser to 10.0.1.1


Go to network, wifi make a scan
join your wifi,

make all your settings for the Wifi device, at this part a new interface is created

Go to Network->Interfaces
Edit the new created interface (WWAN) for example

Make a static or dhcp adress here.
disable any DHCP.

Create a new Interface "stabridge" in the Interface section.
use the "relay bridge" protocol

Relay between networks WWAN and LAN.

check
lan/wwan is set to IP address in a different net
interface stabridge is set to relay between lan/eth0 and wwan/wlan0
wlan0/wwan is interface is assigned

change Firewall rules



Zone Forwarding, set to Accept


DONE




3 Kommentare:

  1. Hi,

    I did same setup on my wr1043nd. I have really unknown problem:

    I attached ethernet cable (laptop) into wr1043 and was trying to ping uplink router - first 15packets passed smoothly - response ~10ms and after that I got response around 3000ms and wr1043 looks like stucked - ssh connection was dead. When I disconnected ethernet cable everything worked again... any idea? Thanks

    I have OpenWrt Attitude Adjustment 12.09-rc1

    AntwortenLöschen
    Antworten
    1. Hi,
      i bought myself a WR1043ND, and it seems it is a hardware bug TP-Link related.

      Löschen
  2. hi,

    which ip ranges do you use?

    IP/subnet from Uplink Router?
    IP/subnet from WR1043ND WiFi Interface?
    IP/subnet from WR1043ND LAN Interface?
    IP/subnet from WR1043ND Bridge Interface?
    IP/subnet from laptop with only ethernet connected to uplink router?
    IP/subnet from laptop with only ethernet connected to WR1043ND router?
    IP/subnet from laptop with only wifi connected?

    are you sending the ping from laptop? or from WR1043ND? or with laptop through WR1043ND to the uplink router?

    have you done "install relayd" and "/etc/init.d/relayd enable" properly?

    Can you connect to your WR1043ND from the Wifi-side with your laptop?
    Has the WR1043ND connected properly to the wifi?
    Installed luci or have you done it with CLI only?
    Have you disabled the DHCP things on the WR1043ND interfaces?

    AntwortenLöschen