I have three processes on linux machine:
- First is using socket, which is bound to all network interfaces.
- The second is sending ethercat packets by using broadcast (ethercat doesn't use IP layer).
- The third is sending ethercat packets by using broadcast (ethercat doesn't use IP layer).
What I want to achieve:
- Packets sent from first process should reach it's IP destination (this works now)
- Ethercat broadcast sent by second process should reach only port 4 of the switch, not all
- Ethercat broadcast sent by third process should reach only port 5 of the switch, not all
Switch is configurable, VLANs can be used to bind switch ports to VLANs. On linux machine for each VLAN can be logical network device to be created, e.g. eno1.04 and eno1.05. So there will be devices eno1, eno1.04 and eno1.05.
Now the questions:
- When first process will send the data (without changing anything), how many ethernet frames will be sent? Will it send three nearly same frames (except header)? One through eno1 (untagged), one through eno1.04 (tagged) and one through eno1.05 (tagged)? If so, is there some way how to avoid it without changing first program only by changing configuration of linux machine?
- When second program will send broadcast to eno1.04 and third program to eno1.05, will broadcast sent by second process reach only port 4 and broadcast sent by third process reach only port 5?
- When lan id 4 frame will be received on linux machine, will it reach only interface eno1.04? Or also eno1? Is this configurable?
Thanks for the answers in advance.