Protocol 77 of 81Layer 7FrameAssembly v3.1.2
llms-full.txt
bacnetBACnet/IP Building Automation & Control Networks

HVAC Chillers, Badge Readers & Who-Is / I-Am (bms <-> controller bacnet)

Default Port / Protocol
UDP 47808 (0xbac0)
Host Endpoint Rule
Dual-Stack IPv4/IPv6
Wireshark Display Filter
bacnet || bvlc || bacapp
Standards & Specs
ASHRAE 135, ISO 16484-5
Wire Stack:Ethernet II[802.1Q / QinQ / MPLS]IPv4 / IPv6UDP 47808 (0xbac0)BACnet/IP

What It Does on the Wire

Running on UDP 47808 (0xbac0 — literally spells BAC0 in hex!) across hospital chillers and data-center CRAC units, bacnet packs BVLC, NPDU, and confirmed/unconfirmed APDUs cleanly.

BACnet/IP (bacnet, ASHRAE 135) manages data-center chillers, CRAC cooling units, hospital HVAC controllers, elevators, and access-control panels over UDP port 47808 (0xbac0). Every BACnet/IP frame stacks three headers: the 4-byte BVLC (0x81 BACnet/IP, Original-Broadcast 0x0b or Original-Unicast 0x0a + 16-bit total length), the NPDU (0x01), and the APDU carrying Unconfirmed (whois, iam) or Confirmed (readproperty, writeproperty) services.

FrameAssembly encodes context-tagged BACnet Object Identifiers (objecttype + 22-bit objectinstance), Property Identifiers (propertyid, such as 85 for Present-Value), and application-tagged values automatically.

Data-Center Cooling & BMS Network Segmentation Audits

Test firewall and VLAN rules isolating UDP 47808 HVAC controllers from corporate IT workstations while allowing authorized BMS servers.

Detect Unauthorized WriteProperty Setpoint Overrides

Generate bacnet writeproperty packets targeting Analog-Output (objecttype 1) Present-Value (propertyid 85) to validate OT IDS alerts.

BACnet Who-Is / I-Am Asset Inventory Parser Testing

Replay whois broadcasts and iam device responses into passive OT asset discovery sensors.

Minimal Quickstart (bacnet_quickstart.frasm)

Hit Preview Packets to compile in-browser and eyeball timestamps + wire byte lengths, or ship it straight to the Playground.

bacnet_quickstart.frasm8 lines
Open in Playground
host bms_srv { ip 10.80.10.10 }
host chiller_ahu { ip 10.80.10.55 }
compile {
bms_srv -> chiller_ahu bacnet whois wait 3ms
bms_srv <- chiller_ahu bacnet iam objecttype 8 objectinstance 1055 wait 3ms
bms_srv -> chiller_ahu bacnet readproperty invokeid 1 objecttype 0 objectinstance 1 propertyid 85
}

What the Compiler Calculates So You Don't Have To

  • Defaults to UDP source and destination port 47808 (0xbac0) and sets BVLC Function to 0x0b (Original-Broadcast-NPDU) on whois/iam or 0x0a (Original-Unicast-NPDU) on readproperty/writeproperty.
  • Bit-packs the 10-bit objecttype and 22-bit objectinstance into the 32-bit ASHRAE 135 BACnetObjectIdentifier tag.
  • Defaults propertyid to 85 (Present-Value) and objecttype to 0 (Analog-Input) when reading sensor points.
Multi-Frame Lab · Ready to Compile

Data-Center CRAC Discovery (Who-Is/I-Am), Temperature Read & Setpoint Write

Discovers CRAC device instance 2001, reads Analog-Input 1 Present-Value (propertyid 85), and tests an unauthorized writeproperty setpoint change.

bacnet_dc_cooling_audit.frasm12 lines
Open in Playground
host bms_workstation { ip 192.168.90.10 }
host crac_unit_04 { ip 192.168.90.40 }
compile {
// 1. Device discovery: Who-Is -> I-Am (Object Type 8 = Device, Instance 2001)
bms_workstation -> crac_unit_04 bacnet whois wait 2ms
bms_workstation <- crac_unit_04 bacnet iam objecttype 8 objectinstance 2001 wait 5ms
// 2. Read return-air temperature (Object Type 0 = Analog-Input, Property 85 = Present-Value)
bms_workstation -> crac_unit_04 bacnet readproperty invokeid 10 objecttype 0 objectinstance 1 propertyid 85 wait 4ms
// 3. Write chiller setpoint (Object Type 2 = Analog-Value, Property 85 = Present-Value)
bms_workstation -> crac_unit_04 bacnet writeproperty invokeid 11 objecttype 2 objectinstance 1 propertyid 85 value 24
}
Terminal Commands (FrameAssembly CLI v3.1.2)
# 1. Eyeball relative timestamps, ports & wire lengths in your terminal
frameassembly show bacnet_dc_cooling_audit.frasm

# 2. Compile .frasm -> classic .pcap (tcpdump/tcpreplay/Suricata) or nanosecond .pcapng
frameassembly bacnet_dc_cooling_audit.frasm bacnet_dc_cooling_audit.pcap
frameassembly bacnet_dc_cooling_audit.frasm bacnet_dc_cooling_audit.pcapng

