前言

我的玩客云刷了armbian和docker版openwrt,已经使用了一年多。最近由于我移动线路不给力(原因复杂,不赘述),就想着把玩客云放在联通线路上。我联通和移动两个不同的路由器,设置了不同的ip段(192.168.0.*192.168.68.*,方便内部组网)。而我刷机的armbian和openwrt,都是需要手动设置固定ip的。所以换ip段后,需要重新设置。

步骤

更改armbian

在原路由器上操作

  • ssh进入玩客云armbian(ip:192.168.0.120)
  • 命令行输入:

    vim /etc/network/interfaces
  • 找到ip:

    address 192.168.0.120
    gateway 192.168.0.1
  • 改为:

    address 192.168.68.120
    gateway 192.168.68.1

  • 保存,退出

更改openwrt

在原路由器上操作

  • ssh进入玩客云armbian(ip:192.168.0.120)
  • 命令行docker ps,查看openwrt容器名称
  • 用docker命令进入容器openwrt

    docker exec -it openwrt bash
  • 进入容器openwrt,输入以下命令行,修改网络

    vim /etc/config/network
  • 找到config interface 'lan'
  • 把原路由器相关的ip段192.168.0.*,全改为192.168.68.*
  • 保存,退出

    重启armbian

  • 输入命令行reboot,重启,即完成