BAS-310 · Lesson 5 of 12 · 21 min

BACnet/IP, routers and BBMDs

▶ Video coming soon A video version of this lesson is on the way.

Tuesday, October 20, had been a Harcastle day, with Callie measuring carbon dioxide in lecture hall T-120. That evening Prakash drew Harcastle College's controls network on the whiteboard. Until 2024 every controller on the campus had shared one flat network. Then the college's IT department moved the building systems onto their own segments, one per building, separated from the student and staff networks. It was the right decision for security, and on the Monday after the change the front end in the central plant could see nothing in Tilden Hall or Morrow House. "Same cables, same controllers," Prakash said. "The only thing that changed was where the broadcasts could go."

BACnet on Ethernet and IP

BACnet can run over several kinds of local network. BACnet/IP, defined in Annex J of the standard, carries BACnet messages inside UDP packets on an ordinary IP network, the same kind of network that carries office computers and the internet. It is fast, typically running at 100 Mbit/s or more, which makes it the natural choice for supervisory controllers, front ends, plant controllers and equipment such as chillers. MS/TP remains common below it for terminal units, because twisted pair is cheaper and simpler to run to hundreds of boxes.

BACnet/IP uses UDP port 47808 by default, which is BAC0 in hexadecimal, a small joke by the committee. Each BACnet/IP message starts with a short BACnet Virtual Link Layer header that says what kind of message it is, followed by the BACnet network and application data. A capture tool that sees UDP traffic on 47808 knows it is looking at BACnet. A site may use other port numbers, such as 47809, to keep separate BACnet systems apart on the same IP network, and every device in one system must then use the same port.

The BACnet/IP virtual link messages a technician sees most often in captures.
Virtual link messagePurpose
Original-Unicast-NPDUAn ordinary message from one device to another
Original-Broadcast-NPDUA broadcast to every BACnet device on the local IP subnet
Forwarded-NPDUA broadcast relayed by a BBMD from another subnet, carrying the original sender's address
Register-Foreign-DeviceA request from a device on another subnet to receive broadcasts through a BBMD
Distribute-Broadcast-To-NetworkA broadcast from a registered foreign device, for the BBMD to distribute
Read-Broadcast-Distribution-Table and Write-Broadcast-Distribution-TableRead or change a BBMD's table of peer BBMDs

Why broadcasts are the problem

Many BACnet services rely on broadcasts. Who-Is, I-Am, Who-Has, time synchronization and unconfirmed change-of-value notifications are commonly broadcast. On IP, a broadcast reaches every device on the local subnet and stops there, because IP routers do not forward broadcasts between subnets. That is a deliberate design feature of IP networks: it keeps one subnet's chatter from flooding the rest of the enterprise.

When Harcastle's IT department put each building on its own subnet, the front end's Who-Is broadcasts stayed inside the central plant's subnet. Devices in Tilden Hall never heard them, never answered with I-Am, and so the front end never learned where they were. Unicast messages, such as reads to a known address, would still have crossed the IP routers, but the front end had nothing to send them to.

BACnet solves this with a BACnet Broadcast Management Device, or BBMD. A BBMD sits on a subnet and listens for local BACnet broadcasts. When it hears one, it sends a copy to each of the other BBMDs in its Broadcast Distribution Table, its BDT. Each of those BBMDs puts the message out as a broadcast on its own subnet. The result is that a Who-Is sent in the central plant reaches every BACnet device on the campus, and every I-Am reply comes back the same way.

A campus network diagram with four IP subnets drawn as shaded areas: the central plant subnet with the front end and a BBMD, Tilden Hall with a supervisory controller acting as BBMD and three MS/TP trunks below it, Morrow House with a controller acting as BBMD and one MS/TP trunk, and a Quillon laptop outside the campus connected by a remote link. Solid lines join the subnets through IP routers. Dashed arrows show a broadcast from the front end being sent to the central plant BBMD, which forwards copies to the Tilden and Morrow House BBMDs, which rebroadcast locally. The laptop is shown registered as a foreign device with the central plant BBMD.
BBMDs let BACnet broadcasts cross IP routers: each one forwards local broadcasts to its peers, which rebroadcast them locally.

The broadcast distribution table

Each BBMD holds a BDT listing every BBMD in the system, including itself, with its IP address and a broadcast distribution mask. The tables must match: every BBMD must list every other BBMD. A missing entry means one subnet's broadcasts never reach another's, which shows up as devices that can be found from one building but not from another.

A sample BDT for the Harcastle network. A mask of all ones means the BBMD sends the forwarded message directly to the peer BBMD, which rebroadcasts it locally.
Broadcast Distribution Table, Harcastle controls network (sample addresses)
Entry  BBMD IP address   Distribution mask    Location
1      10.40.1.20        255.255.255.255      Central plant (front end subnet)
2      10.40.12.10       255.255.255.255      Tilden Hall supervisory controller
3      10.40.15.10       255.255.255.255      Morrow House plant controller
UDP port 47808 on all entries. The same three entries are written into all three BBMDs.

