How to turn first-LAN port into WAN?

Hi All,

could you please prompt me, how could I turn first-LAN port into WAN (I have PPPoE)?
(or probably, have you a config file?)
I have EasyBox 803A (ARV752DPW22) flashed OpenWrt v21.
Here is screenshots of default settings just after upgrading Vodafone firmware to OpenWrt21.

Thank you in advance.



config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd18:8340:ae10::/48'

config atm-bridge 'atm'
        option vpi '1'
        option vci '32'
        option encaps 'llc'
        option payload 'bridged'
        option nameprefix 'dsl'

config dsl 'dsl'
        option annex 'b'
        option firmware '/lib/firmware/adsl.bin'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0.1'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wan'
        option device 'dsl0'
        option proto 'pppoe'
        option username 'username'
        option password 'password'
        option ipv6 '1'

config interface 'wan6'
        option device '@wan'
        option proto 'dhcpv6'

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

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '2 3 4 5 0t'

This should turn one of the lan ports (LAN1 or LAN4 depending on the interface numbering) into wan2.
Use LuCI to set up the wan2 protocol according to your needs.

uci set network.@switch_vlan[0].ports='3 4 5 0t'
uci set network.@switch_vlan[0].vid='1'
uci add network switch_vlan
uci set network.@switch_vlan[-1].device='switch0'
uci set network.@switch_vlan[-1].vlan='2'
uci set network.@switch_vlan[-1].vid='2'
uci set network.@switch_vlan[-1].ports='2 0t'
uci set network.wan2=interface
uci set network.wan2.device='eth0.2'
uci set network.wan2.proto='dhcp'
uci commit network
/etc/init.d/network restart
1 Like

Hi Pavel,

thank you for the answer.
I have launched your commands, but unfornately the situation is still the same.
I will try to provide more information

root@OpenWrt:~# swconfig dev switch0 show
Global attributes:
        enable_vlan: 1
        ar8xxx_mib_poll_interval: 0
        ar8xxx_mib_type: 0
        enable_mirror_rx: 0
        enable_mirror_tx: 0
        mirror_monitor_port: 0
        mirror_source_port: 0
        arl_table: address resolution table

Port 0:
        mib: ???
        pvid: 0
        link: port:0 link:up speed:100baseT full-duplex
Port 1:
        mib: ???
        pvid: 0
        link: port:1 link:down
Port 2:
        mib: ???
        pvid: 2
        link: port:2 link:down
Port 3:
        mib: ???
        pvid: 1
        link: port:3 link:up speed:100baseT full-duplex txflow rxflow auto
Port 4:
        mib: ???
        pvid: 1
        link: port:4 link:down
Port 5:
        mib: ???
        pvid: 1
        link: port:5 link:down
VLAN 1:
        vid: 1
        ports: 0t 3 4 5
VLAN 2:
        vid: 2
        ports: 0t 2

Config file after launching commands, you've mentioned:

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd18:8340:ae10::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0.1'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'

config interface 'wan'
        option proto 'pppoe'
        option device 'eth0.2'
        option username '########'
        option password '########'

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

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '3 4 5 0t'
        option vid '1'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option vid '2'
        option ports '2 0t'

System log:

Mon Sep 19 12:38:21 2022 daemon.info pppd[27721]: Plugin rp-pppoe.so loaded.
Mon Sep 19 12:38:21 2022 daemon.info pppd[27721]: RP-PPPoE plugin version 3.8p compiled against pppd 2.4.8
Mon Sep 19 12:38:21 2022 daemon.notice pppd[27721]: pppd 2.4.8 started by root, uid 0
Mon Sep 19 12:38:34 2022 kern.info kernel: [ 3854.301771] do_page_fault(): sending SIGSEGV to uhttpd for invalid write access to 00000000
Mon Sep 19 12:38:34 2022 kern.info kernel: [ 3854.308595] epc = 77e10bd0 in libc.so[77def000+9c000]
Mon Sep 19 12:38:34 2022 kern.info kernel: [ 3854.313537] ra  = 77b33170 in libwolfssl.so.5.2.0.99a5b54a[77b10000+119000]
Mon Sep 19 12:38:36 2022 daemon.warn pppd[27721]: Timeout waiting for PADO packets
Mon Sep 19 12:38:36 2022 daemon.err pppd[27721]: Unable to complete PPPoE Discovery
Mon Sep 19 12:38:36 2022 daemon.info pppd[27721]: Exit.
Mon Sep 19 12:38:36 2022 daemon.notice netifd: Interface 'wan' is now down
Mon Sep 19 12:38:36 2022 daemon.notice netifd: Interface 'wan' is disabled
Mon Sep 19 12:38:36 2022 daemon.notice netifd: Interface 'wan' is enabled
Mon Sep 19 12:38:36 2022 daemon.notice netifd: Interface 'wan' is setting up now
Mon Sep 19 12:38:37 2022 daemon.err insmod: module is already loaded - slhc
Mon Sep 19 12:38:37 2022 daemon.err insmod: module is already loaded - ppp_generic
Mon Sep 19 12:38:37 2022 daemon.err insmod: module is already loaded - pppox
Mon Sep 19 12:38:37 2022 daemon.err insmod: module is already loaded - pppoe
Mon Sep 19 12:38:37 2022 daemon.info pppd[27830]: Plugin rp-pppoe.so loaded.

So PPPoE still can't find via discovery.

I would appreciate any help
Thank you.

On the switch page, there is still "no link" on LAN1 (which is now switched to eth0.2). Is the other end of the blue cable plugged in?

Thats the thing I've noticed as well.

On the other hand, my WR1043ND (which is the main router in my room) doesn't show Link/green_led/etc while plugged pppoe-cable from ISP (the blue cable). But despite of it WR1043ND connects through pppoe successfuly.

I suspected bad cable, absent of auto detection of MDI/MDIX (and tried to connect via separate Ethernet switch) - but still the same.

Thank you for the replies.

I'm not familiar with the old style vlan definitions. Here is my guestimate about the ppoe wan config:

config interface 'wan'
        option proto 'pppoe'
        option device 'eth1.2'
        option username '########'
        option password '########'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option vid '2'
        option ports '1t 0t'

Are you certain that your ISP's connection is actually ethernet? It may be a DSL connection which requires a modem to convert it to an Ethernet signal.