

I just want to add wlan0 which will be connected to internet to access the webpages. So far, the motors are running absolutely fine via modbus-TCP through Ethernet. I want to access internet via WLAN0 without disturbing ETH0. (The utility enables modbus TCP via Ethernet port of RPi) So, I need to put IP address of ETH0 as 192.168.1.10 in any case. The thing is, I use "Codesys control for raspberry PI" utility to control the motors via Modbus-TCP through Ethernet port. (WLAN0 is connected to router and ETH0 is connected to laptop. Are your wlan0 and eth0 subnets identical?īut both the networks are also different. I can also, as long as the subnets are different. Both the interfaces will have different network. I use "Codesys control for raspberry PI" utility to control the motors via Modbus-TCP through Ethernet port. I need to use both the interfaces simultaneously in any case. Any other IP address not within the same subnet as the interface(s) is routed to the default gateway (which must be within the subnet as the interface).

The logic is that the PC routes to the Pi using the .x/16 address on the local ethernet interface connected to .x/16 subnet, the Pi does the same for the return traffic. I do not have any resources to test at the moment but I do suspect that it should be possible to configure a .x fallback address (without gateway) on the Pi ethernet interface that can then be used on the PC for ssh access. Once done you must find what address has been taken on the ethernet interface and then you will be able to use ssh to access the Pi. The "simple" solution might be to let dhcp do the work, WiFi will get the configuration from dhcp but ethernet, connected to your PC, fails and selects a local .x address, the same should happen on your PC. An ssh connection using the ip address on the WiFi interface will be received, but the answer comes from inside and the routing table is used to decide the outgoing interface which will be the ethernet port. Addressing the system from the outside can be done by using the ip address assigned to the interface. If both interfaces are within the same subnet the routing metric is used to determine which interface will be used, which is normally the ethernet interface. It is very important to understand a little bit about routing how a packet moves from one system to the next system, with every transition the local routing table is used to decide which interface will be used to transmit the message and to which mac address. Multiple interfaces within the same subnet or in different subnets is not easy because of routing, it works under some conditions, it may seem to work under certain conditions, or it does not work at all. The most usable configuration in this case is to use WiFi only, do not configure or connect ethernet.
