Skip to content

NwDiag — Network Topology Diagrams

NwDiag generates network topology diagrams from text descriptions. Networks are defined as named groups with optional subnet addresses. Nodes can participate in multiple networks.

!!! tip "Syntax" Define networks with network name { address = "..."; }. Place nodes inside the networks where they reside. A node can appear in multiple networks to show multi-homed hosts.


Simple DMZ Layout

A two-tier network showing a DMZ hosting web servers and an internal network hosting back-end services.

blockdiag dmz 192.168.1.0/24 internal 10.0.0.0/24 192.168.1.10 10.0.0.10 web-01 192.168.1.11 10.0.0.11 web-02 192.168.1.1 Load Balancer 10.0.0.100 DB Primary 10.0.0.101 DB Replica

Industrial Network Segments

An industrial automation network with a management VLAN, a supervisory (SCADA) network, and a field-bus segment.

blockdiag management 172.16.0.0/24 scada 172.16.1.0/24 fieldbus 10.10.0.0/24 172.16.0.10 workstation 172.16.0.20 172.16.1.20 historian 172.16.1.30 HMI Station 1 172.16.1.31 HMI Station 2 172.16.1.50 10.10.0.1 PLC Gateway 10.10.0.10 PLC Rack A 10.10.0.11 PLC Rack B