Configuring VLAN tag on WAN using only SSH

I've got a router based on OpenWRT that won't allow me to configure a VLAN tag on the WAN port because the option doesn't in the GUI. I already have PPPoE configured via the GUI, but I can't remove my ISP router yet because of this stupid VLAN tag.

I've been poking around in the settings on the router via SSH, but I'm not familiar enough with the config files on OpenWRT to figure out how to set this up. I'm redacting the public MACs and public IPs except for the last couple characters.

Here's the output from ifconfig:

agl0 Link encap:Ethernet HWaddr 00:00:00:00:00:EA
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX bytes:14530959960 (13.5 GiB) TX bytes:198193536546 (184.5 GiB)

eth0 Link encap:Ethernet HWaddr 00:00:00:00:00:EC
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX bytes:202848415365 (188.9 GiB) TX bytes:16292967227 (15.1 GiB)

eth0-pppoe Link encap:Point-to-Point Protocol
inet addr:000.000.000.109 P-t-P:000.000.000.15 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX bytes:199064187918 (185.3 GiB) TX bytes:14271041659 (13.2 GiB)

eth1 Link encap:Ethernet HWaddr 02:E8:D8:52:33:01
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

ifb0 Link encap:Ethernet HWaddr 2A:2E:94:12:BC:BA
UP BROADCAST RUNNING NOARP MTU:1500 Metric:1
RX bytes:202682619406 (188.7 GiB) TX bytes:202682619406 (188.7 GiB)

Here's the info from /etc/config/network:

config interface 'lan'
option ifname 'agl0'
option proto 'static'
option netmask '255.255.255.0'
option ip6assign '60'
option conntrack '1'
option macaddr '00:00:00:00:00:EA'
option ipaddr '192.168.1.1'
option mtu '1500'

config interface 'wan'
option ifname 'eth0'
option _orig_ifname 'eth0'
option _orig_bridge 'false'
option proto 'pppoe'
option username 'REDACTED'
option password 'REDACTED'
option no_pmtu '0'
option macaddr '00:00:00:00:00:EC'
option metric '10'
option ipv6 '0'
option hostname 'REDACTED'
option conntrack '1'
option maxfail '3'
option redial_timeout '30'
option mtu_fix '1'
option pppoe_mtu '1492'
option sip_alg '1'
list dns '8.8.8.8'
list dns '1.1.1.1'
option ignore_isp_dns '1'
option debug 'yes'

config globals 'globals'
option ula_prefix 'REDACTED'

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

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

config interface 'vlan0'
option ifname 'agl0'
option macaddr '00:00:00:00:00:EA'

And the relevant information from ls -l /sys/class/net

lrwxrwxrwx 1 root root 0 Dec 31 1969 agl0 -> ../../devices/virtual/net/agl0
lrwxrwxrwx 1 root root 0 Dec 31 1969 eth0 -> ../../devices/virtual/net/eth0
lrwxrwxrwx 1 root root 0 Sep 25 08:39 eth0-pppoe -> ../../devices/virtual/net/eth0-pppoe
lrwxrwxrwx 1 root root 0 Dec 31 1969 eth1 -> ../../devices/virtual/net/eth1

I'm trying to follow the openWRT docs, but they seem to be written for configuring VLANs on the LAN side, not the wan side.

I should also mention the router is using mwan3, but I only use the first WAN port.

Just configure the WAN interface as "option ifname 'eth0.xxx'", where "xxx" is the VLAN ID.

No such luck. I used vi to edit /etc/config/network then did a /etc/init.d/network reload and moved the cable to the WAN1 port. It never came back up. I also tried rebooting just to make sure the config file got loaded.

I have Centurylink, which needs VLAN 201, so I edited it as follows

config interface 'wan'
option ifname 'eth0.201'

I did do another ifconfig and saw that an eth0.201 was created there, but there was no traffic on it.

I've done some further digging into the hardware, and it looks like they're using a Qualcomm 8337. Does this mean I have to configure the switch to make this work?

The switch seems to control the lan ports

Maybe this port is physical eth1 then?

swconfig dev switch0 show

might be helpful to see which ports are active and how the VLANs are configured

1 Like

Is that a typo? Or do you really have more than one WAN port? If you have more than one, then we should know, to configure the VLANs in the switch.

You should see some traffic, as PPTP keeps trying to contact the server at the other end of the line; if you do not see any traffic at all, something strange is happening.

Please, post the new config file; also, it would be interesting to see the logs when you start the WAN interface.

