Due I'm seeing a lot of confusion to make a repeater with OpenWRT, I will put the 2 modes available, with its configs.
I hope its easy to understand.
Of course, first install the latest Trunk version of OpenWrt:
http://downloads.openwrt.org/snapshots/trunk/
Working in Atheros hardware and Attitude Adjustment. I don't know if it works on other hardware or OpenWrt versions.
MODE 1: BRIDGED REPEATER
Both wireless networks will be the same network, DHCP addresses wil be given by the main router, all computers will see each other.
First connect the router to internet, by connecting an ethernet cable between the openwrt's router WAN port and the main router.
Install Relayd
opkg update
opkg install relayd
/etc/init.d/relayd enable
.
.
/etc/config/wireless
config wifi-device 'radio0'
#blahblah (default settings)
option channel '1' #Match with the main wireless network channel
option disabled '0'
config wifi-iface
option ssid 'MainWirelessNetwork'
option encryption 'psk' # Set wep, psk or psk2 for WEP, WPA or WPA2
option device 'radio0'
option mode 'sta'
option network 'wwan'
option key 'MainRouterWirelessPassword'
config wifi-iface
option device 'radio0'
option mode 'ap'
option ssid 'RepeaterWirelessNetwork'
option encryption 'psk'
option key 'RepeaterWirelessPassword'
option network 'lan'
.
.
/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 interface 'lan'
option ifname 'eth0'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.10.1'
option gateway '192.168.1.1' # Your main router's IP
option netmask '255.255.255.0'
option dns '192.168.1.1'
config interface 'wwan'
option proto 'static'
option ipaddr '192.168.1.254' #match you main router network 192.168.x.254
option netmask '255.255.255.0'
option gateway '192.168.1.1' #your main router's IP
config 'interface' 'stabridge'
option 'proto' 'relay'
option 'network' 'lan wwan'
option ipaddr '192.168.1.254' #Same IP as in WWAN
.
.
/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
As we want to make all the same network, we can disable the firewall:
/etc/init.d/firewall stop
/etc/init.d/firewall disable
Update 04/09/2015
Some users had trouble accesing shared services. This should fix them (thanks panni!):
Install igmpproxy:
opkg install igmpproxy
Then edit the file /etc/config/igmpproxy
Make it look like this:config igmpproxy option quickleave 1 config phyint option network wwan option direction upstream list altnet 192.168.0.0/24 config phyint option network lan option direction downstream list altnet 192.168.0.0/24
MODE 2: REPEATER, DIFFERENT NETWORK
Repeater's clients will be able to see Main Network's devices, but not vice versa.
Addresses in the Repeater network are managed by the repeater.
Nothing has to be downloaded, the stock openwrt is enought. This is the easiest and simplest way of making a repeater
/etc/config/wireless
config wifi-device 'radio0'
#blahblah (default settings)
option disabled '0'
option channel '1' #Match with the main wireless network channel
config wifi-iface
option ssid 'MainWirelessNetwork'
option encryption 'psk' # Set wep, psk or psk2 for WEP, WPA or WPA2
option device 'radio0'
option mode 'sta'
option network 'wwan'
option key 'MainRouterWirelessPassword'
config wifi-iface
option device 'radio0'
option mode 'ap'
option ssid 'RepeaterWirelessNetwork'
option encryption 'psk'
option key 'RepeaterWirelessPassword'
option network 'lan'
.
.
/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 interface 'lan'
option ifname 'eth0'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.10.1' #set to different range of your main router's network""
option netmask '255.255.255.0'
config interface 'wwan'
option proto 'dhcp'
.
.
/etc/config/dhcp
config dhcp lan
option interface lan
option start 100
option limit 150
option leasetime 12h
option ignore 0
config dhcp wan
option interface wan
option ignore 1
.
.
/etc/config/firewall
config defaults
option syn_flood '1'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
config zone
option name 'lan'
option network 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
config zone
option name 'wan'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
option network 'wan wwan'
config forwarding
option src 'lan'
option dest 'wan'
Once internet is running, its easy to install LuCi to get the nice web interface:
opkg update
opkg install luci
AND, IF YOU INSTALLED RELAYD
opkg install luci-proto-relay
I have tested both and they work. I think this are the easiest configs for making a repeater.
Edit the files manually with the VI editor.
If you don't know how to use it, check this:
---------------------------------------------------------------------------
vi editor small tutorial
Let's edit "network" file
vi network
Now, navigate with the arrow keys to the line you want to read, modify, etc.
To start writing first type "i" (command to insert).
Now you can write, delete, etc as usual.
To exit the insert mode press "ESC".
To delete an entire line, press "d" twice.
Finally, to save the file press "Z" twice. Yes it must be UPPERCASE
If you screwed your file and want to discard changes press control+z to close without saving.
Regards
(Last edited by dabyd64 on 3 Sep 2015, 23:28)