如何为 GL-RM1 设置静态 IP (GL-RM1)¶
如果需要为 GL-RM1 设置静态 IP,但其上游路由器无法分配静态 IP 或没有 DHCP,则可以在 GL-RM1 的终端上自定义网络参数,并为其设置静态 IP。
1.在 GLKVM 应用程序中,导航到 工具箱 -> 终端 -> 访问终端。
2.输入命令。
- 配置 IP:
connmanctl config connmanctl services |grep ethernet|awk -F' ' '{print $3}'
--ipv4 manual 192.168.113.131 255.255.255.0 192.168.113.1
(这三个值分别是 IP address、subnet mask 和 gateway。
- 配置 DNS:
connmanctl config connmanctl services |grep ethernet|awk -F' ' '{print $3}'
nameservers 8.8.8.8
(上述值 8.8.8.8 是 DNS 服务器。
如果需要配置多个 DNS 服务器,请用空格分隔,例如
connmanctl config connmanctl services |grep ethernet|awk -F' ' '{print $3}'
nameservers 8.8.8.8 1.1.1.1
- 配置 DHCP:
connmanctl config connmanctl services |grep ethernet|awk -F' ' '{print $3}'
--ipv4 dhcp