Skip to content
Version 6.1.0
Contact Us

Routing and virtual networks

Routing between data links, and virtual devices on virtual networks.

A router connects two or more network ports with BACnet/IP, MS/TP or BACnet/SC data links; a virtual network presents additional devices behind the main device. Both need the matching build options. See Data links overview and Virtual devices and gateways.

Function Summary
BACnetStack_AddVirtualNetwork() Adds a virtual network.
BACnetStack_AddRouterPort() Registers a directly connected network for physical inter-datalink routing (ASHRAE 135 cl. 6.6).
BACnetStack_AddRouterRoute() Configures a static route to a remote network reached through a next-hop router (ASHRAE 135 cl. 6.6).
BACnetStack_SetRouterEnabled() Turns physical inter-datalink routing on or off.
BACnetStack_AddDeviceToVirtualNetwork() Adds a virtual device on a virtual network.
BACnetStack_UpdateVirtualNetworkNumber() Changes a virtual network’s number in the virtual router’s routing map, and the Network_Number of every virtual Network Port object on that network: the main device’s (created by BACnetStack_AddVirtualNetwork()) and each virtual device’s (created by BACnetStack_AddDeviceToVirtualNetwork()).
BACnetStack_SendIAmRouterToNetwork() Sends an I-Am-Router-To-Network NPDU announcing the networks this device routes to (cl. 6.4.2).
BACnetStack_SendWhoIsRouterToNetwork() Sends a Who-Is-Router-To-Network NPDU message, requesting to know which router(s) can reach a given network (or all reachable networks, if useNetworkNumber is false).
BACnetStack_SendNetworkNumberIs() Sends a Network-Number-Is NPDU message, announcing this network’s number and whether it was configured or learned.