# 3. Round-trip .pcap <-> .frasm whenever you want to scrub or tweak an existing capture
frameassembly reverse bacnet_dc_cooling_audit.pcap bacnet_dc_cooling_audit_edited.frasm

All bacnet Keywords & Header Options

Every sub-keyword and header option is lowercase [a-z0-9]+ with zero underscores — mix and match them in any order after bacnet:

src_host -> dst_host bacnet [whois | iam | readproperty | writeproperty] [invokeid <0..255>] [objecttype <0..1023>] [objectinstance <number>] [propertyid <number>] [value <number>]
Keyword / OptionAccepted ValueDefaultEffect on Packet
whois | iam | readproperty | writepropertyBACnet APDU service selectorwhoisSelects Unconfirmed Who-Is (8), Unconfirmed I-Am (0), Confirmed ReadProperty (12), or Confirmed WriteProperty (15).
invokeid <0..255>1-byte Confirmed-Request Invoke ID1Matches Confirmed readproperty / writeproperty requests with Complex-ACK / Simple-ACK replies.
objecttype <0..1023> | objectinstance <number>0 Analog-Input, 1 Analog-Output, 2 Analog-Value, 3 Binary-Input, 8 Device + 22-bit instanceobjecttype 0, objectinstance 1 (or 8 / 1000 on iam)Packs the 4-byte BACnetObjectIdentifier ((objecttype << 22) | objectinstance).
propertyid <number>85 Present-Value, 77 Object-Name, 28 Description85 (Present-Value)Encodes Context Tag [1] (Property-Identifier) in readproperty / writeproperty.
value <number>Unsigned value written on writeproperty0Encodes the [3] opening/closing context-tagged Property-Value inside writeproperty.

Cross-Layer Wrappers Valid with bacnet

802.1Q VLAN / QinQ / MPLS tags, IPv4/IPv6 QoS & TTL fields, wait gaps, and transport overrides allowed on this protocol

10 options
OptionRange / FormatDefaultEffect on Packet
wait <number><ns|us|ms|s|m>Time gap (ns, us, ms, s, m)10msAdvances the packet timestamp clock after sending this packet and before the next packet (wait 0ns sends back-to-back).
payload "<text>" | hexpayload "<hex>"Quoted text or hex bytes (choose one)OmittedAppends or overrides raw payload bytes ("deadbeef" or "de:ad:be:ef") and updates packet lengths and checksums.
srcmac <mac> | dstmac <mac>Colon, hyphen, or Cisco dot MACHost MAC / RFC multicast MACOverrides the 14-byte Ethernet II source or destination MAC address for this single packet.
vlan <0..4095> [pcp <0..7>] [dei <0|1>]VLAN ID 0..4095, PCP 0..7, DEI 0..1UntaggedWraps the packet in an IEEE 802.1Q VLAN tag (0x8100) with optional 802.1p QoS priority.
qinq <0..4095> [innervlan <0..4095>]Outer S-VLAN 0..4095, Inner C-VLAN 0..4095Untagged (innervlan 1 when qinq is set)Double-tags the packet with outer IEEE 802.1ad S-Tag (0x88a8) plus inner IEEE 802.1Q C-Tag (0x8100).
mpls <0..1048575> [exp|tc <0..7>] [bos <0|1>] [mplsttl <0..255>]Label 0..1048575, exp/tc 0..7, bos 0..1, ttl 0..255Unlabeled (at most 1 mpls tag per packet)Inserts a 32-bit MPLS label header (0x8847) ahead of the Layer 3 header.
ttl <0..255> [dscp <0..63>] [ecn <0..3>]TTL/Hop Limit 0..255, DSCP 0..63, ECN 0..3ttl 64, dscp 0, ecn 0Sets IPv4 TTL or IPv6 Hop Limit plus DiffServ (DSCP) and ECN QoS markings.
ipid <0..65535> [df] [mf] [fragoffset <0..8191>]IPv4 ID, DF/MF flags, fragment offset 0..8191ipid 1, flags 0, fragoffset 0Sets IPv4 Identification, Do-Not-Fragment (df), More-Fragments (mf), and fragment offset (ignored over IPv6).
flowlabel <0..1048575>20-bit IPv6 Flow Label (0..1048575)0Sets the 20-bit IPv6 Flow Label for ECMP routing tests (ignored when running over IPv4 hosts).
srcport <0..65535> | dstport <0..65535>Port number 0..65535srcport 49152 (remembered), UDP 47808 (0xbac0)Overrides source or destination port and remembers the port pair automatically on <- replies.

Gotchas & Quick Fixes

Place bacnet Before whois (bacnet whois, Not Standalone whois)

Avoid
bms_srv -> chiller_ahu whois
Valid v3.1.2 Syntax
bms_srv -> chiller_ahu bacnet whois

Standalone whois sends an Internet domain lookup on TCP port 43; bacnet whois sends an ASHRAE 135 BACnet/IP Who-Is broadcast on UDP port 47808.

Field Guide 03
Poke Stateful Firewalls, Suricata, Zeek & OT Conduits