The mask tells the BBMD how to forward. With a mask of all ones, it sends the message to the peer BBMD, which rebroadcasts it locally; this two-hop method works through almost any IP network and is the usual choice. With a mask matching the peer's subnet, the BBMD sends a directed broadcast straight to the peer's subnet, which saves a step but only works where the IP routers allow directed broadcasts, and most corporate networks block them.

There must be only one BBMD per subnet in a system. Two BBMDs on the same subnet each forward the same broadcasts and each rebroadcast the same forwarded messages, so every device hears everything twice and some broadcasts can circulate. It is a common fault after a renovation, when a contractor enables BBMD on a new controller without knowing the building already has one.

Worked problem

Broadcast traffic from one global Who-Is

Harcastle's front end sends a Who-Is with no instance range. The campus has 90 BACnet devices that answer: 34 on BACnet/IP and 56 on MS/TP trunks behind routers, which pass their I-Am replies onto the IP network as broadcasts. There are three BBMDs, and each I-Am broadcast is forwarded by its local BBMD to the other two, which rebroadcast it. How many I-Am broadcasts appear on the IP network, counting the originals and the rebroadcast copies?

Show solution
  1. Original I-Am broadcasts on their local subnets: 90.
  2. Each is forwarded to 2 peer BBMDs, which rebroadcast it: 90 × 2 = 180 more broadcasts.
  3. Total: 90 + 180 = 270 I-Am broadcasts, plus 180 unicast forwards between BBMDs.

Answer: One careless Who-Is produces several hundred packets in a second or two. On a campus this size that is harmless, but on a hospital with thousands of devices it can delay alarms and trend collection. A Who-Is limited to an instance range draws replies only from the devices in it.

Foreign devices

Sometimes a device needs to join a BACnet system from a subnet that has no BBMD, such as a technician's laptop on a remote connection or a single meter gateway on an IT subnet. Instead of adding a BBMD to that subnet, the device registers as a foreign device with an existing BBMD, giving a time to live in seconds. The BBMD then sends it copies of all broadcasts, and the device sends its own broadcasts to the BBMD to distribute. The registration lapses unless the device renews it before the time to live runs out; BBMDs allow a short grace period of 30 s beyond it.

Each BBMD keeps a Foreign Device Table listing its registered devices and their remaining time. Reading it is one of the first checks when a remote tool can read devices by address but cannot discover anything. Remote access raises security questions, and Quillon's laptops reached client networks only through the client's own approved remote access, never by a BBMD exposed to the internet, a subject BAS-430 covers in detail.

BACnet routers

An IP router joins IP subnets. A BACnet router joins BACnet networks, which may be of different types: it is the device that connects an MS/TP trunk to BACnet/IP, or one MS/TP trunk to another. Each port of a BACnet router is on a different BACnet network, and each of those networks has its own network number, a number from 1 to 65,534 that must be unique across the whole BACnet internetwork. Lesson 6 explains how network numbers are planned.

When a device on BACnet/IP sends a message to a device on an MS/TP trunk, it addresses it to the trunk's network number and the device's MAC address on that trunk, and sends it to the router that serves that network. Routers learn which networks they can reach and announce them with I-Am-Router-To-Network messages; a client that does not know the way can ask with Who-Is-Router-To-Network. Most supervisory controllers include a router, which is why the Tilden supervisory controller in the figure serves three MS/TP trunks.

Devices that join networks, and what each one does.
DeviceWorks atJoins
RepeaterElectrical signalsTwo segments of the same EIA-485 network
IP routerIP addressesIP subnets; blocks broadcasts
BBMDBACnet/IP virtual linkBACnet/IP subnets, for broadcasts
BACnet routerBACnet network layerDifferent BACnet networks, such as MS/TP and BACnet/IP
GatewayApplication dataBACnet and a different protocol (lesson 10)

Putting the Harcastle network back together

In 2024, the fix at Harcastle took an afternoon once the cause was clear. Quillon enabled BBMD on the central plant's front end server, on the Tilden supervisory controller and on the Morrow House plant controller, wrote the same three-entry BDT into each, and asked IT to allow UDP 47808 between the three addresses through the new firewalls. Discovery from the front end worked again immediately. The trends had a three-day gap, which Sophie noted in the site log.

BACnet over IP version 6, defined in a separate annex, uses multicast instead of broadcast and avoids some of these issues, but it is still rare in buildings. BACnet Secure Connect, introduced in lesson 9 and covered in BAS-430, replaces broadcasts and BBMDs with secure connections through a hub. For now, most BACnet/IP sites in Canada and the US look like Harcastle: IPv4, UDP 47808, and a BBMD on each subnet.

