nwdiag possible misbehavior

0 votes
asked Jun 8, 2023 in Bug by mcon (320 points)

I have a couple of problems with the following diagram:

@startuml
nwdiag {
    ISP_A [ shape = cloud];
    ISP_A -- routerA;
    ISP_B [ shape = cloud];
    ISP_B -- routerB;

    network RED {
        address = "192.168.8.0/24"
        color = red
        routerA [address = "192.168.8.1"];
        routerB [address = "192.168.8.2"];
        Firewall [address = "192.168.8.x"];
    }
    network ORANGE {
        address = "192.168.9.0/24
        color = orange
        Firewall [address = "192.168.9.1"];
        WebServer [address = "192.168.7.x"];
        OtherServer [address = "192.168.7.x"];
    }
    network GREEN {
        address = "192.168.7.0/24
        color = palegreen
        Firewall [address = "192.168.7.1"];
        controller [address = "192.168.7.x"];
        workstation [address = "192.168.7.x"];
    }
    group {"WebServer"
        color = "#aaaaFF";
        description = "LXD Server";
        Firewall;
        WebServer;
        OtherServer;
    }

}
@enduml

First (minor) problem is rendering of ISP/router on top is not symmetrical and "ISP_B" has a up-going connection which shouldn't be there.

Second is "WebServer" and "OtherServer" have a connection to GREEN which is completely wrong.

Note these connections will disappear (and the diagram is OK) if the "group" stanza is removed.

UPDATE: testing with online server (possibly a different version if PlantUML jar) second problem disappears, but first one is still there (a bit different though: ISP_B does not appear at all).

In any case trying to connect both routers to the same ISP results in a mess.

Is there a workaround?

2 Answers

0 votes
answered Jun 9, 2023 by plantuml (295,000 points)

Thanks for the feedback.

We are going to have a look at it.

Here is an example showing the issue. ISP_B should be shown

commented Jun 9, 2023 by The-Lu (64,760 points)
edited Jun 12, 2023 by The-Lu

Hi all,

Here is a minimal not working example:

Code Output
@startuml
nwdiag {

c1 [ shape = cloud];
c2 [ shape = cloud];

'c1 -- a;
'c2 -- b;

network nw {
  a;
  b;
}

}
@enduml
@startuml
nwdiag {

c1 [ shape = cloud];
c2 [ shape = cloud];

c1 -- a;
c2 -- b;

network nw {
  a;
  b;
}

}
@enduml
@startuml
nwdiag {
network nw {
  a;
  b;
}

c1 [ shape = cloud];
c2 [ shape = cloud];

c1 -- a;
c2 -- b;

}
@enduml
@startuml
nwdiag {
network nw {
  a;
  b;
}

c1 [ shape = cloud];
c2 [ shape = cloud];

a -- c1;
b -- c2;

}
@enduml

On the similar topic, see also:

Regards.

commented Jun 9, 2023 by The-Lu (64,760 points)

See also this another example:

@startuml
nwdiag {

c1 [ shape = cloud];

c1 -- a;
c1 -- b;

}
@enduml

Taken from:

Regards.

commented Jun 12, 2023 by The-Lu (64,760 points)
edited Jun 12, 2023 by The-Lu

That seems better...

But compare:

CodeOutput
@startuml
nwdiag {

c1 [ shape = cloud];

network nw {
  c1;
  a;
  b;
}

}
@enduml
@startuml
nwdiag {

network nw {
  c1;
  a;
  b;
}

c1 [ shape = cloud];

}
@enduml

Before it seems good to define a cloud up to the network (on the top)...
To debate...

Regards.

commented Jun 14, 2023 by The-Lu (64,760 points)

That seems better with the last version (Version ~v1.2023.9).

There will remain some minor error that I will post on the alphadoc site.

Thanks a lot.
Regards.

0 votes
answered Jun 14, 2023 by The-Lu (64,760 points)

Hi M., and all,

FYI that is now fixed with last version v1.2023.9.

Thanks to PlantUML team. yes

Regards.

commented Jun 18, 2023 by mcon (320 points)
I can confirm it works for me.

MANY Thanks!!

Mauro
...