OpenWrt Forum Archive

Topic: Repeater configurations here! Both ways, bridged and simple repeater

The content of this topic has been archived between 5 Oct 2014 and 6 May 2018. Unfortunately there are posts – most likely complete pages – missing.

Suggestion for the original topic:
You could add that it's also possible to install relayd when the slave router is connected to your existing wifi instead of having to connect the WAN port initially.
This has the advantage that you don't need a cable and you automatically get the right configuration for your WLAN device.

We can suggest many things, like you don't need to be connected to Internet to install Relayd, but the point here is @dabyd64 made a tutorial on 2012 that has helped many.

Well I guess @dabyd64 is open for suggestions to keep the guide simple. And connecting to the internet without the need for a cable most certainly is simpler.

And helping people with their IGMP packet problems on the repeater would help many, too.

(Last edited by panni on 3 Sep 2015, 22:28)

Well, openwrt can connect to the internet by just connecting the main router on the WAN port.
Connecting the slave router by wifi requires more configuration steps, and can lead to more mistakes.
I don't see the complexity at connecting one ethernet cable between routers and start working.

And btw, 2012, it's scary how quick the time passes! lol
Cheers

I thought so, too. Until I've connected my new TL-WR841N v9 to my main Wifi as a client to install relayd - without any hassle. Connect, install relayd, set up the configs, profit - and I've already had the basic config ready automatically for the client part of the repeater.

Thank you very much for your tutorial by the way, it works flawlessly. Please consider adding the igmpproxy part to the original topic as as of today many will have some kind of streaming service in their network and it makes it work really well.

(Last edited by panni on 3 Sep 2015, 23:04)

Thanks for the tip. I've added it to the guide.
I've never had anything shared on a bridged network, I had a repeater for few months to just get internet, so I couldn't test the bridge mode thoroughly.
It was a PITA on the first time, so I made the guide for everyone who could be on my same situation.
Regards wink

(Last edited by dabyd64 on 3 Sep 2015, 23:18)

Great, thank you!

Create the file /etc/config/igmpproxy
And paste this inside:

Sidenote: the file already exists after installing igmpproxy and has a default config inside.

This solution explicitly is for sharing services such as Plex Media Server, which relies on IGMP when using their Android/iOS apps.

Whoops! My fault. Fixed big_smile

Hey, a small update to mode 1:
I've had problems with instability after some time (I guess after the DHCP lease-time), error log showed:

no address range available for DHCP request via br-lan

after a client got associated. I found that I had to change /etc/config/dhcp to include wlan0 and some more configuration to make it work stably:

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'

config dhcp 'wlan0'
        option interface 'wlan0'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'

config dhcp 'wwan'
        option interface 'wwan'
        option ignore '1'

(Last edited by panni on 9 Sep 2015, 18:40)

Sure? Maybe a current trunk bug, I've never had such problem, and it's been for months.

I'm on Chaos Calmer rc3, TL-WR841N. And it seems to have fixed it.

Hi i'm trying to solve one issue with the repeater setup  where everything is on the same network. I can plug Ethernet in to pc from openwrt router which is connected to main network using wireless bridge. DHCP is active from main router I can browse the web and everything works, but when connected to the openwrt via Ethernet I can not access the router itself . I can access the openwrt router if I connect to the main router wirelessly and via the use the IP openwrt gets with dhcp from the main router. Not sure why I cant access openwrt using the lan ip I set in openwrt when connected via ehternet. suggestions?

w0095157 wrote:

Hi i'm trying to solve one issue with the repeater setup  where everything is on the same network. I can plug Ethernet in to pc from openwrt router which is connected to main network using wireless bridge. DHCP is active from main router I can browse the web and everything works, but when connected to the openwrt via Ethernet I can not access the router itself . I can access the openwrt router if I connect to the main router wirelessly and via the use the IP openwrt gets with dhcp from the main router. Not sure why I cant access openwrt using the lan ip I set in openwrt when connected via ehternet. suggestions?

Did you disable the firewall as suggested in the OP? That made it work for me.

Thanks for your sharing. But, I have no idea.







mate s schutzhülle

(Last edited by FiQYUU on 3 Oct 2015, 09:31)

This is because of the firewall, blocking access from the wan side.
So, you missed and important step of the guide:

dabyd64 wrote:

As we want to make all the same network, we can disable the firewall:

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

works well! thanks OP! this is a valuable post.

I'm using Mode 2 and works great.

