First of all, you need to install relayd package:
opkg install relayd
/etc/init.d/relayd enable
file: /etc/config/dhcp
Fully disable DHCP. Example:
...
config dhcp 'lan'
option interface 'lan'
option dhcpv6 'server'
option ra 'server'
option ignore '1'
option ra_management '1'
config dhcp 'wan'
option interface 'wan'
option ignore '1'
...
file: /etc/config/firewall
Join LAN and WWAN interfances. Example:
...
config defaults
option syn_flood '1'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
config zone
option name 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
option network 'lan wwan' # bridge
config zone
option name 'wan'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
option network 'wan'
config forwarding
option src 'lan'
option dest 'wan'
...
File: /etc/config/wireless
Setup client and AP interfaces. Example:
# Hardware config
config wifi-device 'radio1'
option path 'pci0000:00/0000:00:00.0'
option type 'mac80211'
option htmode 'HT20'
option country 'UA' # Your country here
option disabled '0' # Enabled
option channel 'auto' # Auto recommended (set chanel on main AP, if you need)
option hwmode '11g' # Wifi operation mode
option txpower '17' # Transmit power (it is recommended to leave default value)
option macaddr 'f8:d1:11:43:8f:ef' # Mac (optional)
# Client config
config wifi-iface
option device 'radio1'
option network 'wwan' # Wireless wan
option mode 'sta' # Client mode
option ssid 'WEB' # Main AP SSID
option bssid '04:8d:38:d0:20:0a' # Main AP BSSID
option key 'password' # Wifi secret key
option encryption 'psk2+ccmp' # Main AP encryption type (WPA2-AES, recommended)
# Repeater AP
config wifi-iface
option device 'radio1'
option mode 'ap' # AP mode
option ssid 'DDWRT' # AP name
option encryption 'psk2+ccmp' # Encryption type (WPA2-AES, recommended)
option key 'password' # AP secret key
option network 'lan' # AP network
File: /etc/config/network
Join LAN and WWAN interfaces. Example:
# Local network config
config interface 'lan'
option force_link '1'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.2.1' # Subnetwork
option netmask '255.255.255.0'
option gateway '192.168.1.1' # Main network
option dns '192.168.1.1'
option ip6assign '60'
# Join WAN and LAN ports (remove WAN configuration!)
option _orig_ifname 'eth0 wlan0-1'
option _orig_bridge 'true'
option ifname 'eth0 eth1'
# WWAN (Wireless WAN) config
config interface 'wwan'
option proto 'static'
option ipaddr '192.168.1.2' # Repeater IP
option netmask '255.255.255.0'
option gateway '192.168.1.1' # Main network
option dns '192.168.1.1'
# STA Bridge (relayd) config
config interface 'stabrige'
option proto 'relay'
option network 'lan wwan' # Join LAN and WWAN
option ipaddr '192.168.1.2' # Repeater IP