OpenWrt Forum Archive

Topic: [Solved]Confused with OpenWrt Router setup with WISP please help me!

The content of this topic has been archived on 19 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello Guys,

Thanks for visiting my post. Please have a look at the below pic for an overview of my current setup.

https://s32.postimg.org/dvky7d4j9/NTWK_DG.png

This is the router  https://wiki.openwrt.org/toh/arcadyan/ar7516 I'm seeking help for.

Now the issues I have are as follows ...

  • No internet access inside the router to do any software updates or to do diagnosis

  • Can't access OpenWrt router default gateway from any of the devices connected via DHCP

  • My WISP has login portal with time out setting in which I need to login each time when new device is connected. And it automatically logs out after certain period of time when internet is not used. And also in power cut times. Looking for a hack/trick for this login such that openwrt automates the hassle.

After sorting the above main issues then I need to do the following and need help from this community

  • Setup DNS server for privacy and adblocking

  • Setup VPN/tunneling

  • Setup NAS

Hoping to get my issues resolved soon. Please any help is much appreciated and If possible please post a step by step guide or else doing random things will mess up. Thnx.
------------------------------------------------------------------xxx-----------------------------------------------------------------------------

Solution

Few things to know about this model before you follow the steps. This router is not a mainstream supported model where is firmware built upon the sources of other model. Due to this reason the firmware doesn't automatically pickup WAN interface where the 4 ports are generally mapped as VLAN switch with LAN interface. This is where the trouble starts if we're not aware how the switch works internally with this router. Plugging ISP to WAN cable will make the router work as DUMB AP instead of its own.But to setup as main OpenWrt router and to manage traffic we need to make sure to setup a separate WAN interface using VLAN switch. After having all these confusions I finally got help from couple of forum members and was able to solve it.

FYI I've made a small infographics image on how this router ports are physically mapped to the OpenWrt internal vlan switch, check below.

https://s25.postimg.org/jse6gdxrf/BB_Opn_Wrt.png


Please follow the steps below:

NB: Through out the process till the step 17 make sure you connect the LAN to either LAN2/LAN3 of the router ports because in this guide we had to do the changes for LAN1 and LAN4 and it may cause disruptions while accessing the router page. If you have any doubts in below steps then please refer to the above pic in which the overall settings for switch should be as shown.

  • 1. Flash the OpenWrt image as per model wiki instructions

  • 2. Using terminal telent into the router and change the root password

  • 3. Now go to http://192.168.1.1 in browser and login to OpenWrt Luci Web UI using your root password

  • 4. Top navigation bar go to Network>>Switch

  • 5. Under VLANs on "eth0" (BCM63xx) at the very end of the page on left click Add button

  • 6. A new VLAN will be created with specific VLAN ID number(Can use your own numbers if needed)

  • 7. For VLAN ID[1] under port 3 change untagged to off

  • 8. For VLAN ID[2] under port 3 change off to untagged

  • 9. For VLAN ID[2] under CPU change off to tagged

  • 10. Finally click "Save and Apply" button

  • 11. Next from top navigation go to Network>>Interfaces page

  • 12. Under Interface Overview bottom left click on Add new interface button

  • 13. Name the new interface as wan (use only lowercase)

  • 14. Next for Protocol of the new interface chose DHCP

  • 15. Next check for Create a bridge over multiple interfaces

  • 16. Finally chose VLAN Interface: "eth0.2" (wan) and Wireless Network: Master "OpenWrt" (lan, wan) options under Cover the following interface and click Submit button

  • 17. Please double check all the options again and reboot the router.

  • 18. Now plug the WISP cable to WAN/LAN4 of the router and your computer LAN to any of the LAN1/LAN2/LAN3 ports.

  • 19. Thats it we're done now your OpenWrt works as main router with WAN being picked up with DHCP.

  • 20. One last note for who need WiFi as its already mentioned in the model wiki page. To make the WiFi work you need to follow the instructions in wiki page and add the mac address or else it will not be picked by clients even if the radio is enabled.