One thing I noticed is that if I turn on the portable openwrt router (Hootoo TM03) outside the range of the "MainWirelessNetwork" network, the "RepeaterWirelessNetwork" never shows up.
If I disabled the "MainWirelessNetwork" in Luci before leaving home then it's fine (to view my samba shares on the go) but that makes it a bit of a pain because if I forget to disable it, I'm out of luck until I'm home again.

(Last edited by keymowsobby on 26 Oct 2015, 16:02)

Yes, it's a known limitation of the "sta+ap"(repeater) mode, the only way to fix this is creating a script that detects when wwan goes down and disables the client interface.

Hello, first of all, thanks for the tutorial!!
I've nearly got everything right except an issue.
After I used method #1, I have internet access on the repeated router, and the IP is also given by the master router. Everything looks great, but I cannot connect the repeated router with SSH or through web with IP 192.168.1.2.
My master router has IP 192.168.1.1. The following are my settings:
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 'auto'

config interface 'lan'
    option ifname 'eth0.1'
    option type 'bridge'
    option proto 'static'
    option ipaddr '192.168.2.1'
    option gateway '192.168.1.1'
    option netmask '255.255.255.0'
    option dns '192.168.1.1'
    option macadam 'XXXXXXXXXX'

config interface 'wan'
    option ifname 'eth0.2'
    option proto 'static'
    option ipaddr '192.168.1.2'
    option netmask '255.255.255.0'
    option gateway '192.168.1.1'
    option macadam 'XXXXXXXXXX'

config interface 'wan6'
    option ifname 'eth0.2'
    option proto 'dhcpv6'

config interface 'stabridge'
    option proto 'relay'
    option network 'lan wan'
    option ipaddr '192.168.1.2'

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

config switch_vlan
    option device 'mt762x'
    option vlan '1'
    option ports '0 1 2 3 5 6t 7t'

config switch_vlan
    option device 'mt762x'
    option vlan '2'
    option ports '4 6t 7t'

DHCP

config dnsmasq
    option domainneeded '1'
    option boguspriv '1'
    option filterwin2k '0'
    option localise_queries '1'
    option rebind_protection '1'
    option rebind_localhost '1'
    option local '/lan/'
    option domain 'lan'
    option expandhosts '1'
    option nonegcache '0'
    option authoritative '1'
    option readethers '1'
    option leasefile '/tmp/dhcp.leases'
    option resolvfile '/tmp/resolv.conf.auto'

config dhcp 'lan'
    option interface 'lan'
    option start '100'
    option limit '150'
    option leasetime '12h'
    option dhcpv6 'server'
    option ra 'server'
    option ra_management '1'
    option ignore '1'

config dhcp 'wan'
    option interface 'wan'
    option ignore '1'

config odhcpd 'odhcpd'
    option maindhcp '0'
    option leasefile '/tmp/hosts/odhcpd'
    option leasetrigger '/usr/sbin/odhcpd-update'

