Bacnet Ip Deep Dive

BACnet/IP Deep Dive: Running Building Controls on IT Networks

Imagine sending a letter to a friend in another country. You write your message on paper, put it in an envelope with a local address, then put that envelope in another envelope with an international address. When it arrives, the outer envelope is opened, revealing the inner envelope, which is then delivered to your friend. BACnet/IP works exactly like this—it wraps BACnet messages in UDP packets, allowing them to travel across standard IT networks.

In this deep dive, we’ll explore how BACnet/IP encapsulates BACnet messages, the role of UDP port 47808, the BACnet Virtual Link Layer (BVLL) header, the challenge of managing broadcasts across subnets, and how it compares to pure BACnet Ethernet.

What Is BACnet/IP?

BACnet/IP is a BACnet network type that runs over standard IP networks. It allows building automation devices to use the same Ethernet and Wi-Fi infrastructure as computers, printers, and other IT devices. This is a game-changer for building management, as it eliminates the need for separate wiring and infrastructure.

Key Advantages of BACnet/IP

  • Scales from small buildings to large campuses

The Encapsulation Process: BACnet Inside UDP

BACnet/IP uses a layered encapsulation approach, wrapping BACnet messages in multiple headers like our international letter example. Let’s break down this process layer by layer:

The Encapsulation Layers

| Layer | Name | Purpose | Analogy |

|———–|———-|————-|————-|

| 1 | BACnet PDU | The actual building control message | Your letter content |

| 2 | BVLL Header | BACnet-specific routing information | Local envelope with building address |

| 3 | UDP Header | Port numbers and checksum | International envelope with customs info |

| 4 | IP Header | Source/destination IP addresses | Global address label |

| 5 | Ethernet Header | MAC addresses and frame info | Physical package with shipping labels |

1. BACnet Protocol Data Unit (PDU): The “Letter Content”

The BACnet PDU is the actual building control message—the “content” of our communication. It contains:

  • Data: The actual values being read or written

2. BACnet Virtual Link Layer (BVLL): The “Local Envelope”

The BVLL header is the BACnet-specific layer that enables BACnet devices to communicate over IP networks. Think of it as the local envelope that tells the BACnet/IP system how to handle the message.

#### Key BVLL Fields

| Field | Size | Purpose | Example Value |

|———–|———-|————-|——————-|

| BVLL Type | 1 byte | Specifies the BVLL message type | 0x81 (Forwarded-NPDU) |

| BVLL Length | 2 bytes | Length of the BACnet PDU | 0x0012 (18 bytes) |

| Destination MAC | 6 bytes | Physical address of the destination device | 00:11:22:33:44:55 |

| Source MAC | 6 bytes | Physical address of the source device | 00:AA:BB:CC:DD:EE |

| PDU Type | 1 byte | Type of BACnet PDU | 0x00 (Confirmed Request) |

#### Common BVLL Message Types

  • Broadcast-Distribution-Table: Manages broadcast routing

3. UDP Header: The “International Envelope”

BACnet/IP uses UDP (User Datagram Protocol) as its transport layer. UDP is faster than TCP but doesn’t guarantee delivery—ideal for real-time building control where speed is more important than 100% reliability.

#### Key UDP Fields for BACnet/IP

  • Checksum: Error detection for the UDP header and data

4. IP Header: The “Global Address Label”

The IP header contains the source and destination IP addresses—like the global address label on our international package. It ensures the BACnet message reaches the correct IP subnet.

#### Key IP Fields

  • Protocol: 17 (UDP)

5. Ethernet Header: The “Physical Package”

The Ethernet header wraps everything in a format that can be sent over physical Ethernet cables or Wi-Fi—like the physical package that holds all our envelopes.

Why UDP Port 47808?

BACnet/IP uses UDP port 47808 (0xBAC0 in hex) for all BACnet communication. This specific port was assigned by the IANA (Internet Assigned Numbers Authority) to ensure BACnet/IP devices can find each other on a network.

Why Not a Well-Known Port?

  • The hex value 0xBAC0 is a clever nod to “BACnet” (BAC + 0)

What Happens When a Device Receives a Packet on Port 47808?

1. The device checks the destination UDP port

2. If it’s 47808, the device processes it as a BACnet message

3. It strips off the Ethernet, IP, and UDP headers

4. It processes the BVLL header to determine how to handle the BACnet PDU

5. It executes the BACnet service specified in the PDU

The Broadcast Challenge: Crossing Subnets

