LAN port not working after use one of the port as WAN

I using ASUS RT-AC58U, version 19.07.4 r11208-ce6496d796.
Actually this device got WAN port but not display on Switch config.
So I ignore that and use one of LAN port as WAN port. and PPPoE connection is success with below config. However, the others LAN port can't go internet but can get local network IP.
I search many articles but none of it can solve my situation here.
Hopefully someone can point out my blind spot?

Switch config:

Network config:

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 'fda3:0334:6537::/48'

config interface 'lan'
        option type 'bridge'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        list dns '8.8.8.8'
        option ipaddr '192.168.0.1'
        option ifname 'eth0 eth0.1'

config device 'lan_eth0_dev'
        option name 'eth0'
        option macaddr '10:7b:44:5a:a4:50'

config interface 'wan'
        option proto 'dhcp'
        option type 'bridge'
        option ifname 'eth2 usb0'
        list dns '8.8.8.8'
        option peerdns '0'
        option metric '10'

config device 'wan_eth1_dev'
        option name 'eth1'
        option macaddr '10:7b:44:5a:a4:54'

config interface 'wan6'
        option ifname 'eth1'
        option proto 'dhcpv6'

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

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

config interface 'wwan'
        option proto 'dhcp'
        option metric '20'

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

config interface 'UniFi'
        option ifname 'eth0.500'
        option proto 'pppoe'
        option password 'xxxxxxx'
        option ipv6 'auto'
        option username 'xxxxxxx'
        list dns '8.8.8.8'
        option peerdns '0'

config interface 'guest'
        option proto 'static'
        option ipaddr '192.168.2.1'
        option netmask '255.255.255.0'
        option type 'bridge'
        option ifname 'eth0.2'

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

If I had to guess, you haven't assigned the interface "UniFi" to a firewall zone.... you want this to be assigned to the wan firewall zone.

but...

Why are you ignoring the WAN port? is there something wrong with it? It should be totally usable even if it is not showing up in the switch configuration. If it is simply because you need to be able to setup the WAN with a VLAN ID, you can simply change the WAN to eth1.500 or eth2.500 (I see 2 different etc interfaces associated with wan for some reason).

1 Like

that two interface eth2 and usb0 in wan is android and iphone usb tethering respectively.

OK, I think I get your point there, no wonder there is missing 'eth1' i guess is WAN port.

Thank, I will try it later.

ipq4018 chip, so eth0 and eth1 both go through an invisible internal switch as VLANs 1 and 2 before reaching the real switch. This means don't delete the pre-defined VLAN1 and VLAN2 and don't use those numbers for external purposes.

I think this was sorted better in later versions. In any case you should upgrade to the last 19.07 instead of .4. or consider running 21.02.

2 Likes

Thanks for the point out. Now I think I get it. I will try upgrade to 21.02 and reconfig the router as information you all provided.

After upgrade to 21.02. And re-config. I still can't detect WAN port in Switch config tab. And not working after i used eth1.500.

Then I go back to use LAN port as PPPoE. It work as above config. And other LAN port can work as it should. I really no idea, haha.

Let's see the /etc/config/network file again.

root@OpenWrt:~# cat /etc/config/network

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 'fd83:1577:d95f::/48'

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

config device
        option name 'eth0'
        option macaddr '10:7b:44:5a:a4:54'

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

config device
        option name 'eth1'
        option macaddr '10:7b:44:5a:a4:50'
        option mtu '1492'

config interface 'wan'
        option proto 'pppoe'
        option device 'eth1.500'
        option username 'xxx'
        option password 'xxx'
        option ipv6 'auto'
        option mtu '1492'

config interface 'wan6'
        option proto 'dhcpv6'
        option device 'eth1.500'
        option reqaddress 'try'
        option reqprefix 'auto'

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

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option vid '1'
        option description 'BR_LAN'
        option ports '0t 4 3 2 1'

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

config switch_vlan
        option device 'switch0'
        option vlan '3'
        option vid '500'
        option description 'Internet'
        option ports '0t 1t'

config interface 'UniFi'
        option proto 'pppoe'
        option device 'eth0.500'
        option username 'xxx'
        option password 'xxx'
        option ipv6 'auto'

config device
        option type 'bridge'
        option name 'GUEST'
        list ports 'eth0.99'
        option bridge_empty '1'
        option macaddr '10:7B:44:5A:A4:50'
        option mtu '1500'

Here you are.

It might be good to see the default state of this file. It seems that you have modified the VLANs quite a bit here, and @mk24 had warned about not messing with VLANs 1 and 2.

My expectation (which could be wrong) is that the WAN interface should work with the nomenclature eth1.500, but I see that you have also created VLAN500 on eth0, so that could be part of the issue.

The 1st thing after upgrade and reset was config eth1.500. all those vLAN created later after eth1.500 didn't work. And I noticed "VLAN" only 1 created in default config. Never mind, I can try again with reset config later.


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 'fdcf:7eda:d381::/48'

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

config device
        option name 'eth0'
        option macaddr '10:7b:44:5a:a4:54'

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

config device
        option name 'eth1'
        option macaddr '10:7b:44:5a:a4:50'

config interface 'wan'
        option proto 'pppoe'
        option device 'eth1.500'
        option username 'xxx'
        option password 'xxx'
        option ipv6 'auto'

config interface 'wan6'
        option device 'eth1'
        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 vid '1'
        option description 'LAN'
        option ports '0 4 3 2 1'

None, still not work. But I'm happy new version 21.02 can fix my LAN port not work issue. I just need one port as LAN. I don't mind give one port for WAN.

Does your isp associate you’re connection credentials with a MAC address? If so, that may explain the connection failed. You can swap the Mac addresses to test that theory.

Not possible. This router not provided by ISP.

Of course it is...

  • ISPs sometimes specifically tie the account to the MAC address of the device at the customer location. Sometimes this is a 'soft' binding that can be reset by the customer such as the way it is done with most Cable ISPs in the US -- often you won't get a connection on a new device until reboot your modem one or more times and it will re-bind to the new device's MAC address. In the case of Cable ISPs, the IP address they provide is also typically tied to the MAC of your router. Other providers may do a 'hard' binding where you have to coordinate with the ISP to change MAC addresses.
  • OpenWrt allows you to change the MAC address that is presented to the ISP on the WAN port.

No issue here, as long as they allow you to use a router that they didn't provide.