tested on my test-r2 and kernel 5.4.2-main without vlan:
root@bpi-r2:~# ip link set wan up
[ 248.140287] mtk_soc_eth 1b100000.ethernet wan: PHY [mdio-bus:00] driver [Generic PHY]
[ 248.148205] mtk_soc_eth 1b100000.ethernet wan: configuring for phy/rgmii link mode
[ 252.322395] mtk_soc_eth 1b100000.ethernet wan:x
[ 252.330774] IPv6: ADDRCONF(NETDEV_CHANGE): wan: link becomes ready
root@bpi-r2:~# ip addr add 192.168.0.11/24 dev wan
root@bpi-r2:~# ping 192.168.0.10
PING 192.168.0.10 (192.168.0.10) 56(84) bytes of data.
64 bytes from 192.168.0.10: icmp_seq=1 ttl=64 time=0.844 ms
64 bytes from 192.168.0.10: icmp_seq=2 ttl=64 time=0.477 ms
^C
--- 192.168.0.10 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 2ms
rtt min/avg/max/mdev = 0.477/0.660/0.844/0.185 ms
root@bpi-r2:~#
on first quick test with vlan i see same result…only arp on ping
main-router (using lan0.500):
[17:47] root@bpi-r2-e:~ (526)# ping 192.168.50.10
PING 192.168.50.10 (192.168.50.10) 56(84) bytes of data.
17:47:41.654384 ARP, Reply 192.168.50.10 is-at 02:01:02:03:04:18 (oui Unknown), length 42
17:47:42.731661 ARP, Reply 192.168.50.10 is-at 02:01:02:03:04:18 (oui Unknown), length 42
17:47:43.771639 ARP, Reply 192.168.50.10 is-at 02:01:02:03:04:18 (oui Unknown), length 42
From 192.168.0.10 icmp_seq=1 Destination Host Unreachable
From 192.168.0.10 icmp_seq=2 Destination Host Unreachable
From 192.168.0.10 icmp_seq=3 Destination Host Unreachable
17:47:44.812358 ARP, Reply 192.168.50.10 is-at 02:01:02:03:04:18 (oui Unknown), length 42
17:47:45.861630 ARP, Reply 192.168.50.10 is-at 02:01:02:03:04:18 (oui Unknown), length 42
17:47:46.891643 ARP, Reply 192.168.50.10 is-at 02:01:02:03:04:18 (oui Unknown), length 42
From 192.168.0.10 icmp_seq=4 Destination Host Unreachable
From 192.168.0.10 icmp_seq=5 Destination Host Unreachable
From 192.168.0.10 icmp_seq=6 Destination Host Unreachable
17:47:47.932064 ARP, Reply 192.168.50.10 is-at 02:01:02:03:04:18 (oui Unknown), length 42
17:47:48.971675 ARP, Reply 192.168.50.10 is-at 02:01:02:03:04:18 (oui Unknown), length 42
17:47:50.011675 ARP, Reply 192.168.50.10 is-at 02:01:02:03:04:18 (oui Unknown), length 42
^C
--- 192.168.50.10 ping statistics ---
9 packets transmitted, 0 received, +6 errors, 100% packet loss, time 8357ms
pipe 4
[17:47] root@bpi-r2-e:~ (527)# ip addr show lan0.500
121: lan0.500@lan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 02:10:12:03:04:08 brd ff:ff:ff:ff:ff:ff
inet 192.168.50.1/24 scope global lan0.500
valid_lft forever preferred_lft forever
inet6 fe80::10:12ff:fe03:408/64 scope link
valid_lft forever preferred_lft forever
[17:48] root@bpi-r2-e:~ (528)#
test-router:
root@bpi-r2:~# ip addr show wan.500
9: wan.500@wan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen0
link/ether 02:01:02:03:04:18 brd ff:ff:ff:ff:ff:ff
inet 192.168.50.10/24 scope global wan.500
valid_lft forever preferred_lft forever
inet6 fe80::1:2ff:fe03:418/64 scope link
valid_lft forever preferred_lft forever
root@bpi-r2:~#
i see some strange on my main router after recognizing that untagged packets no more working after adding vlan:
17:51:21.051644 ARP, Reply 192.168.0.11 is-at 02:01:02:03:04:18 (oui Unknown), length 42
ip address is from untagged interface, but mac is from vlan 500
root@bpi-r2:~# ip addr show wan
3: wan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 16:2a:bf:ed:8c:93 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.11/24 scope global wan
valid_lft forever preferred_lft forever
inet6 fe80::142a:bfff:feed:8c93/64 scope link
valid_lft forever preferred_lft forever
root@bpi-r2:~# ip addr show wan.500
9: wan.500@wan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen
1000
link/ether 02:01:02:03:04:18 brd ff:ff:ff:ff:ff:ff
inet 192.168.50.10/24 scope global wan.500
valid_lft forever preferred_lft forever
inet6 fe80::1:2ff:fe03:418/64 scope link
valid_lft forever preferred_lft forever
root@bpi-r2:~#
thats indeed strange…my switch is configured on both ports in trunk mode 1U500T, so it should not mix up vlans / drop vlan-id
i also needed a reboot to get wan working again