I don't believe so. As you can see in the above network config, the WAN interface and pppoe config is associated with eth0.

It is not a typo. The router has 2 WAN ports and 5 LAN ports.

Global attributes:
        enable_vlan: 1
        enable_mirror_rx: 0
        enable_mirror_tx: 0
        mirror_monitor_port: 0
        mirror_source_port: 0
        disable_all_leds: ???
        arl_table: address resolution table
Port 0: MAC 00:00:00:00:00:ea
Port 1: MAC 00:00:00:00:00:00
Port 1: MAC 00:00:00:00:00:00
Port 1: MAC 00:00:00:00:00:00
Port 1: MAC 00:00:00:00:00:00
Port 1: MAC 00:00:00:00:00:00
Port 1: MAC 00:00:00:00:00:00
Port 1: MAC 00:00:00:00:00:00
Port 2: MAC 00:00:00:00:00:00
Port 3: MAC 00:00:00:00:00:00
Port 3: MAC 00:00:00:00:00:00
Port 3: MAC 00:00:00:00:00:00
Port 4: MAC 00:00:00:00:00:00
Port 4: MAC 00:00:00:00:00:00
Port 4: MAC 00:00:00:00:00:00
Port 4: MAC 00:00:00:00:00:00
Port 4: MAC 00:00:00:00:00:00
Port 4: MAC 00:00:00:00:00:00
Port 4: MAC 00:00:00:00:00:00
Port 4: MAC 00:00:00:00:00:00
Port 4: MAC 00:00:00:00:00:00
Port 4: MAC 00:00:00:00:00:00
Port 4: MAC 00:00:00:00:00:00
Port 4: MAC 00:00:00:00:00:00
Port 4: MAC 00:00:00:00:00:00
Port 4: MAC 00:00:00:00:00:00
Port 4: MAC 00:00:00:00:00:00
Port 4: MAC 00:00:00:00:00:00
Port 4: MAC 00:00:00:00:00:00
Port 4: MAC 00:00:00:00:00:00
Port 4: MAC 00:00:00:00:00:00
Port 4: MAC 00:00:00:00:00:00
Port 4: MAC 00:00:00:00:00:00
Port 5: MAC 00:00:00:00:00:00

Port 0:
        mib: Port 0 MIB counters
RxBroad     : 40441
RxPause     : 0
RxMulti     : 22005
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 78687
Rx128Byte   : 136700
Rx256Byte   : 23267
Rx512Byte   : 40424
Rx1024Byte  : 30816
Rx1518Byte  : 653432
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 1024269763
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 0
TxBroad     : 14091
TxPause     : 0
TxMulti     : 92385
TxUnderRun  : 0
Tx64Byte    : 69971
Tx128Byte   : 527597
Tx256Byte   : 48333
Tx512Byte   : 28470
Tx1024Byte  : 33099
Tx1518Byte  : 67513
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 187467613
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

        enable_eee: ???
        pvid: 0
        link: port:0 link:up speed:1000baseT full-duplex txflow rxflow
        adv: port:0 speed:1000baseT full-duplex rxflow  txflow  link:up
Port 1:
        mib: Port 1 MIB counters
RxBroad     : 2999
RxPause     : 0
RxMulti     : 41244
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 48383
Rx128Byte   : 27652
Rx256Byte   : 19863
Rx512Byte   : 12397
Rx1024Byte  : 5904
Rx1518Byte  : 1512
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 19139354
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 0
TxBroad     : 51324
TxPause     : 0
TxMulti     : 73011
TxUnderRun  : 0
Tx64Byte    : 68741
Tx128Byte   : 22738
Tx256Byte   : 31278
Tx512Byte   : 97424
Tx1024Byte  : 30963
Tx1518Byte  : 3833
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 72459862
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

        enable_eee: 0
        pvid: 0
        link: port:1 link:up speed:1000baseT full-duplex auto
        adv: port:1 auto speed:1000baseT full-duplex link:up
Port 2:
        mib: Port 2 MIB counters
RxBroad     : 25
RxPause     : 0
RxMulti     : 320
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 763
Rx128Byte   : 2805
Rx256Byte   : 2546
Rx512Byte   : 40
Rx1024Byte  : 1
Rx1518Byte  : 0
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 624056
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 0
TxBroad     : 54273
TxPause     : 0
TxMulti     : 113905
TxUnderRun  : 0
Tx64Byte    : 71177
Tx128Byte   : 10036
Tx256Byte   : 35975
Tx512Byte   : 29179
Tx1024Byte  : 24867
Tx1518Byte  : 215
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 37836047
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

        enable_eee: 0
        pvid: 0
        link: port:2 link:up speed:100baseT full-duplex auto
        adv: port:2 auto speed:100baseT full-duplex link:up
