port5
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| port5 [2017/12/23 03:58] – external edit 127.0.0.1 | port5 [2025/10/14 06:22] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====简介==== | ====简介==== | ||
| + | <WRAP center round tip 60%> | ||
| + | 最新代码已经将5口模式合并,通过ethmode设置,无需以下步骤 | ||
| + | </ | ||
| + | |||
| + | ====提前了解:5口模式的部分资源冲突==== | ||
| + | [[iot_router]] | ||
| + | |||
| + | ====新方法==== | ||
| + | |||
| + | 查看网络模式命令ethmode, | ||
| + | ^ ethmode命令 ^ 网口状态 ^ | ||
| + | | ethmode l | 单网口0,LAN | | ||
| + | | ethmode w | 单网口0,WAN | | ||
| + | | ethmode wllll | 五网口,Port0为WAN,其余为LAN | | ||
| + | | ethmode lllll | 五网口,均为LAN | | ||
| + | |||
| + | |||
| + | ====旧方法==== | ||
| + | |||
| 有时,单个网口总会带来不便,比如既想用来pppoe上网,又想多出几个来连接家里的设备。此时,就需要MT7688AN的5网口模式了。 \\ | 有时,单个网口总会带来不便,比如既想用来pppoe上网,又想多出几个来连接家里的设备。此时,就需要MT7688AN的5网口模式了。 \\ | ||
| 源码中,总体来说要改这几个位置: | 源码中,总体来说要改这几个位置: | ||
| Line 23: | Line 42: | ||
| 添加后别忘了添加执行权限:chmod +x setwllll 这个文件会随着系统启动,将PORT1-PORT4及对应的LED灯设置为网口模式。 | 添加后别忘了添加执行权限:chmod +x setwllll 这个文件会随着系统启动,将PORT1-PORT4及对应的LED灯设置为网口模式。 | ||
| + | ===VLAN的源码改法=== | ||
| 修改源码:/ | 修改源码:/ | ||
| 将widora及widora32m从50, | 将widora及widora32m从50, | ||
| - | 修改后,系统会将PORT0识别为WAN,其余四个为LAN,因处于同一个switch中,所以在network中划分了vlan。 至此,修改完毕。 | + | ===VLAN的系统内改法=== |
| + | 修改系统文件:/ | ||
| + | <code bash> | ||
| + | config interface ' | ||
| + | option ifname ' | ||
| + | option proto ' | ||
| + | option ipaddr ' | ||
| + | option netmask ' | ||
| + | |||
| + | config globals ' | ||
| + | option ula_prefix ' | ||
| + | |||
| + | config interface ' | ||
| + | option ifname ' | ||
| + | option force_link ' | ||
| + | option macaddr ' | ||
| + | option type ' | ||
| + | option proto ' | ||
| + | option ipaddr ' | ||
| + | option netmask ' | ||
| + | option ip6assign ' | ||
| + | |||
| + | config interface ' | ||
| + | option ifname ' | ||
| + | option force_link ' | ||
| + | option macaddr ' | ||
| + | option proto ' | ||
| + | |||
| + | config interface ' | ||
| + | option ifname ' | ||
| + | option proto ' | ||
| + | |||
| + | config switch | ||
| + | option name ' | ||
| + | option reset ' | ||
| + | option enable_vlan ' | ||
| + | |||
| + | config switch_vlan | ||
| + | option device ' | ||
| + | option vlan ' | ||
| + | option ports '1 2 3 4 6t' | ||
| + | |||
| + | config switch_vlan | ||
| + | option device ' | ||
| + | option vlan ' | ||
| + | option ports '0 6t' | ||
| + | </ | ||
| + | |||
| + | 修改完后重启网络: / | ||
| + | |||
| + | 修改后,系统会将PORT0识别为WAN,其余四个为LAN,因处于同一个switch中,所以在network中划分了vlan。 至此,修改完毕。 | ||
port5.1514001493.txt.gz · Last modified: (external edit)
