PlantUML network diagrams
Posted by jpluimers on 2025/12/11
Despite UML (Unified Modelling Language) not having a specific diagram mode for computer networks, PlantUML does support a computer network diagram mode.
Here are some links that got me going to design a site to site VPN situation that I will document in more detail later on this blog.
[Wayback/Archive] Network architecture diagrams using UML – overview of graphical notation – server, firewall, router, switch, load balancer, etc.
UML standard has no separate kind of diagrams to describe network architecture and provides no specific elements related to the networking. [Wayback/Archive] Deployment diagrams could be used for this purpose usually with some extra networking [Wayback/Archive] stereotypes. Network architecture diagram will usually show networking [Wayback/Archive] nodes and [Wayback/Archive] communication paths between them.
The example of the network diagram below shows network architecture with configuration called “two firewall demilitarized zone”. Demilitarized zone (DMZ) is a host or network segment located in a “neutral zone” between the Internet and an organization’s intranet (private network). It prevents outside users from gaining direct access to an organization’s internal network while not exposing a web, email or DNS server directly to the Internet.
…
…
list of some stereotypes
- [Wayback/Archive] nwdiag (with lots of examples)
[Wayback/Archive] nwdiag has been created by [Wayback/Archive] Takeshi Komiya and allows to quickly draw network diagrams. So we thank him for his creation!
Since the syntax is clear and simple, this has been integrated within PlantUML. We reuse here the examples that Takeshi has documented.
-
[Wayback/Archive] Welcome to The Hitchhiker’s Guide to PlantUML! — The Hitchhiker’s Guide to PlantUML documentation
This guide walks through creating PlantUML diagrams, including the ones shown here.Diagram of a Typical Network
- [Wayback/Archive] 1. Create a Diagram of a Typical Network — The Hitchhiker’s Guide to PlantUML documentation
In this section we’re going to create a full network diagram by walking through it step by step.Each step has-
An objective – the step heading
-
Source code – for the diagram
-
Play – where you can test the diagram and play with it.
-
Explore – where you can confirm your understanding by trying things as you play.
-
- [Wayback/Archive] 1. Create a Diagram of a Typical Network — The Hitchhiker’s Guide to PlantUML documentation
- [Wayback/Archive] Network diagram in PlantUML not working as expected? – Stack Overflow (thanks [Wayback/Archive] Brian Karabinchak and [Wayback/Archive] Fuhrmanator)
Interactive PlantUML playground
You can try these diagrams for yourself at the interactive [Wayback/Archive] PlantUML Web Server.
That server is basically the big brother of the tiny editor at [Wayback/Archive] Open-source tool that uses simple textual descriptions to draw beautiful UML diagrams..
You can also use [Wayback/Archive] Online Plant UML Editor bye be aware that it is not live preview and the repository at [Wayback/Archive] sujoyu/plantuml-previewer: Online Plant UML editor with syntax highlighting and preview. had not been maintained from 2018 through 2023.
Queries
- [Wayback/Archive] plantuml network diagram – Google Search
- [Wayback/Archive] uml network diagram – Google Search
Site to Site OpenVPN Network from Condo LAN to Work LAN
The network PlantUML code is at [Wayback/Archive] gist.github.com/jpluimers/89bd1b042e30d3caf06ad52b85e51428 (see also the text below and [Wayback/Archive] rendering on the right).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @startuml | |
| nwdiag { | |
| group openVpnNetwork{ | |
| color = "orange" | |
| description = "site2site VPN \n between condo \n and work LAN"; | |
| condoRouter; | |
| internetRouter; | |
| workWAN2LANRouter; | |
| pfSenseRouter; | |
| } | |
| network condo { | |
| color = "green" | |
| address = "192.168.x.0/24"; | |
| condoRouter [ address = "192.168.x.1/24"; ]; | |
| dashboardRPi [ address = "192.168.x.38/24"; ]; | |
| desktopPC [ address = "192.168.x.25/24"; ]; | |
| } | |
| network internet { | |
| condoRouter [ address = "A.B.C.D"; ]; | |
| internetRouter [ address = "F.G.H.I"; description = "work WAN \n internet router \n\n forwards OpenVPN port \n from internet \n to pfSenseRouter" ]; | |
| } | |
| network workWAN { | |
| address = "192.168.y.0/24"; | |
| internetRouter [ address = "192.168.x.1/24"; ]; | |
| workWAN2LANRouter [ address = "192.168.x.24/24"; ]; | |
| DMZserver [ address = "192.168.x.201/24"; ]; | |
| } | |
| network workLAN{ | |
| color = "LightBlue"; | |
| description = "work LAN 192.168.z.0/24"; | |
| workWAN2LANRouter [ address = "192.168.z.1/24"; ]; | |
| pfSenseRouter [ address = "192.168.z.4/24"; ]; | |
| LANServer [ address = "192.168.x.201/24"; ]; | |
| } | |
| } | |
| @enduml |






Leave a comment