Port 3:
        mib: Port 3 MIB counters
RxBroad     : 490
RxPause     : 0
RxMulti     : 2781
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 105638
Rx128Byte   : 128618
Rx256Byte   : 16561
Rx512Byte   : 58900
Rx1024Byte  : 1027
Rx1518Byte  : 190
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 40854617
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 97
TxBroad     : 53813
TxPause     : 0
TxMulti     : 111441
TxUnderRun  : 0
Tx64Byte    : 258146
Tx128Byte   : 34438
Tx256Byte   : 46300
Tx512Byte   : 50785
Tx1024Byte  : 26064
Tx1518Byte  : 1730
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 62637438
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

        enable_eee: 0
        pvid: 0
        link: port:3 link:up speed:1000baseT full-duplex txflow rxflow auto
        adv: port:3 auto speed:1000baseT full-duplex link:up
Port 4:
        mib: Port 4 MIB counters
RxBroad     : 10538
RxPause     : 0
RxMulti     : 48010
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 232925
Rx128Byte   : 517488
Rx256Byte   : 55078
Rx512Byte   : 89138
Rx1024Byte  : 37336
Rx1518Byte  : 68333
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 223168453
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 44
TxBroad     : 43910
TxPause     : 0
TxMulti     : 66323
TxUnderRun  : 0
Tx64Byte    : 210205
Tx128Byte   : 247670
Tx256Byte   : 55623
Tx512Byte   : 82684
Tx1024Byte  : 35149
Tx1518Byte  : 650801
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 1060241001
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

        enable_eee: 0
        pvid: 0
        link: port:4 link:up speed:1000baseT full-duplex auto
        adv: port:4 auto speed:1000baseT full-duplex link:up
Port 5:
        mib: Port 5 MIB counters
RxBroad     : 40
RxPause     : 0
RxMulti     : 30
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 757
Rx128Byte   : 8386
Rx256Byte   : 1
Rx512Byte   : 113
Rx1024Byte  : 464
Rx1518Byte  : 3
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 1232720
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 0
TxBroad     : 54253
TxPause     : 0
TxMulti     : 114185
TxUnderRun  : 0
Tx64Byte    : 71297
Tx128Byte   : 20001
Tx256Byte   : 33514
Tx512Byte   : 29194
Tx1024Byte  : 24862
Tx1518Byte  : 210
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 38465135
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

        enable_eee: 0
        pvid: 0
        link: port:5 link:up speed:100baseT full-duplex auto
        adv: port:5 auto speed:100baseT full-duplex link:up
Port 6:
        mib: Port 6 MIB counters
RxBroad     : 0
RxPause     : 0
RxMulti     : 0
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 0
Rx128Byte   : 0
Rx256Byte   : 0
Rx512Byte   : 0
Rx1024Byte  : 0
Rx1518Byte  : 0
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 0
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 0
TxBroad     : 0
TxPause     : 0
TxMulti     : 0
TxUnderRun  : 0
Tx64Byte    : 0
Tx128Byte   : 0
Tx256Byte   : 0
Tx512Byte   : 0
Tx1024Byte  : 0
Tx1518Byte  : 0
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 0
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

        enable_eee: ???
        pvid: 0
        link: port:6 link:down
        adv: port:6 auto speed:unknown half-duplex link:down
VLAN 0:
        vid: 0
        ports: 0 1 2 3 4 5

All the MACs there that are all 0's are devices on my LAN ports. The MAC ending in EA is the mac of the router itself.

Then where did you move the cable?
When you connect either of the WAN ports there must be some log mentioning which port came up.
Run logread -f and move the cables around to verify which physical port belongs to which port on the router.

When I say I moved the cable, I mean I moved the cable going to my ONT from the WAN port of my Centurylink router to the WAN1 port of my router.

logread doesn't appear to be installed on my router, but I was able to tail /var/log/messages and gather info that way.

Disconnect WAN1:

