Neuronas electrónicas

Relay Bridge OPENWRT

Aug
14

Start with

 

opkg update opkg install relayd /etc/init.d/relayd enable /etc/config/network 

config interface 'loopback' 
option ifname 'lo' 
option proto 'static' 
option ipaddr '127.0.0.1' 
option netmask '255.0.0.0'

config globals 'globals'
 option ula_prefix 'fd37:7ec5:def1::/48'

config interface 'lan'
 option type 'bridge'
 option ifname 'eth1'
 option proto 'static'
 option ipaddr '192.168.1.1'
 option netmask '255.255.255.0'
 option ip6assign '60'
 option gateway '10.0.0.1'

config interface 'wan'
 option ifname 'eth0'
 option proto 'dhcp'

config switch
 option name 'switch0'
 option reset '1'
 option enable_vlan '1'

config switch_vlan
 option device 'switch0'
 option vlan '1'
 option ports '0 1 2 3 4'

config interface 'wwan'
 option proto 'static'
 option ipaddr '10.0.0.253' #match you main router network 192.168.x.254
 option netmask '255.255.255.0'
 option gateway '10.0.0.1' #your main router's IP

config interface 'stabridge'
 option proto 'relay'
 option network 'lan wwan'
 option ipaddr '10.0.0.253' #Same IP as in WWAN

/etc/config/wireless

config wifi-device radio0
 option type mac80211
 option channel 11
 option hwmode 11g
 option path 'pci0000:00/0000:00:00.0'
 option htmode HT20
 # REMOVE THIS LINE TO ENABLE WIFI:
 option disabled 0

config wifi-iface
 option ssid chang
 option encryption psk2 # Set wep, psk or psk2 for WEP, WPA or WPA2
 option device radio0
 option mode sta
 option network wwan
 option key lechangue

config wifi-iface
 option device radio0
 option mode ap
 option ssid RepeaterY
 option encryption psk
 option key lechangue
 option network lan
 /etc/config/dhcp
 config dhcp lan
 option interface lan
 option start 100
 option limit 150
 option leasetime 12h
 option ignore 1

config dhcp wan
option interface wan
option ignore 1

Stop firewall
/etc/init.d/firewall stop
/etc/init.d/firewall disable

Leave a Reply

Your email address will not be published. Required fields are marked *