Today is...
Sunday, September 15, 2019
Welcome to, the global online
community of automation professionals.
Featured Video...
Featured Video
Watch an animation of a conveyor stacking operation demonstrating the use of a move on a gear command.
Our Advertisers
Help keep our servers running...
Patronize our advertisers!
Visit our Post Archive
VLAN Issue in Modbus Communication
Modbus TCP server bound to a VLAN, but accepting connections from other VLAN IP addresses which are not physically connected.

Our Modbus is configured as TCP Server and we configure VLAN1 (eth0.10) for Modbus server communication. We configure VLAN1 (eth0.10) for Modbus communication so that Modbus will not accept messages from other VLAN's. So we used option SO_BINDTODEVICE option in setsockopt(). But it is not solving our purpose.

Modbus server is bound to VLAN1 (eht0.10, IPaddress = We have other VLANs also with eg: VLAN2 (eth0.11 IPaddreses But physically only VLAN1 is connected. When we open Modscan and try to connect with IPAddress its connecting as expected.

Then if we try to connect Modscan with IPaddress, then also Modbus server is accepting connections.

Why does the VLAN accepting connections from IPaddress of other VLAN which is not bound for it or not physically connected?