Oct 3 19:01:52.192 kern.notice kernel: [63616.914536] eth0: Link down: previous state 100 Mbps Full duplex, port 0
Oct 3 19:01:52.192 kern.info kernel: [63616.914547] QCA8337: This is REDACTED device, driver 'Generic PHY'
Oct 3 19:01:52.192 kern.info kernel: [63616.914552] QCA8337: Configuring WAN (eth0) port (#0)
Oct 3 19:01:52.000 daemon.notice netifd: Network device 'eth0' link is down
Oct 3 19:01:52.000 daemon.notice netifd: Interface 'wan' has link connectivity loss
Oct 3 19:01:52.000 daemon.info pppd[6221]: Terminating on signal 15
Oct 3 19:01:52.000 daemon.info pppd[6221]: Connect time 1059.2 minutes.
Oct 3 19:01:52.000 daemon.info pppd[6221]: Sent 2361819627 bytes, received 2500659969 bytes.
Oct 3 19:01:52.000 daemon.notice netifd: Network device 'eth0-pppoe' link is down
Oct 3 19:01:52.000 user.notice route: Entering route fixup for wan - eth0 - 0
Oct 3 19:01:52.000 user.notice route: Should configure route for wan - eth0
Oct 3 19:01:52.000 user.warning route: Route for 'wan' could not be repaired. (ERROR: route add default dev eth0-pppoe metric 10 )

reconnect WAN1

Oct 3 19:05:54.282 kern.notice kernel: [63859.001702] eth0: Link up: 1000 Mbps Full duplex, port 0
Oct 3 19:05:54.282 kern.info kernel: [63859.001712] QCA8337: This is REDACTED device, driver 'Generic PHY'
Oct 3 19:05:54.282 kern.info kernel: [63859.001717] QCA8337: Configuring WAN (eth0) port (#0)
Oct 3 19:05:54.000 daemon.notice netifd: Network device 'eth0' link is up
Oct 3 19:05:54.000 daemon.notice netifd: Interface 'wan' has link connectivity
Oct 3 19:05:54.000 daemon.notice netifd: Interface 'wan' is setting up now
Oct 3 19:05:54.000 user.info PPPoE: +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
Oct 3 19:05:54.000 user.info PPPoE: Retry PPPoE on wan connection in 30 seconds...
Oct 3 19:05:54.000 user.info PPPoE: +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
Oct 3 19:06:24.000 daemon.info pppd[3281]: Plugin rp-pppoe.so loaded.
Oct 3 19:06:24.000 daemon.info pppd[3281]: RP-PPPoE plugin version 3.8p compiled against pppd 2.4.7
Oct 3 19:06:24.000 daemon.notice pppd[3281]: pppd 2.4.7 started by root, uid 0
Oct 3 19:06:24.000 daemon.info pppd[3281]: PPP session is 2923
Oct 3 19:06:24.000 daemon.warning pppd[3281]: Connected to 40:b4:f0:e9:05:7a via interface eth0
Oct 3 19:06:24.000 daemon.info pppd[3281]: Using interface eth0-pppoe
Oct 3 19:06:24.000 daemon.notice pppd[3281]: Connect: eth0-pppoe <--> eth0
Oct 3 19:06:24.000 daemon.info pppd[3281]: CHAP authentication succeeded
Oct 3 19:06:24.000 daemon.notice pppd[3281]: CHAP authentication succeeded
Oct 3 19:06:24.000 daemon.notice pppd[3281]: peer from calling number 40:B4:F0:E9:05:7A authorized
Oct 3 19:06:24.000 daemon.notice netifd: Network device 'eth0-pppoe' link is up
Oct 3 19:06:24.000 daemon.notice pppd[3281]: local IP address REDACTED
Oct 3 19:06:24.000 daemon.notice pppd[3281]: remote IP address REDACTED
Oct 3 19:06:24.000 daemon.notice pppd[3281]: primary DNS address REDACTED
Oct 3 19:06:24.000 daemon.notice pppd[3281]: secondary DNS address REDACTED
Oct 3 19:06:24.000 daemon.notice netifd: Interface 'wan' is now up
Oct 3 19:06:24.000 daemon.notice mrouted[7927]: mrouted version 3.9.8 exiting
Oct 3 19:06:24.000 user.debug uci: (hotplug-call) /bin/sh -> (uci) /sbin/uci : uci_delta_save /sbin/uci.lan.up=1
Oct 3 19:06:24.000 user.debug uci: (hotplug-call) /bin/sh -> (uci) /sbin/uci : uci_delta_save /sbin/uci.lan.device=agl0
Oct 3 19:06:24.000 user.debug uci: (hotplug-call) /bin/sh -> (uci) /sbin/uci : uci_delta_save /sbin/uci.loopback.up=1
Oct 3 19:06:24.000 user.debug uci: (hotplug-call) /bin/sh -> (uci) /sbin/uci : uci_delta_save /sbin/uci.loopback.device=lo
Oct 3 19:06:24.000 user.debug uci: (hotplug-call) /bin/sh -> (uci) /sbin/uci : uci_delta_save /sbin/uci.vlan0.up=1
Oct 3 19:06:24.000 user.debug uci: (hotplug-call) /bin/sh -> (uci) /sbin/uci : uci_delta_save /sbin/uci.vlan0.device=agl0
Oct 3 19:06:24.000 user.debug uci: (hotplug-call) /bin/sh -> (uci) /sbin/uci : uci_delta_save /sbin/uci.wan.device=eth0
Oct 3 19:06:24.000 user.debug uci: (hotplug-call) /bin/sh -> (uci) /sbin/uci : uci_delta_save /sbin/uci.wan.ifname=eth0-pppoe
Oct 3 19:06:24.000 user.debug uci: (hotplug-call) /bin/sh -> (uci) /sbin/uci : uci_delta_save /sbin/uci.vpn0.up=1
Oct 3 19:06:24.000 user.debug uci: (hotplug-call) /bin/sh -> (uci) /sbin/uci : uci_delta_save /sbin/uci.vpn0.device=tun0
Oct 3 19:06:24.000 user.debug uci: (hotplug-call) /bin/sh -> (uci) /sbin/uci : uci_delta_save /sbin/uci.wan.up=1
Oct 3 19:06:24.000 user.debug uci: (hotplug-call) /bin/sh -> (uci) /sbin/uci : uci_delta_save /sbin/uci.lan.up=1
Oct 3 19:06:24.000 user.debug uci: (hotplug-call) /bin/sh -> (uci) /sbin/uci : uci_delta_save /sbin/uci.lan.device=agl0
Oct 3 19:06:24.000 user.debug uci: (hotplug-call) /bin/sh -> (uci) /sbin/uci : uci_delta_save /sbin/uci.loopback.up=1
Oct 3 19:06:24.000 user.debug uci: (hotplug-call) /bin/sh -> (uci) /sbin/uci : uci_delta_save /sbin/uci.loopback.device=lo
Oct 3 19:06:24.000 user.debug uci: (hotplug-call) /bin/sh -> (uci) /sbin/uci : uci_delta_save /sbin/uci.vlan0.up=1
Oct 3 19:06:24.000 user.debug uci: (hotplug-call) /bin/sh -> (uci) /sbin/uci : uci_delta_save /sbin/uci.vlan0.device=agl0
Oct 3 19:06:24.000 user.debug uci: (hotplug-call) /bin/sh -> (uci) /sbin/uci : uci_delta_save /sbin/uci.wan.ifname=eth0-pppoe
Oct 3 19:06:24.000 user.debug uci: (hotplug-call) /bin/sh -> (uci) /sbin/uci : uci_delta_save /sbin/uci.vpn0.up=1
Oct 3 19:06:24.000 user.debug uci: (hotplug-call) /bin/sh -> (uci) /sbin/uci : uci_delta_save /sbin/uci.vpn0.device=tun0
Oct 3 19:06:24.000 user.debug uci: (hotplug-call) /bin/sh -> (uci) /sbin/uci : uci_delta_save /sbin/uci.wan.up=1
Oct 3 19:06:24.000 user.debug uci: (hotplug-call) /bin/sh -> (uci) /sbin/uci : uci_delta_save /sbin/uci.wan.device=eth0
Oct 3 19:06:24.000 user.debug uci: (hotplug-call) /bin/sh -> (uci) /sbin/uci : uci_delta_save /sbin/uci.lan.up=1
Oct 3 19:06:24.000 user.debug uci: (hotplug-call) /bin/sh -> (uci) /sbin/uci : uci_delta_save /sbin/uci.lan.device=agl0
Oct 3 19:06:24.000 user.debug uci: (hotplug-call) /bin/sh -> (uci) /sbin/uci : uci_delta_save /sbin/uci.loopback.up=1
Oct 3 19:06:24.000 user.debug uci: (hotplug-call) /bin/sh -> (uci) /sbin/uci : uci_delta_save /sbin/uci.loopback.device=lo
Oct 3 19:06:24.000 user.debug uci: (hotplug-call) /bin/sh -> (uci) /sbin/uci : uci_delta_save /sbin/uci.vlan0.up=1
Oct 3 19:06:24.000 user.debug uci: (hotplug-call) /bin/sh -> (uci) /sbin/uci : uci_delta_save /sbin/uci.vlan0.device=agl0
Oct 3 19:06:24.000 user.debug uci: (hotplug-call) /bin/sh -> (uci) /sbin/uci : uci_delta_save /sbin/uci.vpn0.up=1
Oct 3 19:06:24.000 user.debug uci: (hotplug-call) /bin/sh -> (uci) /sbin/uci : uci_delta_save /sbin/uci.vpn0.device=tun0
Oct 3 19:06:24.000 user.debug uci: (hotplug-call) /bin/sh -> (uci) /sbin/uci : uci_delta_save /sbin/uci.wan.up=1
Oct 3 19:06:24.000 user.debug uci: (hotplug-call) /bin/sh -> (uci) /sbin/uci : uci_delta_save /sbin/uci.wan.device=eth0
Oct 3 19:06:24.000 user.debug uci: (hotplug-call) /bin/sh -> (uci) /sbin/uci : uci_delta_save /sbin/uci.wan.ifname=eth0-pppoe

connect WAN2

Oct 3 19:03:47.916 kern.info kernel: [63732.633108] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
Oct 3 19:03:47.916 kern.notice kernel: [63732.633681] eth1: Link up: 1000 Mbps Full duplex, port 16
Oct 3 19:03:47.916 kern.info kernel: [63732.633690] QCA8337: This is REDACTED device, driver 'Generic PHY'
Oct 3 19:03:47.916 kern.info kernel: [63732.633695] QCA8337: Configuring WAN (eth1) port (#16)

disconnect WAN2

Oct 3 19:04:19.956 kern.notice kernel: [63764.672774] eth1: Link down: previous state 100 Mbps Full duplex, port 16
Oct 3 19:04:19.956 kern.info kernel: [63764.672784] QCA8337: This is REDACTED device, driver 'Generic PHY'
Oct 3 19:04:19.956 kern.info kernel: [63764.672789] QCA8337: Configuring WAN (eth1) port (#16)

disconnect LAN1

Oct 3 19:09:58.966 kern.info kernel: [64103.732692] Atheros AR8216/AR8236/AR8316/AR8337 (ar8216.c) 8001180000001800:00: Port 1 is down

connect LAN1

Oct 3 19:10:02.966 kern.info kernel: [64107.732581] Atheros AR8216/AR8236/AR8316/AR8337 (ar8216.c) 8001180000001800:00: Port 1 is up

disconnect LAN2

Oct 3 19:11:26.966 kern.info kernel: [64191.732859] Atheros AR8216/AR8236/AR8316/AR8337 (ar8216.c) 8001180000001800:00: Port 2 is down

connect LAN2

Oct 3 19:11:28.966 kern.info kernel: [64193.732779] Atheros AR8216/AR8236/AR8316/AR8337 (ar8216.c) 8001180000001800:00: Port 2 is up

It looks like the version you are running is quite modified OpenWrt and I am not sure you will be able to find any help here.
The way to add vlan tags on an interface is as simple as @eduperez described.

OpenWrt uses "logread" instead of "/var/log/messages", what have you installed exactly?

Those logs show that PPTP is connecting, what is exactly not working?

Taging of eth0 on vlan 201.

I won't disagree with that.

I didn't install the software on this router. It's stuck from the manufacturer. I believe it uses syslog-ng.

It's definitely using openwrt, because it has an /etc/openwrt_version, and it uses opkg, uci, and luci.
I'll admit this was definitely a long-shot asking here, and I totally understand if you guys aren't able to make this work.
Do I need to do this via uci instead of manually editing the config file?

The final result is the same. As long as you restart the network service it should come up and the WAN interface should show some traffic at least trying to contact the PPP server. Maybe you can install tcpdump and see if there is any traffic on the wire: tcpdump -i eth0.201 -vvn

I'm missing something here... You tag eth0 when the PPTP server expects tagged packets, if he can already stablish a PPTP connection, what else is needed here?

The router from his ISP is running successfully the vlan-tagged PPPoE.
He wants to replace it with OpenWrt-like running router.

So why haven't seen the logs from the OpenWrt router...?

There are some logs here, however the successful establishment of pppoe via eth0 interface makes me think that the router of the ISP is some kind of bridge in order to tag for the openwrt-based router.

What is the exact vendor/product/model of your router ?
And what is the output of

cat  /tmp/sysinfo/*