OpenWrt Forum Archive

Topic: Change LAN ports to WAN

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

Hey dudes!

I need help, I installed on TP-LINK740N  the Open-WRT firmware.
My router not have free space to install web painel, so i have do changes on ssh terminal.

I have one problem and one question.

1 - Problem

My WAN port is broken, i looked that is possible change for one LAN port.
Follow the informations of my router

uci show network:
link (remove the * ) - pastebin*.*com/XPBSzkx0

uci show system:
link (remove the * ) - pastebin*.*com/ge6Uzu1e

cat /etc/config/network
link (remove the * )  - pastebin*.*com/bttXa3Er

but I could not change the port with command uci ADD.


2 - Question:
I can configure Auth Services on Wi-fi ?
I want configure for when some people want connect on my wifi (without no password), her must do check in on facebook, this option is possible with native resources ?

df -Th
link (remove the * ) pastebin*.*com/sc0Scpa0

(Last edited by gregory.dias on 25 Sep 2016, 23:02)

If the hardware has a programmable switch (supported by openwrt) then you can configure the ports as you wish.

Check for availability:

swconfig list
Found: switch0 - ag71xx-mdio.0

According to https://wiki.openwrt.org/doc/uci/network a typical configuration is as follows.

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

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

config 'switch_vlan' 'eth0_2'
        option 'device' 'eth0'
        option 'vlan' '2'
        option 'ports' '4 5t'

By editing 'ports' you can change which ports are part of the interfaces eth0.1 and eth0.2 respectively.

That said on my TL-WDR4300 port 0 is CPU, port 1 is WAN and port 2 to 6 are LAN ports.

The discussion might have continued from here.