Firewall(I disabled it but I'll include it anyway)

config defaults
    option syn_flood '1'
    option input 'ACCEPT'
    option output 'ACCEPT'
    option forward 'REJECT'

config zone
    option name 'lan'
    list network 'lan'
    option input 'ACCEPT'
    option output 'ACCEPT'
    option forward 'ACCEPT'

config zone
    option name 'wan'
    list network 'wan'
    list network 'wan6'
    option input 'REJECT'
    option output 'ACCEPT'
    option forward 'REJECT'
    option masq '1'
    option mtu_fix '1'

config forwarding
    option src 'lan'
    option dest 'wan'

config rule
    option name 'Allow-DHCP-Renew'
    option src 'wan'
    option proto 'udp'
    option dest_port '68'
    option target 'ACCEPT'
    option family 'ipv4'

config rule
    option name 'Allow-Ping'
    option src 'wan'
    option proto 'icmp'
    option icmp_type 'echo-request'
    option family 'ipv4'
    option target 'ACCEPT'

config rule
    option name 'Allow-DHCPv6'
    option src 'wan'
    option proto 'udp'
    option src_ip 'fe80::/10'
    option src_port '547'
    option dest_ip 'fe80::/10'
    option dest_port '546'
    option family 'ipv6'
    option target 'ACCEPT'

config rule
    option name 'Allow-ICMPv6-Input'
    option src 'wan'
    option proto 'icmp'
    list icmp_type 'echo-request'
    list icmp_type 'echo-reply'
    list icmp_type 'destination-unreachable'
    list icmp_type 'packet-too-big'
    list icmp_type 'time-exceeded'
    list icmp_type 'bad-header'
    list icmp_type 'unknown-header-type'
    list icmp_type 'router-solicitation'
    list icmp_type 'neighbour-solicitation'
    list icmp_type 'router-advertisement'
    list icmp_type 'neighbour-advertisement'
    option limit '1000/sec'
    option family 'ipv6'
    option target 'ACCEPT'

config rule
    option name 'Allow-ICMPv6-Forward'
    option src 'wan'
    option dest '*'
    option proto 'icmp'
    list icmp_type 'echo-request'
    list icmp_type 'echo-reply'
    list icmp_type 'destination-unreachable'
    list icmp_type 'packet-too-big'
    list icmp_type 'time-exceeded'
    list icmp_type 'bad-header'
    list icmp_type 'unknown-header-type'
    option limit '1000/sec'
    option family 'ipv6'
    option target 'ACCEPT'

config include
    option path '/etc/firewall.user'

config include 'miniupnpd'
    option type 'script'
    option path '/usr/share/miniupnpd/firewall.include'
    option family 'any'
    option reload '1'

config include 'shadowsocks'
    option type 'script'
    option path '/usr/share/shadowsocks/firewall.include'
    option reload '1'

Try this.

Firewall:

config zone
    option name 'wan'
    option input 'REJECT'      <------ change to 'ACCEPT'

(Last edited by dabyd64 on 30 Oct 2015, 10:47)

dabyd64 wrote:

Try this.

Firewall:

config zone
    option name 'wan'
    option input 'REJECT'      <------ change to 'ACCEPT'

Tried, and it still won't work.

Ok i done as this thread says but its not working.I am able to see the wireless network.it gets connected but not receving any ip from repeater sad and picks up APIPA.

Following are my details:
Main Router IP: 192.168.2.1

I made configs as follows.The changes which i made are in bold.Please help me

/etc/config/wireless
config wifi-device 'radio0'
        #default (default settings)
    option channel '6'          #Match with the main wireless network channel
    option disabled '0'

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

config wifi-iface
    option device 'radio0'
    option mode 'ap'
    option ssid 'RepeaterWirelessNetwork'
    option encryption 'psk2'
    option key 'ankit@123'
    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.2.1'   # Your main router's IP
    option netmask '255.255.255.0'
    option dns     '8.8.8.8'

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

config 'interface' 'stabridge'
    option 'proto' 'relay'


/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



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



what am i missing

The settings look good for me.
Are you sure that you have installed relayd and improxy?
Did you follow this part of the guide?

dabyd64 wrote:

Update 04/09/2015
Some users had trouble accesing shared services. This should fix them (thanks panni!):

panni wrote:

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

I had a problem with a Hitron router, it worked perfect with any other, but not with the Hitron
The non-bridged version should work for sure.

(Last edited by dabyd64 on 13 Nov 2015, 15:18)

Hi, i have a problem.
MODE 1: Doesn't Work
MODE 2: WORK but IP of my STA+AP is know by customers

Internet --- AP1 --- STA+AP
AP1: NanoStation M2 (Chaos Calmer)
STA+AP: Rocket M2 (Aptitude Adjustment)

Internet: 192.168.1.1 / SSID disabled
AP1: 192.168.1.111 (Coova Chilli installed. When customers connect to AP, IP is 192.168.182.**) / SSID: OpenWrt
STA+AP: 192.168.10.1 / SSID: OpenWrt_2

When i connect a laptop on OpenWrt_2:

MODE 2:
Customers are redirected on authentification page (192.168.182.1) . It's work. But the IP assigned to custumors is: 192.168.10.** (i want customers take IP : 192.168.182.** : Chilli)

MODE 1:
Customers get the IP : 192.168.182.* (gateway: 192.168.182.1 / DNS: OpenDNS) .
Perfectly, but the authentification page don't show (manually and automaticly)


I want:
1) customers get a IP (given by chilli): 192.168.182.** and redirect to authentification page (192.168.182.1)
2) Access to AP+STA with the adress: 192.168.10.1 (

Please help
Thanks

(Last edited by nico42 on 18 Dec 2015, 15:45)

Hi *,
i have implemented mode1 configuration (relayd) ! (And i was happy with that)
All was working fine, until i migrated from W7 to W10.
Until i am using W10 i cannot access my homegroup, if my Laptop connects through the repeater. When i am connected directly via wlan to my main router access to homegroup is fine. Internet on my Laptop is working.
Does anybody have the same Problem ?

Rampler wrote:

Hi *,
i have implemented mode1 configuration (relayd) ! (And i was happy with that)
All was working fine, until i migrated from W7 to W10.
Until i am using W10 i cannot access my homegroup, if my Laptop connects through the repeater. When i am connected directly via wlan to my main router access to homegroup is fine. Internet on my Laptop is working.
Does anybody have the same Problem ?

Have you installed igmpproxy?