The address settings you described are most likely incorrect. Since you have 2 interfaces, at least two usage scenarios are possible. Please post which one you are using.
A) The same network
Both interfaces are connected to the same physical network, e.g. to a single switch or across multiple switches, and can "see" each other. In this case, a second interface with a different address is unnecessary and will cause complications. Two interfaces only make sense when you use them in a team for higher speed or for redundancy in case one of them fails.
B) Two separated networks
The two interfaces are connected to separate network segments and packets from one interface cannot reach the other in any way. In this case, your IP addresses are completely wrong. Each interface must have an address from a different network. You cannot use the same network 192.168.1.0/24 for two different interfaces connected to two different network segments on the same machine (device). The system will get confused and not know whether to route packets to the 192.168.1.0/24 network via ens9 or ens4.
Solution
Addresses:
I assume that the network for LiDAR is an isolated segment used only for the connection between the PC and the LiDAR. This means that scenario B) applies.
Then the solution is easy. Use another network and set the addresses as follows:
- ens9: 192.168.1.100/24
- ens4: 192.168.2.100/24
- LiDAR: 192.168.2.5/24 (or use any other number from 1 to 254 except 100 instead of the last octet .5, since the address 100 will be on the ens4 interface).
Gateway:
It is correct that you only have the default gateway on one ens9 interface.
Nameservers:
Be sure to remove the nameserver definition from the ens4.