I think this tutorial will help for most of the routers which are in similar construction. I tested LAN1 and LAN4 which are interchangeable to have WAN interface and pretty much same should do for the other 2 ports. If any one tested please leave a comment so that some one can benefit from google search.

However I still need to thank @RangerZ @Davie for being with me so far. And a very special thanks for @vendant who joined us lately but with a thorough investigation and quick solution. Thanks to the community smile

(Last edited by i0s on 6 Aug 2016, 17:37)

If I understand the config above you have bridged the 2 ports together to the LAN side and have no WAN interface.  You are feeding your ISPs IP address into the LAN, but have configured the LAN to another subnet.

Not sure about the service providers box capabilities, but if it does DHCP you can set your router as a Dumb AP (search the wiki) and use it as a wireless AP and switch for wired clients. 

If you want OpenWrt to be your router, just reset it to default and connect the service providers Ethernet out to the WAN.  Reconfigure your wireless config and you should be done.

RangerZ wrote:

If I understand the config above you have bridged the 2 ports together to the LAN side and have no WAN interface.  You are feeding your ISPs IP address into the LAN, but have configured the LAN to another subnet.

Not sure about the service providers box capabilities, but if it does DHCP you can set your router as a Dumb AP (search the wiki) and use it as a wireless AP and switch for wired clients. 

If you want OpenWrt to be your router, just reset it to default and connect the service providers Ethernet out to the WAN.  Reconfigure your wireless config and you should be done.

Hi RangerZ,

Thanks for your reply. Yes I've added eth3 which is WAN port of my router to the LAN interface.Like I said I'm not exactly sure of what I'm doing with, so messing up LAN settings keeps me off to router gateway and had to re-flash to get it back. So I left it like that as long as I'm getting internet. Thats the reason I've posted here.

Check the link below for my service providers box and there is no way I can access to it unless I hack it which I'm not good at.And yes it only does DHCP and Static IP is provided only on customer request.

http://www.telenetsystems.com/wifi/wifi-outdoor-cpe.htm

Actually having OpenWrt as my router is my first priority because on ISP device I can't pretty much do any kind of hacks. Sorry to ask, if possible could you please explain step by step for setting up Openwrt as router. When I reset to default all I get is only LAN interface with static IP no WAN interface.

RangerZ wrote:

Not sure about the service providers box capabilities, but if it does DHCP you can set your router as a Dumb AP (search the wiki) and use it as a wireless AP and switch for wired clients.

I've just tried Dumb AP as the name suggests it doesn't really make any difference to my current setup and also there is nothing more I had to setup. I've reset the router and plugged LAN to Laptop--> disable DHCP under LAN interface --> plugged ISP to WAN port --> reboot. Thats it internet is on.

I know this would be my final option if nothing works but for now my main priority is to setup openwrt as router.

When you reset a "normal" OpenWrt router you should have a WAN and LAN interface, along with a wireless AP callen OpenWRT with not security and which is disabled.

The device you have chosen is not, per the wiki, a mainstream device, and probably not the best choice to start with.  I believe there is a post already on this box, and you may be better off asking how to add a WAN thier, but it should be pretty straight forward.

This is ballpark process.
Network=> Interfaces=Add new Interface
Call it WAN
Protocol - DHCP Client
Cover the following : eth3
Submit
Go back and edit
Advanced
bring up boot - on
ipv6 - on
use default gateway - on
Firewall - WAN

NOTE: That under System=>Backup Firmware you can make a backup of your settings if you want to test Dumb AP vs Router

(Last edited by RangerZ on 4 Aug 2016, 21:01)

RangerZ wrote:

When you reset a "normal" OpenWrt router you should have a WAN and LAN interface, along with a wireless AP callen OpenWRT with not security and which is disabled.

