Castles Flow
Castles Flow takes mirrored packet traffic and telemetry from network devices and merges them into one data stream for monitoring, DDoS detection and incident investigation.
Traffic sources
Section titled “Traffic sources”Castles Flow runs in one of two modes:
- Network sensor: takes mirrored traffic from a SPAN or TAP port, parses L2, L3 and L4 headers, and turns packet samples into sFlow v5 telemetry and internal Flow records.
- Flow collector: accepts sFlow v5, NetFlow v9 and IPFIX telemetry from routers and switches.
Sampling
Section titled “Sampling”In mirror mode, sampling happens in two places: upstream on the switch and locally on the sensor. These are separate factors, and the effective rate is their product. A switch rate of 1:64 combined with a local rate of 1:1000 gives an effective rate of 1:64000. The upstream factor in Flow has to match the switch, because changing it in Flow does not reconfigure the switch. If the feed is unsampled, set the upstream factor to 1. The interface shows the upstream, local and effective rates separately, and traffic estimates are based on the effective rate.
Physical capture-interface counters and BPF counters count the mirrored copies as received. They are not multiplied by either sampling factor. Changes made in the interface to local sampling, its enabled state or the XDP action last only until the agent restarts. The upstream factor comes from the startup configuration and defaults to 1.
In collector mode, each exporter reports its own sampling rate, so there is no single effective rate for the whole collector, and the mirror upstream multiplier is not applied to exporter telemetry.
Traffic analysis
Section titled “Traffic analysis”- live and historical traffic rates in bit/s and packets/s;
- inbound and outbound traffic views;
- top sources, destinations, ports, autonomous systems and countries;
- protocol, TCP flag and packet-size analysis;
- raw Flow records for detailed investigation;
- comparison of Flow data with SNMP interface counters, where exporter identity, interface index and traffic direction can be correlated;
- 95th percentile traffic accounting for reports and billing.
Customizable overview
Section titled “Customizable overview”Frontend release 26.09.0-unified.14-workspace.3 adds a compact dashboard of square, configurable widgets. By default it shows volume, average rate, peak rate, the last interval, traffic history, protocols, and top source and destination addresses. The catalog has the other available traffic breakdowns plus the node’s live status.
To manage widgets, click the settings icon at the top right of the overview. A side panel opens with the catalog, widget settings, an arrange-and-resize mode, undo and reset.
Widgets can be added, renamed, duplicated, removed, resized in width and height, and reordered by dragging or with the buttons. Undo and the default layout stay available while editing. A traffic widget can follow the page’s bit/s or packets/s setting, or keep its own. The period and traffic filters apply to every widget. If the last interval is missing, the widget marks it as unavailable. If a refresh fails, the widget keeps the last confirmed snapshot and shows its actual bounds.
Click your username for Settings or Sign out. Personal settings are split into Account, Appearance, Password and Passkeys tabs. Choose the accent color and chart timezone in Appearance, then click Apply. Edits take effect only after Apply; Cancel or closing the profile discards unapplied edits. Applying a new timezone reformats the existing snapshot without fetching data again. If the browser cannot save the preference, a warning says the change applies only to the current session, and Apply stays available to retry. Appearance, timezone and widget layout are stored per signed-in account, in that browser, on the current site. They do not synchronize across browsers or installations. The sun or moon button in the header switches themes.
Live Flow for an object
Section titled “Live Flow for an object”In the 26.09.0-unified.15 implementation, go to Objects → select an object → object overview → Live Flow. An object is a named, saved set of IP prefixes. Live Flow lists the most recent stored records that match those prefixes. A name like “Web server” is an operator label, not an automatically detected server type.
The table covers a moving five-minute window and returns up to 200 records per request. Direction is relative to the object’s addresses. Source IP, destination IP, ports and protocol can narrow the results. Because of sampling and ingestion delay, the table shows a selection of stored observations. A single row may represent an aggregated flow, and its byte count is the stored value before sampling adjustment. The table is not a complete list of connections or a packet capture. Access requires an existing user session and managed_objects.read.
Check the installed version before relying on this workflow. Request fields, response types and limitations are in the Live Flow API.
Routers and SNMP
Section titled “Routers and SNMP”With SNMP enabled, release 26.09.0-unified.5 provides router inventory, SNMP interface counters and interface classification in both network sensor (mirror) and collector modes. Operators can configure routers and inspect their interfaces without touching the capture mode. A manual SNMP test requires SNMP to be enabled globally.
Plain SPAN traffic loses two things: the original switch port’s interface index (ifIndex) and its ingress or egress direction. SNMP counters still work, but automatic per-port comparison with mirrored traffic is not guaranteed. That comparison is reliable only when there is enough metadata to correlate exporter, interface and direction.
In release 26.09.0-unified.10, the router list in mirror mode shows the router address, SNMP status and the last polling attempt. Flow exporter status, sampling and traffic columns are hidden here. The summary counts routers by SNMP result. In collector mode, SNMP health and Flow exporter activity are tracked separately: a successful SNMP poll does not imply that Flow datagrams have arrived. Polling failures are reported in the interface with a Retry button. Rates need at least two counter samples taken at different times.
In mirror mode, interface tables show SNMP counters but leave out per-port Flow ratios, since those are not supported. Client accounting is hidden too. The sent-datagrams card appears only if outbound export is configured.
Polling uses SNMP v2c. The Flow router and SNMP API covers the seven settings fields, how the community string is masked, permissions and timeout responses.
DDoS detection
Section titled “DDoS detection”Protected networks are grouped by IP prefix into Managed Objects. Every object gets its own traffic statistics, thresholds, adaptive baselines, detection settings and attack history.
Flow detects volumetric attacks; TCP SYN, TCP RST, TCP Null, UDP and ICMP floods; known amplification vectors; distributed floods; and profiled network anomalies such as carpet bombing.
An attack report shows the target, event time, peak rates, source addresses, countries, autonomous systems, ports, protocols and whatever Flow records are available.
Controlled network response
Section titled “Controlled network response”The optional Castles BGP module adds managed BGP peers and policies, IPv4 and IPv6 announcements, and RTBH.
Every network action goes through prefix allowlists, finite leases and audit records, and its export is verified in Loc-RIB and Adj-RIB-Out. When Flow detects an attack, it announces the target prefix to the router with a SOTA scrubbing node as next hop. Once the attack ends, it withdraws the announcement. Operators can also trigger a response manually.
User access
Section titled “User access”Release 26.09.0-unified.5 uses individual accounts, roles and server-side permission checks (RBAC). A valid username and password create a user session right away. A passkey can optionally be added in account settings after sign-in and then works as an independent sign-in method. Both methods share the same user and permission model. Agents and service APIs authenticate with their own machine credentials.
Existing installations need a reviewed migration that keeps accounts, roles, registered passkeys and password-based recovery intact. Check the installed version on each installation individually.
Interface language
Section titled “Interface language”The interface is available in Russian and English. The language selector is on the sign-in screen and in the application header. The initial language follows the browser’s preferences, and an explicit choice is remembered in that browser. Customer data and API identifiers stay untranslated.
The dashboard can display times in Browser, Novosibirsk (Asia/Novosibirsk), Moscow (Europe/Moscow), Warsaw (Europe/Warsaw), Belgrade (Europe/Belgrade) or UTC. The selection affects chart labels and tooltips and is remembered in the browser. Custom period inputs are always in UTC. Stored timestamps and the server timezone do not change.
Dashboard periods and missing data
Section titled “Dashboard periods and missing data”In release 26.09.0-unified.10, a single period drives the dashboard totals, the traffic chart and every breakdown. It defaults to 24 hours. Presets are 5 and 15 minutes and 1, 6 and 24 hours, and a custom UTC interval can be anywhere from one second to 24 hours. Auto-refresh runs every 60 seconds. It can be disabled; a manual refresh button remains available.
One bps / pps selector switches the chart, the average and peak rates, and the breakdown rankings, all from the same loaded snapshot. Byte and packet totals stay as amounts for the selected period. Filtering by source and destination IP, port or protocol applies to every section at once. ASN and country rankings rely on the current local lookup data. If a database is missing or the enrichment limit is hit, the section says so explicitly.
Statistics come from stored IPv4 records, with each record’s sampling weight applied once. Average rates span the whole requested period, gaps included. Peak is the highest rate seen in any bucket. The dashboard shows the loaded interval, bucket width, update time, stored record count and empty bucket count, but it does not claim full capture based on those numbers. Field details and limits are in the dashboard API.
While a new period or filter is loading, the last successful snapshot stays on screen with its own bounds. A response that arrives late cannot overwrite the current selection. Loading errors stay visible with a Retry button. If a request succeeds but returns nothing, the old totals and rankings are replaced with empty states and the chart buckets are left null.
A measured zero is shown as zero. Missing values, and values with unknown sampling, are shown as unavailable. Flow does not interpolate or substitute them. Operational agent status, capture and sampling controls, and collector management live in Settings. On narrow screens, the menu button opens navigation; the close button, Escape or picking a section closes it.
Each section states its version requirements. Availability depends on the installed version and configuration.