RS485 - What happens when 2 BACnet MSTP devices have the same device ID

I was asked this question today,

What would happen if you had two BACnet MSTP devices with different MAC addresses but the same BACnet Device ID (Node ID) on the same network, and you sent a Broadcast Who-is message?

The answer?

This would be an illegal configuration (no two devices shall have the same Device ID...) but the rules for address binding say that the last one wins. If new information arrives saying "I-AM Device 7", the old information is replaced.


To understand this answer you must know a thing or two about a token ring networks.

Basically a token ring networks works by passing a token around the network, whoever has the token may send a message out, and when they are done with the token they pass it on to the next person in line.


For example

Device A has the MAC address of 0x03

Device B has the MAC address of 0x04

Device C has the MAC address of 0x05

Device A has the token,

Device A responses to any messages it got since the last time it got the token, then sends any custom messages it may have in queue.

Device A sends the token to device B

Device B has the token,

Device B responses to any messages it got since the last time it got the token, then sends any custom messages it may have in queue.

Device B sends the token to device C

Device C has the token,

Device C responses to any messages it got since the last time it got the token, then sends any custom messages it may have in queue.

Device C has the token, but there is no one with a higher MAC address, so then Device C so Device C sends its token to Device A.

Repeat.

If you have two different MSTP devices with the same MAC address, your network will become unstable and unpredictable results will occur. Both devices will think that they have received the token and both devices will attempt to talk at the same time. There will be collisions and you will not be able to determine what device will respond to what poll or what device has the token.


If you have two different MSTP devices with different MAC address and the same Node ID, the device next in line in the token ring will respond first to your requests. This happens because it will be the first device to be passed the token and the first device able to respond. When the token gets passed to the next device ready to respond it will also send a response. Any values set by Device A will probably be overwritten by Device B.


For example

Device A has the MAC address of 0x03 Node ID 7

Device B has the MAC address of 0x04 Node ID 7

Device C has the MAC address of 0x05 Node ID 13

Device C sends a broadcast request for the properties of Node 7

All devices on the network receive the message and Device A and B start to compile a response.

Device C sends the token to the next device in line, this happens to be Device A.

Device A responses to the poll from Device C and passes the token to Device B

Device C processes the response.

Device B responses to the poll from Device C and passes the token to Device C

Device C gets the response from device B and overwrites the results of device A

So in conclusion, having two BACnet MSTP devices with the same MAC address will produce unpredictable results and should be avoided. While having two BACnet MSTP devices with different MAC address and the same node ID will produce a predictable result, it should be avoided because of the rule (no two devices shall have the same Device ID)


If you have any other questions relating to BACnet or MSTP, feel free to contact us.

Contact Us

Contact us via phone (+1 866-383-1657) or leave a detailed message below for sales, support, or any other needs

*Required Field
*Required Field
I'd like to receive the newsletter. *Check email for confirmation.
*Required Field
8:00am - 12:00pm 12:00pm - 5:00pm