Network Topology Diagram Generator
Quick Start: Choose topology type → Declare stencil icons for network devices → Connect with arrow syntax → Group into zones with rectangle or package → Wrap in ```plantuml fence.
⚠️ IMPORTANT: Always use ```plantuml or ```puml code fence. NEVER use ```text — it will NOT render as a diagram.
Critical Rules
- Every diagram starts with
@startuml and ends with @enduml
- Use
mxgraph.* stencil syntax for network device icons (routers, switches, firewalls, etc.)
- Default colors are applied automatically — you do NOT need to specify
fillColor or strokeColor
- Use
rectangle "Zone" { ... } or package "Zone" { ... } to group devices into network zones
- Use
cloud "Name" { ... } for cloud/Internet shapes
- Bidirectional physical links use
-- (no arrow); directed flows use -->
- Dashed lines for VPN/wireless/logical links use
.. or ..>
- Use
skinparam for global styling
Full stencil reference: See stencils/README.md for 9500+ available icons.
Mxgraph Stencil Syntax
mxgraph.<namespace>.<icon> "Label" as <alias>
mxgraph.<namespace>.<icon> "Label" as <alias> #color
mxgraph.<namespace>.<icon> <alias>
Common Network Stencil Families
| Family |
Prefix |
Typical Icons |
| Networks |
mxgraph.networks.* |
switch, router, firewall, server, pc, laptop, wireless_hub, cloud |
| Cisco |
mxgraph.cisco.* |
routers.router, switches.layer_3_switch, security.firewall, servers.fileserver |
| Cisco 19 |
mxgraph.cisco19.* |
nexus_9300, nexus_5k, fabric_interconnect, ucs_5108_blade_chassis, storage |
| Cisco SAFE |
mxgraph.cisco_safe.security_icons.* |
ngfw, waf, ids, siem, nac, vpn, ddos, malware_sandbox |
| Citrix |
mxgraph.citrix2.* |
netscaler_gateway, storefront, delivery_controller, vda |
Connection Types
| Syntax |
Meaning |
Use Case |
A -- B |
Solid line, no arrow |
Physical Ethernet / LAN link |
A --> B |
Solid line with arrow |
Directed traffic flow |
A .. B |
Dashed line, no arrow |
VPN tunnel / wireless link |
A ..> B |
Dashed line with arrow |
Directed VPN / logical flow |
A -- B : "label" |
Labeled connection |
Link description |
Quick Example
@startuml
mxgraph.networks.cloud "Internet" as inet
mxgraph.networks.firewall "Firewall" as fw
mxgraph.networks.router "Router" as rtr
mxgraph.networks.switch "Switch" as sw
rectangle "Office LAN" {
mxgraph.networks.pc "PC 1" as pc1
mxgraph.networks.pc "PC 2" as pc2
mxgraph.networks.server "Server" as srv
}
inet -- fw
fw -- rtr
rtr -- sw
sw -- pc1
sw -- pc2
sw -- srv
@enduml
Network Diagram Types
| Type |
Purpose |
Key Stencils |
Example |
| LAN |
Local network topology |
mxgraph.networks.* |
lan-topology.md |
| WAN |
Wide area network |
mxgraph.cisco.* |
wan-topology.md |
| Enterprise |
Corporate infrastructure |
mxgraph.cisco.* |
enterprise-network.md |
| Cisco |
Cisco-specific icons |
mxgraph.cisco.* |
cisco-network.md |
| Wireless |
WiFi network |
mxgraph.networks.* |
wireless-network.md |
| Cloud Hybrid |
On-premise + Cloud |
mxgraph.cisco.* |
hybrid-cloud.md |
| Citrix |
Virtual Apps/Desktops |
mxgraph.citrix2.* |
citrix-network.md |
| Security |
Defence-in-depth |
mxgraph.cisco_safe.security_icons.* |
security-architecture.md |
| Data Center |
Spine-Leaf / UCS / SAN |
mxgraph.cisco19.* |
datacenter-network.md |
1---2name: network3description: Create network topology diagrams using PlantUML syntax with mxgraph device icons (Cisco, Citrix, etc.). Best for LAN/WAN layouts, datacenter interconnects, and physical/logical network design.4---5
6# Network Topology Diagram Generator
7
8**Quick Start:** Choose topology type → Declare stencil icons for network devices → Connect with arrow syntax → Group into zones with `rectangle` or `package` → Wrap in ` ```plantuml ` fence.
9
10> ⚠️ **IMPORTANT:** Always use ` ```plantuml ` or ` ```puml ` code fence. NEVER use ` ```text ` — it will NOT render as a diagram.
11
12## Critical Rules
13
14- Every diagram starts with `@startuml` and ends with `@enduml`
15- Use `mxgraph.*` stencil syntax for network device icons (routers, switches, firewalls, etc.)
16- Default colors are applied automatically — you do NOT need to specify `fillColor` or `strokeColor`
17- Use `rectangle "Zone" { ... }` or `package "Zone" { ... }` to group devices into network zones
18- Use `cloud "Name" { ... }` for cloud/Internet shapes
19- Bidirectional physical links use `--` (no arrow); directed flows use `-->`
20- Dashed lines for VPN/wireless/logical links use `..` or `..>`
21- Use `skinparam` for global styling
22
23**Full stencil reference:** See [stencils/README.md](../uml/stencils/README.md) for 9500+ available icons.
24
25## Mxgraph Stencil Syntax
26
27```
28mxgraph.<namespace>.<icon> "Label" as <alias>
29mxgraph.<namespace>.<icon> "Label" as <alias> #color
30mxgraph.<namespace>.<icon> <alias>
31```
32
33### Common Network Stencil Families
34
35| Family | Prefix | Typical Icons |
36|--------|--------|---------------|
37| Networks | `mxgraph.networks.*` | `switch`, `router`, `firewall`, `server`, `pc`, `laptop`, `wireless_hub`, `cloud` |
38| Cisco | `mxgraph.cisco.*` | `routers.router`, `switches.layer_3_switch`, `security.firewall`, `servers.fileserver` |
39| Cisco 19 | `mxgraph.cisco19.*` | `nexus_9300`, `nexus_5k`, `fabric_interconnect`, `ucs_5108_blade_chassis`, `storage` |
40| Cisco SAFE | `mxgraph.cisco_safe.security_icons.*` | `ngfw`, `waf`, `ids`, `siem`, `nac`, `vpn`, `ddos`, `malware_sandbox` |
41| Citrix | `mxgraph.citrix2.*` | `netscaler_gateway`, `storefront`, `delivery_controller`, `vda` |
42
43### Connection Types
44
45| Syntax | Meaning | Use Case |
46|--------|---------|----------|
47| `A -- B` | Solid line, no arrow | Physical Ethernet / LAN link |
48| `A --> B` | Solid line with arrow | Directed traffic flow |
49| `A .. B` | Dashed line, no arrow | VPN tunnel / wireless link |
50| `A ..> B` | Dashed line with arrow | Directed VPN / logical flow |
51| `A -- B : "label"` | Labeled connection | Link description |
52
53### Quick Example
54
55```plantuml
56@startuml
57mxgraph.networks.cloud "Internet" as inet
58mxgraph.networks.firewall "Firewall" as fw
59mxgraph.networks.router "Router" as rtr
60mxgraph.networks.switch "Switch" as sw
61
62rectangle "Office LAN" {
63 mxgraph.networks.pc "PC 1" as pc1
64 mxgraph.networks.pc "PC 2" as pc2
65 mxgraph.networks.server "Server" as srv
66}
67
68inet -- fw
69fw -- rtr
70rtr -- sw
71sw -- pc1
72sw -- pc2
73sw -- srv
74@enduml
75```
76
77## Network Diagram Types
78
79| Type | Purpose | Key Stencils | Example |
80|------|---------|--------------|---------|
81| LAN | Local network topology | `mxgraph.networks.*` | [lan-topology.md](examples/lan-topology.md) |
82| WAN | Wide area network | `mxgraph.cisco.*` | [wan-topology.md](examples/wan-topology.md) |
83| Enterprise | Corporate infrastructure | `mxgraph.cisco.*` | [enterprise-network.md](examples/enterprise-network.md) |
84| Cisco | Cisco-specific icons | `mxgraph.cisco.*` | [cisco-network.md](examples/cisco-network.md) |
85| Wireless | WiFi network | `mxgraph.networks.*` | [wireless-network.md](examples/wireless-network.md) |
86| Cloud Hybrid | On-premise + Cloud | `mxgraph.cisco.*` | [hybrid-cloud.md](examples/hybrid-cloud.md) |
87| Citrix | Virtual Apps/Desktops | `mxgraph.citrix2.*` | [citrix-network.md](examples/citrix-network.md) |
88| Security | Defence-in-depth | `mxgraph.cisco_safe.security_icons.*` | [security-architecture.md](examples/security-architecture.md) |
89| Data Center | Spine-Leaf / UCS / SAN | `mxgraph.cisco19.*` | [datacenter-network.md](examples/datacenter-network.md) |