My Route use mt7621, Openwrt Environment:
uname -a:
Linux OpenWrt 3.10.14 #275 SMP Fri Apr 1 09:46:34 CST 2022 mips GNU/Linux
cat /etc/openwrt_version:
DISTRIB_ID="OpenWrt"
DISTRIB_RELEASE="Barrier Breaker"
DISTRIB_REVISION="unknown"
DISTRIB_CODENAME="barrier_breaker"
DISTRIB_TARGET="ramips/generic"
DISTRIB_DESCRIPTION="OpenWrt Barrier Breaker 14.07"
DISTRIB_TAINTS="no-all busybox"
i just use vlan to let wan and lan work well, But it failed,
Below is network code:
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 'fdc9:0648:e16c::/48'
config interface 'lan'
option ifname 'eth0.1'
option force_link '1'
option proto 'static'
option type 'bridge'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
option macaddr 'C0:B3:4F:A0:11:33'
config interface 'wan'
option ifname 'eth0.2'
option proto 'dhcp'
option macaddr 'C0:B3:4F:A0:11:33'
config interface 'wan6'
option ifname '@wan'
option proto 'dhcpv6'
config switch 'eth0'
option enable '1'
option enable_vlan '1'
option reset '1'
config switch_vlan
option vlan '1'
option device 'eth0'
option ports '1 2 3 4 5t'
config switch_vlan
option vlan '2'
option device 'eth0'
option ports '0 5t
ifconfig:
root@OpenWrt:/etc# ifconfig
br-lan Link encap:Ethernet HWaddr C0:B3:4F:A0:11:33
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fdc9:648:e16c::1/60 Scope:Global
inet6 addr: fe80::c2b3:4fff:fea0:1133/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:526 (526.0 B)
eth0 Link encap:Ethernet HWaddr C0:B3:4F:A0:11:33
inet6 addr: fe80::c2b3:4fff:fea0:1133/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:17522 errors:0 dropped:5 overruns:0 frame:0
TX packets:1585 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1104816 (1.0 MiB) TX bytes:484491 (473.1 KiB)
Interrupt:3
eth0.1 Link encap:Ethernet HWaddr C0:B3:4F:A0:11:33
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:526 (526.0 B)
eth0.2 Link encap:Ethernet HWaddr C0:B3:4F:A0:11:33
inet6 addr: fe80::c2b3:4fff:fea0:1133/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:1328 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:453216 (442.5 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:13771 errors:0 dropped:0 overruns:0 frame:0
TX packets:13771 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1405101 (1.3 MiB) TX bytes:1405101 (1.3 MiB)
wlan0 Link encap:Ethernet HWaddr 34:75:63:27:45:09
inet addr:192.168.10.206 Bcast:192.168.10.255 Mask:255.255.255.0
inet6 addr: fe80::3675:63ff:fe27:4509/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:334881 errors:0 dropped:0 overruns:0 frame:0
TX packets:2733 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:105107594 (100.2 MiB) TX bytes:342049 (334.0 KiB)
So, why this can`t work? whether must need some commands like swconfig. or something else?