The device you have chosen is not, per the wiki, a mainstream device, and probably not the best choice to start with.  I believe there is a post already on this box, and you may be better off asking how to add a WAN thier, but it should be pretty straight forward.

Thanks for your time. I completely agree with you and at times I did wonder that due to not being a mainstream model I'm facing issues.  I've been posting on the other post which is active and I'm waiting for the reply. I'll post the so far updates again today and see if i can get help.

Also I did setup the WAN interface as you mentioned and I'm pretty sure I did the same way in my previous tries. But to say in generic way once the WAN is setup and cable is connected then it should automatically pick DHCP and give the internet access but in my case nothing is happening like that. So I'm not sure whether its straight forward or do I have to do additional settings for this model.

If I'm not getting help in fixing this then think I got 2 options either I've to find any spare router and setup AP with both or find a new router under $50 and do full setup. But again I need to do some research to find best reliable routers both new/used conditon under $50 that supports both openwrt & ddwrt. Only time will tell sad Fingers crossed.

Im a bit confused, are you saying when the router has been flashed first or reset you dont have a default wan and lan only setup under interfaces?, I have a few openwrt routers and this one behaves the same as the others, where did you get the image you flashed on it from? that may be the problem.

The flat shiny one (EE) openwrt setup is identical to asus/bt openwrt routers I have when first flashed

As for Wan you would also need to configure the correct settings for that too under the interface or use wireless wan but if the main AP goes down so would your Openwrt router as it only has one wireless card.

Tbh I think you should be able to achieve what you want to with the router you have.

ADSL is only needed when you connect directly to the phone line and that is not supported on this router.

(Last edited by davie on 5 Aug 2016, 18:00)

I just noticed RangerZ has in fact pointed out what is wrong with your setup, you have the third party ap plugged into the wan port on the Arcadyan but not actually setup the WAN interface,  lan and wan are separate interfaces you cant setup the WAN under the LAN  interface.

You need a separate LAN interface for LAN

Separate WAN interface for WAN

then point them to each other under firewall settings

davie wrote:

Im a bit confused, are you saying when the router has been flashed first or reset you dont have a default wan and lan only setup under interfaces?, I have a few openwrt routers and this one behaves the same as the others, where did you get the image you flashed on it from? that may be the problem.

The flat shiny one (EE) openwrt setup is identical to asus/bt openwrt routers I have when first flashed

As for Wan you would also need to configure the correct settings for that too under the interface or use wireless wan but if the main AP goes down so would your Openwrt router as it only has one wireless card.

Tbh I think you should be able to achieve what you want to with the router you have.

ADSL is only needed when you connect directly to the phone line and that is not supported on this router.

Hi Davie smile

Welcome Back!!! Thanks for joining me here.

I know it would be confusing when anyone joins in the middle of the conversation. But still I'm happy to start from scratch again. I've just re-flashed the firmware image from this download link https://downloads.openwrt.org/chaos_cal … fs-cfe.bin. After flashing I've used telnet and changed the root password and then logged into Luci Web Interface. To show you the settings I've taken pictures of some essential setting pages from luci web interface. These are the default settings that appear once I logged in after flashing the firmware. Please check the gallery link below.

http://postimg.org/gallery/27cq512kc/

From the above screenshots you can check and let me know what needs to be added/changed.

Thank you

davie wrote:

I just noticed RangerZ has in fact pointed out what is wrong with your setup, you have the third party ap plugged into the wan port on the Arcadyan but not actually setup the WAN interface,  lan and wan are separate interfaces you cant setup the WAN under the LAN  interface.

You need a separate LAN interface for LAN

Separate WAN interface for WAN

then point them to each other under firewall settings

I agree with you both and thats exactly I did but not sure whether I'm missing some other setting. The steps I followed to create a WAN interface are as follows...

Interfaces>>Add new interface>>name "WAN">>protocol-DHCP>>physical settings>>bridge>>Covering (eth0 and wan)>>save and apply.

