以下内容,仅适用于openwrt.org官方原版镜像。
The following is applicable only to the openwrt.org official original mirror.
其他固件仅供参考,未必适用。
Other solids are intended for reference purposes only and do not necessarily apply.
多网口工控机的网口命名主要有以下图片中的两类:
The names of the web portals of the multi-site industrial controllers are mainly two of the following images:
无论是以上哪类,请一定记住,Openwrt系统中,网口的排序,都是从0开始的。比如你买的工控机软路由网口编号是LAN1、LAN2、LAN3、LAN4。到了Openwrt系统中,一定要用eth0、eth1、eth2、eth3。
In any of the above categories, remember that in Openwrt, the sorting of the portal starts at zero. For example, you buy a control machine with LAN1, LAN2, LAN3, LAN4. In Openwrt, you must use eth0, eth1, eth2, eth3.
官方Openwrt安装完毕后,默认情况下只配一个WAN口,一个LAN。通常默认第一个口(eth0)是LAN口,第二口(eth1)是WAN口。
Once the official Openwrt is installed, the default is only one WAN mouth, and one LAN. The default is usually that the first (eth0) is the LAN mouth, and the second (eth1) is the WAN mouth.
而我打算将我的6口软路由器的第一个口(eth0)设置为WAN口,将剩余其他口(eth1、eth2、eth3、eth4、eth5)设置为LAN口。
And I'm going to set the first part of my six soft routers (eth0) to WAN, and the rest to LAN (eth1, eth2, eth3, eth4, eth5).
官方最新稳定版OpenWrt 21.02在说明文档中,对网络设置部分的改进进行了详细说明,如下图。所以不适用非官方的Openwrt固件系统。
The most recent official stabilization version OpenWrt 21.02, in the description document, details the improvements to the network settings section, as shown below. Therefore, the unofficial Openwrt solidware system is not applicable.
SSH连接软路由
SSH Connection Soft Route
输入vi /etc/config/network,进入配置界面,按键盘的【i】键,进入编辑模式。
Enter vi/etc/config/network, enter the configuration interface, press [i] on the keyboard, enter editing mode.
默认情况下,config device页面只有一个接口eth1,即只把eth1作为了LAN口,这样软路由上剩余的接口都失效,属于浪费了。
By default, the config device page has only one interface eth1, i.e., only eth1 is used as the LAN mouth, so that the remaining interfaces on the soft circuits fail and are wasted.
所以,只需要再增加几个网口作为LAN口:
So all we need to do is add a few more web portals as LAN:
编辑完,按键盘的【esc】退出编辑模式,再按【:】后,输入wq,回车,保存退出即可。
After editing, press keyboard [esc] to exit editing mode and press [:], enter wq, return to the vehicle and save the exit.
不为别的,只为记录,省得下次再折腾的时候,没处找教程。
Not for the sake of the record, but for the sake of the next time, there is no place to find a tutorial.
注册有任何问题请添加 微信:MVIP619 拉你进入群
打开微信扫一扫
添加客服
进入交流群
发表评论