One of the biggest challenges in BACnet/IP is managing broadcasts across IP subnets. Standard IP routers block broadcast messages to prevent network congestion, but BACnet devices use broadcasts for critical functions like device discovery (`Who-Is/I-Am` services).

The Problem with Broadcasts

  • BACnet Needs Broadcasts: For device discovery, alarm notifications, and more

The Solution: BACnet Broadcast Management Devices (BBMDs)

As we discussed earlier, BBMDs act as “broadcast routers” for BACnet/IP networks. Here’s how they solve the broadcast problem:

1. Register with Each Other: BBMDs create a network-wide broadcast distribution table (BDT)

2. Capture Local Broadcasts: A BBMD catches broadcast messages on its local subnet

3. Forward to Other BBMDs: It sends the broadcast to all BBMDs in its BDT

4. Rebroadcast Locally: Each BBMD rebroadcasts the message on its local subnet

Example: BBMD in Action

  • Devices on both subnets respond with `I-Am` messages

Foreign Device Registration (FDR)

For devices that can’t be BBMDs (like small sensors), BACnet/IP provides Foreign Device Registration (FDR):

  • This allows small devices to participate in network-wide broadcast services

BACnet/IP vs. Pure BACnet Ethernet: Key Differences

Now that we understand BACnet/IP, let’s contrast it with pure BACnet Ethernet to see when each is appropriate:

| Feature | BACnet/IP | BACnet Ethernet |

|————-|—————|———————|

| Transport Layer | UDP/IP | Direct Ethernet |

| Port Number | 47808 (0xBAC0) | None (uses Ethernet MAC addresses directly) |

| Addressing | IP addresses (logical) | MAC addresses (physical) |

| Broadcast Handling | Uses BBMDs for cross-subnet broadcasts | Limited to local Ethernet segment |

| Infrastructure | Uses existing IT networks | Requires dedicated Ethernet infrastructure |

| Scalability | Scales globally (internet) | Limited to local Ethernet segments |

| Encapsulation | Multiple layers (BACnet→BVLL→UDP→IP→Ethernet) | Simple (BACnet→Ethernet) |

| Flexibility | High (works over Wi-Fi, cellular, etc.) | Low (only works on Ethernet) |

| Modern Usage | Primary BACnet variant for new installations | Legacy, declining usage |

| Cost | Lower (uses existing infrastructure) | Higher (requires dedicated wiring) |

Real-World Application: BACnet/IP in a Large Hospital

Let’s see how BACnet/IP works in a real-world scenario—a large hospital with multiple buildings and subnets:

1. Building A: Patient rooms with temperature sensors and thermostats on subnet 192.168.1.0/24

2. Building B: Operating rooms with specialized HVAC systems on subnet 192.168.2.0/24

3. Building C: Central plant with chillers and boilers on subnet 192.168.3.0/24

4. BBMDs: One in each building, registered with each other

5. BACnet/IP Traffic: Flows between buildings over the hospital’s existing Ethernet backbone

6. Device Discovery: A new sensor in Building A sends a `Who-Is` broadcast, which reaches all buildings via BBMDs

7. Control: The central plant adjusts Building B’s HVAC based on surgical schedule

Future of BACnet/IP

BACnet/IP continues to evolve to meet modern building needs:

1. BACnet Secure Connect: Adding TLS encryption to BACnet/IP for improved security

2. BACnet Web Services: RESTful APIs for web-based access to BACnet data

3. Integration with IoT Platforms: Direct connection to AWS IoT, Azure IoT, and Google Cloud

4. BACnet over QUIC: Using QUIC (Quick UDP Internet Connections) for faster, more reliable communication

5. Edge Computing: BACnet/IP devices with built-in edge processing to reduce network traffic

Conclusion: BACnet/IP – The Future of Building Automation

BACnet/IP has become the dominant BACnet variant because it combines the reliability of BACnet with the flexibility and scalability of IP networks. By encapsulating BACnet messages in UDP packets, using port 47808, and solving the broadcast challenge with BBMDs, BACnet/IP enables building automation systems to leverage existing IT infrastructure.

Whether you’re building a small office or a large campus, BACnet/IP provides the flexibility, scalability, and cost savings needed for modern building management. It’s the perfect bridge between traditional building controls and the IT-driven world of smart buildings.

So, the next time you adjust the temperature in your office or walk through a hospital with perfect air quality, remember the BACnet/IP messages flowing through the IT network—wrapped in UDP packets, using port 47808, and managed by BBMDs—to make it all happen.