And next edited the WAN interface and changed the firewall to LAN. Also changed the eth0 to eth3 using command line to see if I'm doing wrong because the wan is labelled on port4/eth3 where in web ui i can't see any other numbered ports.

Finally plugged the ISP to WAN and LAN to LAPTOP. Unfortunately it didn't work I've tested using ping and traceroute options under diagnostics.

I'm still thinking there is something to do with firewall and/or vlan switch. Is it good to disable switch?.

If you think I'm doing wrong then please correct me with step by step process using bullet list so that it will be clear for everyone to understand.

Thanks again.

(Last edited by i0s on 5 Aug 2016, 20:26)

I do not know this device. 
Does this device have a switch or are all the ports independent.  Do you see all the eth0-4 in the physical interface tab?
I think you will need to go edit the LAN first and take ETH3 off the bridge, but you may want to add the other ports to the LAN side so you can use them.  I do not think you should have a bridge on the WAN

Your WAN interface should get the WAN firewall. 
Your LAN interface the LAN firewall

Post your network config file.

RangerZ wrote:

I do not know this device. 
Does this device have a switch or are all the ports independent.  Do you see all the eth0-4 in the physical interface tab?
I think you will need to go edit the LAN first and take ETH3 off the bridge, but you may want to add the other ports to the LAN side so you can use them.  I do not think you should have a bridge on the WAN

Your WAN interface should get the WAN firewall. 
Your LAN interface the LAN firewall

Post your network config file.

TBH I'm not even sure how exactly the openwrt is picking up the device ports. That is main confusion too and unless someone who has used it with openwrt confirms. FYI I've already posted the gallery link to my settings in my reply to davie.Please check my previous replies for the link.There you can see a pic with the physical settings under LAN.

This is how my network config file looks for now after I setup WAN interface manually using Web UI.

root@OpenWrt:~# cat /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 'fd19:93c6:a6f2::/48'

config interface 'lan'
    option ifname 'eth0.1'
    option force_link '1'
    option type 'bridge'
    option proto 'static'
    option ipaddr '192.168.1.1'
    option netmask '255.255.255.0'
    option ip6assign '60'

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

config switch_vlan
    option device 'eth0'
    option vlan '1'
    option ports '0 1 2 3 8t'

config interface 'WAN'
    option type 'bridge'
    option proto 'dhcp'
    option ifname 'eth0'

(Last edited by i0s on 5 Aug 2016, 21:50)

@RangerZ

FYI on the other forum I've got some one who's investigating the issue. I've posted few command line outputs over there and if you're interested you can check the link below..

https://broadbandforum.co/threads/openw … st-1083232

Thank you

As ADSL is not supported on this router there is no default WAN interface in OpenWrt. You'll need to change the switch configuration to use one Ethernet port for the WAN interface.

Use the webui to make the following changes:
In network -> switch:
1.1 add a new VLAN 2
1.2 under port 0, turn VLAN 1 off
1.3 under port 0, set VLAN 2 as untagged
Then go to network -> interfaces:
2.1 add a new interface with lowercase 'wan'
2.2 assign it the VLAN interface eth0.2
2.3 configure it to use DHCP (and do not bridge it with anything else)

Try plugging your WISP LAN cable into both port 1 and port 4 on your router and see which one works.

vedant wrote:

As ADSL is not supported on this router there is no default WAN interface in OpenWrt. You'll need to change the switch configuration to use one Ethernet port for the WAN interface.

Use the webui to make the following changes:
In network -> switch:
1.1 add a new VLAN 2
1.2 under port 0, turn VLAN 1 off
1.3 under port 0, set VLAN 2 as untagged
Then go to network -> interfaces:
2.1 add a new interface with lowercase 'wan'
2.2 assign it the VLAN interface eth0.2
2.3 configure it to use DHCP (and do not bridge it with anything else)

Try plugging your WISP LAN cable into both port 1 and port 4 on your router and see which one works.

