RouterOS 从主路由临时改成普通交换机/AP,以后想恢复做主路由时基本不用重配。
核心思路:不 reset、不清配置,只是“停用路由功能 + 桥接端口”
- WAN,不动
- 关闭防火墙 / NAT / Mangle / 路由 / DHCP
- 只动静态路由
交换机模式(无标记·v7.20·最终版)
:log warning "=== Switch Mode NO-TAG (v7.20) START ==="
# Firewall
/ip/firewall/filter set [find] disabled=yes
/ip/firewall/nat set [find] disabled=yes
/ip/firewall/mangle set [find] disabled=yes
/ip/firewall/raw set [find] disabled=yes
# DHCP
/ip/dhcp-server set [find] disabled=yes
/ip/dhcp-relay set [find] disabled=yes
/ip/dhcp-client set [find] disabled=yes
# Routes (v7.20 reliable)
/ip/route disable [find where disabled=no]
/system note set note="交换机模式(无标记,v7.20):Firewall/NAT/Mangle/Raw/DHCP已禁用;路由已disable(仅可禁用项);配置保留;WAN口闲置不动。"
:log warning "=== Switch Mode NO-TAG (v7.20) DONE ==="
路由模式(无标记·v7.20·最终版)
:log warning "=== Router Mode NO-TAG (v7.20) START ==="
# Firewall
/ip/firewall/filter set [find] disabled=no
/ip/firewall/nat set [find] disabled=no
/ip/firewall/mangle set [find] disabled=no
/ip/firewall/raw set [find] disabled=no
# DHCP
/ip/dhcp-server set [find] disabled=no
/ip/dhcp-relay set [find] disabled=no
/ip/dhcp-client set [find] disabled=no
# Routes (v7.20 reliable)
/ip/route enable [find where disabled=yes]
/system note set note="路由模式(无标记,v7.20):Firewall/NAT/Mangle/Raw/DHCP已启用;路由已enable(仅可启用项);按现有配置生效。"
:log warning "=== Router Mode NO-TAG (v7.20) DONE ==="