sakana

very short memo

network diagram in document

Sometimes you would like to draw network diagram and incorporate it into your document.

It’s so easy with sphinx and nwdiag. For example, prepare such a text as follows and save it as, say, net.diag.

nwdiag {
    internet [shape = cloud];
    internet -- router;

    network eva{
        address = "192.168.10.0/24";
        router;
        Nerv   [address = "192.168.10.10"];
        Seele  [address = "192.168.10.11"];
        Gehirn [address = "192.168.10.12"];
    }

    network theLupin{
        address = "192.168.20.0/24";
        router;
        lupin   [address = "192.168.20.10"];
        fujiko  [address = "192.168.20.11"];
        jigen   [address = "192.168.20.12"];
    }
}

And merge this file into your sphinx document with as follows.

.. nwdiag:: net.diag

Then you will see beautiful network diagram as follows.

None