Hi vedant,

Thanks for joining me here.  The changes you mentioned didn't work. Won't believe till today think I almost done re-flashing nearly 35 times or even more. Specifically every time I mess up with settings under LAN interface or any other stuff linked with LAN I eventually loose the host connection and end up re flashing.

Anyway coming to your settings first thing I noticed is under port 0 when we turn off VLAN1 then immediately host goes down and can only access it from other 3 ports. So once I applied your changes I had to plug in WAN to port0 and LAN to port1/port2/port3 to access the host(192.168.1.1). When I pinged using diagnostics tool it says "bad: wrong address".

One more important thing I noticed is, HWaddr for Ethernet on both LAN and WAN interfaces are nulled and think those might be the prime suspects for WAN to recognise physically.

Please let me know your thoughts on this.

PS: With your settings I've just taken the logs like earlier I did and will paste the links in next post.

vedant wrote:

Try plugging your WISP LAN cable into both port 1 and port 4 on your router and see which one works.

These are the logs please find the links. One note forgot to say I've tested the changes under Barrier Breaker 14.07 instead 15.05 just to check whether its bug within the firmware but I don't think it is.

switch0-help
http://pasted.co/8f67e7d2

switch0 show
http://pasted.co/01fbaafd

network config
http://pasted.co/5ff481f0

dmesg
http://pasted.co/2cf928d5

logread
http://pasted.co/d6356500

ifconfig -a
http://pasted.co/81cc0e0c

(Last edited by i0s on 6 Aug 2016, 09:55)

Sorry, forgot one step: after you set port 0 as untagged for VLAN 2, you also need to set CPU port as tagged for VLAN 2. After that port 0 will become your WAN port and it'll only work if you plug in your WISP LAN cable. You can use the other three ports for LAN.

(Last edited by vedant on 6 Aug 2016, 10:08)

vedant wrote:

Sorry, forgot one step: after you set port 0 as untagged for VLAN 2, you also need to set CPU port as tagged for VLAN 2. After that port 0 will become your WAN port and it'll only work if you plug in your WISP LAN cable. You can use the other three ports for LAN.

If I'm not wrong think at first you gave me the network config file with this change included. And I did report back saying my router was not accessible after i did the changes via command line. But after that I re-flashed and checked the config file tried the changes via web UI,think it didn't work.

Anyway I'm gonna try again now and report back, also let me know if you need any other logs after I do the changes.

Thank you guys for all the help.

Think I'm done with the first milestone.

Now time for 2nd one I'm not sure whether I need to open a new topic or can continue here. But the second one is like this, like said I'm using WISP device and ISP have given a IP address in which I need to type in browser and login every time to get access to internet. This will be frustrating at times when we need to do for every device and when ever there is power cut also strange part is even If I'm connected and don't use internet for a while it automatically disconnects and had to login again. Especially when we need to run internet for long hours and if it disconnects without knowingly then we might get wasted.

However the ISP has an option to enable automatic login on web portal but its not really helping think due to DHCP. If I register for automatic login from one device via DHCP IP and at times when DHCP IP gets updated to new one then again I need to register for automatic login. If I'm not wrong thats how its working I guess.

I've done some google search and looked at some cron job scripts but not exactly sure if they work.I'm not good at scripting need to take someones help. Please let me know your inputs based on that I can close this thread and open new.

Regards smile

(Last edited by i0s on 6 Aug 2016, 17:56)

Based on the current topic description and the issue, I think you are better starting a new topic to get more visibility.

I have faced a similar problem in the past trying to use hotel hotspots, and not aware of a clear solution.  For me the portal page does not always open as it should.  I have resorted to saving the hotel portal page as a desktop shortcut and using this to connect to the portal.  I also have noticed that the clients lease gets terminated prior to the 24 hrs the portal page indicates.

I realize this is not what you are asking, but I am just sharing some related tidbits that may at some point be relevant.

The discussion might have continued from here.