I went ahead and tried that config, but unfortunately, the VLANs still did not work for me. So I took a step back, reset to factory settings, and tried the following:
- Started with a clean config, connected 4C (on the wan port) to router (pfsense) and it just worked, here is what that config looks like:
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 'redacted'
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 device
option name 'eth0.2'
option macaddr 'redacted'
config interface 'wan'
option device 'eth0.2'
option proto 'dhcp'
config interface 'wan6'
option device 'eth0.2'
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 4 6t'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '1 6t'
By it works I mean that the above config allowed me to connect to my 4C and access the internet. Although it's not shown here, you can see the dynamic ip address in this screenshot:
- So I went ahead and configured the VLAN, this produced the following config:
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 'redacted'
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 device
option name 'eth0.2'
option macaddr 'redacted'
config interface 'wan'
option device 'eth0.2'
option proto 'dhcp'
config interface 'wan6'
option device 'eth0.2'
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 4 6t'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '1 6t'
config switch_vlan
option device 'switch0'
option ports '1t 6t'
option vlan '30'
And this caused the wan to lose connectivity, the ip is gone:
From the videos I watched I noticed that wan should not have lost its IP after I configured the VLAN.
Looking at the logs with the logread
command I saw:
Sat Sep 30 09:42:22 2023 daemon.notice netifd: wan (11361): udhcpc: received SIGTERM
Sat Sep 30 09:42:22 2023 daemon.notice netifd: wan (11361): udhcpc: entering released state
Sat Sep 30 09:42:23 2023 daemon.notice netifd: wan (11361): Command failed: ubus call network.interface notify_proto { "action": 0, "link-up": false, "keep": false, "interface": "wan" } (Permission denied)
Sat Sep 30 09:42:23 2023 daemon.notice netifd: Interface 'wan' is now down
Sat Sep 30 09:42:23 2023 daemon.notice netifd: Interface 'wan' is setting up now
Sat Sep 30 09:42:23 2023 daemon.notice netifd: wan (11517): udhcpc: started, v1.36.1
Sat Sep 30 09:42:23 2023 daemon.notice netifd: wan (11517): udhcpc: broadcasting discover
Sat Sep 30 09:42:24 2023 daemon.warn odhcpd[1506]: No default route present, overriding ra_lifetime!
Sat Sep 30 09:42:26 2023 daemon.notice netifd: wan (11517): udhcpc: broadcasting discover
Sat Sep 30 09:42:29 2023 daemon.notice netifd: wan (11517): udhcpc: broadcasting discover
Sat Sep 30 09:42:40 2023 daemon.warn odhcpd[1506]: No default route present, overriding ra_lifetime!
Sat Sep 30 09:42:56 2023 daemon.warn odhcpd[1506]: No default route present, overriding ra_lifetime!
I did some digging here regarding the warning No default route present, overriding ra_lifetime!
but as you can see below, I also do not have RA enabled:
Any thoughts?