Connection menu under the hood

General discussion about Gargoyle, OpenWrt or anything else even remotely related to the project

Moderator: Moderators

Post Reply
cmay
Posts: 28
Joined: Mon Jan 09, 2012 7:30 pm

Connection menu under the hood

Post by cmay »

Greetings!

This might be the wrong forum to ask, and please tell me so if this is the case. I'm just asking here because this is by far the most friendly and helpful forum with anything Linux-releated, specially *WRT related stuff.

Before asking here i read the OpenWRT recipes, but i guess luci interface changed enough for not being completely replicable.

Sometimes i am faced with a router that is supported by OpenWRT but not Gargoyle. Since i am ignorant enough, i would like to ask here if someone can please tell me how to replicate the "Internet/WAN" options (inside the connection->basic menu) using luci on openWRT.
For example, Gargoyle allows using that simple menu to change the function of the WAN port automatically, specially important on single ethernet port devices.
So, where can i find and learn what really happens "under the hood" when i change those options?

Thanks for your time!

Lantis
Moderator
Posts: 7063
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Connection menu under the hood

Post by Lantis »

https://github.com/ericpaulbishop/gargoyle
That's everything under the hood
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

cmay
Posts: 28
Joined: Mon Jan 09, 2012 7:30 pm

Re: Connection menu under the hood

Post by cmay »

Yeah, maybe it was a poor choice of words.

Lantis
Moderator
Posts: 7063
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Connection menu under the hood

Post by Lantis »

If you want to know exactly what is happening, take a copy of your config files from the router, then do the changes, then compare them after.

Config files are under /etc/config

If you have a specific question that can't be answered by that, please let me know
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

d3fz
Posts: 277
Joined: Sun Aug 28, 2016 7:34 pm

Re: Connection menu under the hood

Post by d3fz »

Is this what you're talking about ?
Image
TP-Link Archer C7 v2 - Gargoyle 1.12.X
TP-Link WR842ND v2 - Gargoyle 1.10.X
TP-Link RE450 AC v2 - Stock FW 1.0.4
TP-Link WA850RE v1.2 - LEDE 17.01.1

cmay
Posts: 28
Joined: Mon Jan 09, 2012 7:30 pm

Re: Connection menu under the hood

Post by cmay »

Yes, it is, but not only that.
The "Connect Via" option is something that i can't replicate on luci.
I have not answered Lantis yet because i need a bit of time to change something back and forth then report the findings in case i don't understand something.

cmay
Posts: 28
Joined: Mon Jan 09, 2012 7:30 pm

Re: Connection menu under the hood

Post by cmay »

Ok. So, i tried replicating some config changes and i ended up locking myself outside. It was predictable and i only tried on a router where i was certain i could recover, so no big deal.
However this also showed me how little i know about the working of OpenWRT in general.
So, maybe i should start with smaller steps. Let me put here some concrete example to see if i can find my way afterwards. Let's say i have a single ethernet port router. OpenWRT starts by assigning that port to LAN and switching off the wireless connection. The first step should be to enable and configure wireless in order to have access to the router once starting messing with the ethernet port.
Afterwards, if i want to assign the ethernet port to WAN, i should login via wireless. And how exactly should i accomplish that? If i use Gargoyle, it's easy: I just have to navigate to the connection>basic menu and adjust the Internet/WAN accordingly. But i don't know how to do that on LuCI. If someone could please help me with that first example, maybe i can figure out most of the rest myself.

Lantis
Moderator
Posts: 7063
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Connection menu under the hood

Post by Lantis »

Ok sure, let's start with wireless access.

Edit your /etc/config/wireless
And make sure that "option disabled" is set to 0 for the wifi-device you want to enable.
Then you'll need to set up a corresponding wifi-iface. The minimal config for this is:

Code: Select all

config 'wifi-iface'
        option 'device'     'wl0'
        option 'network'    'lan'
        option 'mode'       'ap'
        option 'ssid'       'MyWifiAP'
        option 'encryption' 'psk2'
        option 'key'        'secret passphrase'
Note that the device option is the name of the wifi-device (not always wl0)
Save this and type "wifi" at the command line to restart the wifi and see if the network appears.
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

cmay
Posts: 28
Joined: Mon Jan 09, 2012 7:30 pm

Re: Connection menu under the hood

Post by cmay »

Ok, all cool and working.
This is something than can easily be done in LuCI. Which i did, and checked the wireless config and i saw indeed somthing very similar.
Now, that same single ethernet port router serves IP addresses for both WiFi and wired clients.
Now, next step will be converting said ethernet port to WAN, getting IP addresses instead of handing them, like now, as LAN. Please tell me how to do it using LuCI too. Using LuCI web interface is quite easy to set the WiFi to act as WAN, the wired connections are what gets me lost.

Lantis
Moderator
Posts: 7063
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Connection menu under the hood

Post by Lantis »

I've never used LUCI sorry :(

I think you need to use the switch config page.
If you post your /etc/config/network here (watch out for any passwords) I can try to guide what would change there.
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

Post Reply