My brain really can't solve this problem, please help.
The network layout is as shown in the figure: after the network cable enters the home, the optical modulation coordinator is set to bridge, and the tp-link router dials up (its LAN address is 192.168.1.1), and the NAS is clean on it.
Because the tp-link router does not have many functions, I envisage installing an openwrt in the kvm plug-in of the NAS, setting it as a bypass route, and realizing some other functions, but the problem appeared in the process.
My NAS is installed with omv6 system, and there are three network cards (actually only eth0 is used, and the other two network cards are not used, so don't need to consider it for the time being), I follow the official instructions, in the network management of the omv system, use the eth0 network card to build a bridge br0 , the static ip is set to 192.168.1.11, and other devices on the LAN can access and use the omv function through 192.168.1.11.
Then, I installed openwrt through the kvm plug-in, used the bridge br0 to establish macvtap, and used it as the lan interface of openwrt. The openwrt static ip was set to 192.168.1.2. At this time, LAN devices can access the openwrt management page through 192.168.1.2.
I made these changes in openwrt, the ip is set to 192.168.1.2, the subnet mask is set to 255.255.255.0, the gateway is set to 192.168.1.1 (ie tp-link), and the dhcp function and the bridging function of the lan interface are turned off. Openwrt itself can access the Internet, and everything looks fine. But here comes the problem. . .
1. If other devices on the LAN set the gateway to 192.168.1.2 (openwrt), these intranet devices will not be able to access the Internet normally, and will also cause openwrt to be unable to access the Internet. If openwrt is not used as the gateway, then openwrt will return to normal in an instant.
2. In this case, if you use "clash, passwall" tools (VPN) in openwrt, the LAN device can use openwrt as a gateway to access the Internet (VPN is also valid), and openwrt itself can also access the Internet normally.
3. In the above process, omv (that is, the device of 192.168.1.11) cannot be found in openwrt under any circumstances.
I can't figure out what the problem is right now, hopefully a very low level bug.