之前在esxi安装了openwrt,那么如何设置openwrt为主路由,esxi接到openwrt下面设置为静态ip地址,并且除了wan口走esxi外,其他的流量都走openwrt,提高网络速度。
有四个网口 eth0、eth1、eth2、eth3
规划是eth0 不直通,eth1 eth2 eth3 直通给openwrt,从eth1,eth2,eth3中选择一个openwrt的wan口,剩下两个为lan口,eth0最后也改成lan口。
网线接eth0安装openwrt,设置br-lan的ip地址为192.168.2.1 子网掩码255.255.255.0,把eth1、eth2、eth3勾选上
wan口为eth0,
现在esxi可以直接通过wan口上网,其他设备通过lan口访问,但是这样有一个问题就是所有的外部流量都会经过eth0,导致lan口下网速跑不满1G,大概只有400-500M的样子。
现在改造esxi的网关为192.168.2.1,静态ip为192.168.2.10,子网掩码为255.255.255.0
这样esxi就通过openwrt上网了,随便选择一个eth2改完wan口,eth0改为lan口。注意此时直通之后物理的网口编号和软件的编号不一致,可以通过插拔来尝试。
把eth0的网线接到eth2,eth0接到eth0,这样就设置完成了,测速显示正常,跑到900+M