Callie copied the BDT into her notebook. "So the BBMD is the only thing that lets a broadcast out of a subnet," she said. Prakash nodded. "And the BDT is the only thing that says where it goes. When something can't be found, start there."

BACnet/IP and the IT department

Once a building system runs on IP, it shares the building's network rules with the owner's IT staff, and much of a BACnet/IP project is agreeing those rules. The requests a controls contractor makes are usually modest, but they need to be written down, because an IT change made months later for an unrelated reason can break BACnet traffic in ways that are hard to trace.

Points to agree with an owner's IT staff on a BACnet/IP job.
TopicWhat the controls contractor usually asks for
AddressesFixed IP addresses for controllers, routers and BBMDs, reserved so that no other device takes them
SeparationA separate VLAN or subnet for building controls, apart from office and guest networks
Firewall rulesUDP port 47808 allowed between the controls subnets and the BBMDs, and nothing broader than needed
Broadcast handlingAgreement on which device is the BBMD on each subnet, and that no other BBMD is added
Remote accessA VPN or managed remote access service, never BACnet opened directly to the internet
Change noticeAdvance word of switch, router or firewall changes on the controls network

Remote access deserves particular care. Classic BACnet has no authentication of its own: a device will answer a read or accept a write from anyone who can reach it. Researchers who scan the internet have repeatedly found building controllers answering BACnet requests from anywhere, which means anyone could read their points and, in many cases, command them. The defense is simple and belongs in every handover: building controllers are reachable only from the controls network, and people outside it come in through a VPN or a remote access service that identifies them first. BACnet Secure Connect, described in lesson 9, adds authentication and encryption to BACnet itself, but most installed systems will rely on network separation for years to come.

Network address translation also causes trouble. BBMDs and foreign devices exchange IP addresses inside BACnet messages, and a router that rewrites addresses in the packet header does not rewrite the copies inside the message. Some products have settings to work behind translation, but the usual advice is to avoid it on the controls network, and to treat any design that needs it as something to plan with the IT staff rather than to discover on site.

Common mistakes

  • MistakeAssuming IP routers will pass BACnet broadcasts.

    InsteadUse one BBMD per subnet with matching BDTs, or register foreign devices.

  • MistakeEnabling BBMD on a second device in the same subnet.

    InsteadKeep exactly one BBMD per subnet in each BACnet system.

  • MistakeWriting the BDT into only some of the BBMDs.

    InsteadEvery BBMD's table must list every BBMD, including itself.

  • MistakeUsing directed-broadcast masks on a network that blocks them.

    InsteadUse an all-ones mask so each peer BBMD rebroadcasts locally.

  • MistakeLetting a foreign device registration lapse without noticing.

    InsteadCheck the time to live and the Foreign Device Table when discovery fails.

Summary and key terms

  • BACnet/IP carries BACnet in UDP packets, by default on port 47808 (hexadecimal BAC0).
  • Each BACnet/IP message has a virtual link header naming its type, such as unicast, broadcast or forwarded.
  • IP routers do not forward broadcasts, so BACnet discovery stops at subnet boundaries without help.
  • A BBMD forwards local broadcasts to the peers in its broadcast distribution table, which rebroadcast them.
  • All BBMDs in a system need the same BDT, and there must be only one BBMD per subnet.
  • A foreign device registers with a BBMD for a time to live and must renew it.
  • A BACnet router joins different BACnet networks, each with a unique network number.
BACnet/IP
BACnet carried in UDP packets on an IP network.
UDP port 47808
The default port for BACnet/IP, BAC0 in hexadecimal.
Broadcast
A message sent to every device on a network or subnet.
Subnet
A part of an IP network within which broadcasts reach every device.
BBMD
BACnet Broadcast Management Device, which forwards BACnet broadcasts between IP subnets.
BDT
Broadcast Distribution Table: a BBMD's list of peer BBMDs.
Foreign device
A device that registers with a BBMD to receive and send broadcasts from a subnet with no BBMD.
BACnet router
A device that joins two or more BACnet networks, such as MS/TP and BACnet/IP.
Network number
A number from 1 to 65,534 identifying one BACnet network in an internetwork.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. A site has five subnets with BACnet devices. How many BBMDs does it need, and how many entries in each BDT?

    Show answer

    Five BBMDs, one per subnet, each with five entries.

  2. A device on Tilden's subnet can read a Morrow House controller by address but cannot discover it. What is likely wrong?

    Show answer

    Broadcasts are not crossing: check the BBMDs and their BDTs.

  3. Every device on one subnet receives each Who-Is twice. What should you look for?

    Show answer

    A second BBMD on that subnet.

  4. A laptop registers as a foreign device with a time to live of 300 s. When must it renew?

    Show answer

    Before 300 s pass; the BBMD allows only a short grace period after that.

  5. 120 devices answer a global Who-Is on a site with four BBMDs. How many I-Am broadcasts appear in total?

    Show answer

    120 + 120 × 3 = 480.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz