Q:刷入openwrt固件后,发现wan口变成了lan口,而第四个lan口变成了wan口,经过百度和爬贴后没有解决,希望得到大家指导!!!
我的尝试历程:
参照以上链接,并参考 /home/ihid/chaos_calmer/target/linux/ramips/base-files/etc/board.d/02_network中的ramips_setup_interfaces()定义函数如下:
mt7620a_mt7530)
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
ucidef_add_switch "switch1" "1" "1"
ucidef_add_switch_vlan "switch1" "1" "0 1 2 3 6t"
ucidef_add_switch_vlan "switch1" "2" "4 6t"
;;可知:0--3对应LAN口, 4是WAN口, 6是CPU系统 对/home/ihid/chaos_calmer/package/base-files/files/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 auto
​
config interface lan
option ifname eth0.1
option type bridge
option proto static
option ipaddr 192.168.1.1
option netmask 255.255.255.0
option ip6assign 60
​
config interface 'wan'
option ifname 'eth0.2'
option proto 'dhcp'
​
config interface 'wan6'
option ifname '@wan'
option proto 'dhcpv6'
​
config switch
option name 'mt7620x'
option reset '1'
option enable_vlan '1'
​
config switch_vlan
option device 'mt7620x'
option vlan '1'
option ports '0 1 2 3 6t'
​
config switch_vlan
option device 'mt762x'
option vlan '2'
option ports '4 6t'
​但是发现并未生效,陷入僵局
|