0

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.

MBI
  • 101
  • 1
  • "_Ethercat broadcast sent by second process should reach only some port 4 of the switch, not all_" The point of broadcast is that it goes to all interfaces in the broadcast domain (a VLAN is a broadcast domain). You will need to separate the switch interfaces into separate VLANs (each VLAN will need a separate IP network to function normally). Routing will take care of sending the data from the first process to the correct network on the correct interface to reach the destination. – Ron Maupin Nov 23 '20 at 06:39
  • Regarding "each VLAN will need a separate IP network to function normally". But EtherCAT layer is on top of Ethernet layer, so IP layer shouldn't be involved. Is it really necessary to separate IP network, when it isn't used? "Routing will take care of sending the data from the first process to the correct network on the correct interface to reach the destination" - but this routing should be done by usiong ethernet layer (because VLAN is used), or am I wrong? – MBI Nov 23 '20 at 07:18
  • You need to do that so that process 1 works correctly. – Ron Maupin Nov 23 '20 at 15:46
  • I wasn't sure if this is necessary. OK, thank you, I will set different IPs for each network adapter (eno1, eno1.04 and eno1.05). – MBI Nov 24 '20 at 07:14

0 Answers0