Hilscher Community Forum
2 MAC addresses for fieldbus RJ45 ports - Printable Version

+- Hilscher Community Forum (https://forum.hilscher.com)
+-- Forum: netPI 3 - Docker featuring Industrial Raspberry Pi 3 platform (https://forum.hilscher.com/forum-1.html)
+--- Forum: Software (https://forum.hilscher.com/forum-5.html)
+--- Thread: 2 MAC addresses for fieldbus RJ45 ports (/thread-708.html)



2 MAC addresses for fieldbus RJ45 ports - tad - March-10th-2021

Dear Armin,

I installed netpi-netx-ethernet-lan (network=bridge mode) to operate the fieldbus RJ45 ports as standard LAN interface.

There are 2 MAC addresses for Fieldbus are indicated on both of its packing box and the name plate (sticker) on netPI.
But, I can only detect 1 MAC address from an external PC.

The device '/dev/spidev0.0' is added when deploying the container.
But, should 2 device drivers be added for 2 MAC addresses?
That's why only 1 MAC address is detected...

My questions are:
- Does the container 'netpi-netx-ethernet-lan' enable 2 ports of Fieldbus RJ45s to standard LAN interface?
- Is there any measures to confirm 2 MAC addresses from an external PC?

Thank you very much for your support.
Best regards,


RE: 2 MAC addresses for fieldbus RJ45 ports - Armin@netPI - March-10th-2021

Hi Tad,

we have to dig into details of netX chip to answer this question correctly.

In general a netX chip may have 4 MAC addresses stored in its EEPROM. But only a subset of the four is visible on the RJ45 ports and depends on the application in use.

The firmware loaded into the netX chip by netpi-netx-ethernet-lan container is using one MAC address only from the pool of four and makes it visible on the double RJ45 ports while treating the two ports as a switch. This means independent to which of the two ports you connect an Ethernet cable to you will see on both the same MAC address.

But now for what are all the other three MAC addresses for? In other use cases of netX chip (not netPI) more MAC addresses may be required. For example if the netX chip is loaded with another firmware that creates a network interface to its host chip internally. In this case netX chip is operating like a network card in the Host as you would plug a consumer network card in your PC in the office. And for this internal networking mode a second MAC address is used. 

In another use case netX chip may be PROFINET device and TCP/IP device the same time. For each of the protocols a separate MAC address is used. This enables to have two IP addresses active the same time. One for PROFINET to the PLC/controller and one for TCP/IP the same time. Finally the fourth MAC address is reserved and not used.

In general there was never ever a firmware made for netX chip that turns the two RJ45 in two separated network cards each having a separated MAC address without switch function. The only firmware that exists is turing the two RJ45 into a double switched interface with a single MAC address used in the netpi-netx-ethernet-lan container.

Thx


RE: 2 MAC addresses for fieldbus RJ45 ports - tad - March-11th-2021

Dear Armin,

Thank you very much for your kind explanation.
I didn't know how netX works about MAC addresses, so your information was very helpful for me.

Best regards,