|
本帖最后由 alex1671 于 2020-5-6 21:32 编辑
设备: k2pA1(mt7621) 刷老毛子padavan,小米mini(mt7620)刷老毛子padavan,N1刷openwrt。
组网: k2p wan口接电信进线, lan1口接小米mini wan口,lan2接 N1网口,三台设备之间的互联端口均配置为trunk口,vlan1承载LAN网络数据,vlan2承载wan数据。
使用场景: k2p/小米mini/N1均可以独立pppoe拨号获取公网IP地址,三台设备的LAN网络实现互通(通过vlan1传输数据)。
配置:
#K2P wank口 access VLAN 2,lan1口trunk1-2 ,lan2口trunk1-2,lan3-lan4 access VLAN 1
switch vlan set 1 1111101 0 0 uuuu--u
switch vlan set 2 0011110 0 0 --ttuu-
switch reg w 0x2004 0x5F0003
switch reg w 0x2104 0x5F0003
switch reg w 0x2204 0x7F0003
switch reg w 0x2304 0x7F0003
switch reg w 0x2404 0x7F0003
switch reg w 0x2504 0x3C0003
switch reg w 0x2604 0x5F0003
####以下两句是关键,否则trunk不通
switch reg w 0x2310 0x81000000
switch reg w 0x2210 0x81000000
switch pvid 4 2
####XIAOMI-MINI wan口--trunk1-2,lan口1-2 access
switch vlan set 0 1 11111111 0 0 uuuuu-tt
switch vlan set 1 2 00001011 0 0 ----t-tt
####以下一句是关键,否则trunk不通
switch reg w 0x2410 0x81000000
switch pvid 4 1
#按如下配置N1 修改 /etc/config/network文件,重启。
config interface 'lan'
option ifname 'eth0'
option proto 'static'
option netmask '255.255.255.0'
option ipaddr '192.168.10.252'
config interface 'wan'
option ifname 'eth0.2'
option username '账号'
option password '密码'
option ipv6 'auto'
option keepalive '0'
option metric '40'
option proto 'none'
option delegate '0'
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
×
|